Cyclone's original code for dds_create_domain() appears to create a
domain entity that is automatically deleted when the last attached
participant disappears. In reality, it leaks a reference while
returning DDS_RETCODE_OK, making it appear as-if it is a regular entity
that remains into existence until explicitly deleted.
The RMW code assumed that it would be automatically deleted when the
last node was destroyed and that a subsequent call to rmw_create_node
could create the domain anew. This then fails with "precondition not
met".
In an upcoming fixed version of dds_create_domain() the domain entities
will behave normally (return a handle, require an explicit delete).
This commit provides a workaround for the bug in the original
implementation: by recovering the handle from the first participant the
preceding commits that were intended to future-proof the code will
ensure that the entity now gets deleted explicitly.
Signed-off-by: Erik Boasson <eb@ilities.com>
* Support localhost-only communications
Signed-off-by: Erik Boasson <eb@ilities.com>
* Future-proof localhost-only for upcoming Cyclone fix
Signed-off-by: Erik Boasson <eb@ilities.com>
* skip compilation of rmw_cyclonedds when cyclone dds is not found
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
* proper case and company name
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
* linters
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
* change ADLINK to Eclipse
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
The rmw_return_loaned_message and rmw_release_loaned_message functions
are still expected by rcl, even if they are scheduled to be replaced.
We need a working build, so add them for now.
Signed-off-by: Erik Boasson <eb@ilities.com>
* 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>