* Add localhost boolean parameter to create node function
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
* Cast to void to avoid compilation warning
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
* Some code improvements in ser/deser code wrt passing data size
to cycdeserbase class.
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
* Move adjusting deserialisation limit in cycdeserbase to line where
data pointer is moved.
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
* Validation in Deserializer
Added validation in CDR deserialization: max buffer length is checked
when deserializing fields and strings are checked for null-terminator
(except for wstrings, which are serialized without null-terminator).
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
* Catch exceptions in serdata functions
In serdata functions rmw_print, rmw_to_sample and rmw_from_sample
catch exceptions so that correct return code is given when functions
are called from ddsi.
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
* Improve deserialisation validation
Refactored the deserialisation validation functions so that sequence
length is checked more properly and protection against overflows.
Renamed source files for exceptions so that it conforms to ros2 /
google c++ style guide.
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
* Un-vendor cyclonedds
Upstream changes in https://github.com/eclipse-cyclonedds/cyclonedds/pull/256 should make this unnecessary and allow you to clone the package into your ROS workspace.
* Remove obsolete gitignore
* Recommend cloning eclipse-cyclonedds/cyclonedds
* Add Cyclone DDS build dependencies for rosdep
* Update README.md
Change apt install commands to rosdep install.
* build_depend -> buildtool_depend for maven and java
* Add vendor package to build cyclonedds from source
Remove maven and java dependency (thanks, @eboasson)
* remove --symlink-build flag
this obscures the intention of the code and sophisticated users can choose whether to use it or not.
* add rosdep to readme
* Implemented byte-swapping in deserializer
Set the correct endianness flag when serializing ROS messages to CDR
and added support for byte-swapping in CDR deserializer when in a
mixed-endian network.
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
* Fix float deser byte-swap and add byte-swap in cycprint
Fixed the byte-swapping in float/double deserialization and added byte-
swapping in cycprint by creating a cycdeserbase that is shared with
cycdeser.
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
This reverts commit 9ba2508bca.
The CycloneDDS package name should conform to the ROS package name
recommendations, and contain no upper-case letters.
Signed-off-by: Scott K Logan <logans@cottsay.net>
Commit 1200bfd109e4e21ff572ce0c6205cb6c2e247edc in Cyclone DDS changed
the setting of the project name to use a string literal. That change
affects the capitalization of the name under which colcon looks for
Cyclone, and this commit changes the dependency specification to match.
Signed-off-by: Erik Boasson <eb@ilities.com>
Cyclone DDS always returns immediately from ``dds_waitset_wait`` when
there are no entities in the waitset, but the rcl timer test implies
that the expectation is that blocks. By adding a guard condition that
is never triggered this expectation is met.
Signed-off-by: Erik Boasson <eb@ilities.com>
* Return history depth even when KEEP_ALL is selected
* Return deadline, lifespan, liveliness
This doesn't fix it completely: the latter three are not actually
supported and are still ignored when creating an publisher or subscriber
node; and moreover it is not clear how to map infinity.
Signed-off-by: Erik Boasson <eb@ilities.com>
Otherwise each writer/reader gets its own, and at approximately 1kB
each, with hundreds of endpoints that starts adding up to a meaningful
amount of memory.
Signed-off-by: Erik Boasson <eb@ilities.com>
The built-in topics readers in the RMW node are currently not used for
anything other than triggering the guard condition. All the query
functions just get their own data set from Cyclone. Taking all samples
instead of just the not-alive ones reduces memory usage.
Signed-off-by: Erik Boasson <eb@ilities.com>
struct ddsi_sertopic will shortly change a little bit by the removal of
two members that should never have been in it in the first place and
that had to be initialized to 0. Relying on memset makes the source
code independent of this difference.
Signed-off-by: Erik Boasson <eb@ilities.com>
Misuse of std::vector resize as if it would leave any reserved entries
unchanged caused a misinterpretation of entries whenever the number of
triggering entities was larger than the number of triggering entities in
the preceding call to rmw_wait: these would all be mapped to the first
entity in the set.
If the waitset is reused from call to call and spurious events are
handled gracefully, this is recoverable; otherwise, no such luck.
Moreover, not accounting for a sentinel entry added to the list of
triggered entities means it would never return RMW_RET_TIMEOUT.
Signed-off-by: Erik Boasson <eb@ilities.com>