Commit graph

208 commits

Author SHA1 Message Date
Michael Carroll
7d4e17224a
Correct std::hash return type sizes (#102)
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2020-02-18 12:19:56 -06:00
evshary
275d3dd42a Correct the coding style to pass CI test.
Signed-off-by: evshary <evshary@gmail.com>
2020-02-12 10:08:31 +01:00
Erik Boasson
d2a22d3f59 Update for cyclonedds changes needed for ros1 bridge
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-02-11 23:25:45 +01:00
Emerson Knapp
cf8e4fb91e Fix semantics per review comment
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
2020-02-11 22:36:39 +01:00
Emerson Knapp
4209d7654b Fix MSBuild warnings C4146 and C4267
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
2020-02-11 22:36:39 +01:00
Dennis Potman
18317eff6c Add #if version >= 0.8.2 to fix ros2 dashing builds
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-02-11 10:44:09 +01:00
Dennis Potman
d70fad6c46
Implementation for rmw_get_pub/sub_info_by_topic (#97)
Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-02-10 14:59:04 -03:00
Dan Rose
20007b4dc2
Remove unused CMake extras (#84)
Signed-off-by: Dan Rose <dan@digilabs.io>
2020-02-10 09:08:23 -06:00
Dirk Thomas
1c500379ae
code style only: wrap after open parenthesis if not in one line (#95)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2020-02-04 11:41:49 -08:00
Erik Boasson
0bc1281978 Fix uncrustify error
Signed-off-by: Erik Boasson <eb@ilities.com>
2020-01-31 15:38:41 +01:00
Dennis Potman
a771f917f8
Support for deadline, lifespan and liveliness qos (#88)
* Events and liveliness/lifespan/deadline qos support

This commit adds support for liveliness, lifespan and deadline missed
qos in rmw, and it adds event support in rmw_wait that is required for
these qos policies to work correctly.

* Removed redundant empty check in rmw_wait, fix duration 0 vs infinity for qos getter and setter

* Disabled auto-dispose so that deadline-missed on reader is still triggered when a writer becomes not-alive and unregisters itself
2020-01-31 14:53:20 +01:00
eboasson
ee35a6c41a
rmw_get_topic_endpoint_info doesn't exist on Dashing (#91)
* rmw_get_topic_endpoint_info doesn't exist on Dashing

Signed-off-by: Erik Boasson <eb@ilities.com>

* get_topic_endpoint_info got added in RMW 0.8.2

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-01-31 13:37:49 +01:00
Dan Rose
2876b80a7d dds_time_t instead of dds_duration_t for absolute time
Signed-off-by: Dan Rose <dan@digilabs.io>
2020-01-23 10:53:38 +01:00
Miaofei Mei
aed236fb26 Stubs for rmw_get_publishers_info_by_topic and rmw_get_subscriptions_info_by_topic (#81)
Signed-off-by: Miaofei <miaofei@amazon.com>
2020-01-14 14:32:10 -03:00
Dan Rose
c0af9d898b
Cache serialization info when CDRWriter is constructed (#80)
1. Make CDRWriter remember its top level struct value type
2. Populate the trivially serializable cache when CDRWriter is created instead of waiting until the first time a message is sent.
3. Speed up arrays/sequences of trivially serializable structs

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-12-13 11:05:58 -05:00
Dan Rose
c25f22e565
Mark code that should be unreachable (#77)
Introduce a new [[noreturn]] unreachable() function that marks code as unreachable and throws a logic error if it is executed.
Fix build error due to Windows min/max macros.
Fix linker errors from referring to a non-constexpr extern from a constexpr.
Fix warnings about narrowing conversions.

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-12-08 16:03:30 -06:00
Dan Rose
9b264c6480
Clean up topic namespace prefixes (#76)
Signed-off-by: Dan Rose <dan@digilabs.io>
2019-12-06 11:23:47 -06:00
Dan Rose
b322f478de
Serialize into initialized memory, not vector (#75)
Make serdata a private header
Serialize into uninitialize data, not a vector.
2019-12-06 10:21:18 -06:00
Dan Rose
88e74c322f
Rework serialization (#42)
* Rework serialization and typesupport

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-12-05 14:42:11 -06:00
eboasson
3e7d33ba2b
Use rcutils_get_env() instead of getenv() (#71) (#73)
* Use rcutils_get_env() instead of getenv() (#71)

Signed-off-by: Erik Boasson <eb@ilities.com>

* Keep includes in alphabetical order

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-25 20:19:14 +01:00
Michael Carroll
ce34664472
0.4.4
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-11-19 23:18:14 -06:00
Dan Rose
0686850890 Minor CMakeLists cleanup
Signed-off-by: Dan Rose <dan@digilabs.io>
2019-11-18 10:28:23 +01:00
Michael Carroll
4089feee81
0.4.3
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-11-13 07:50:50 -06:00
eboasson
0ca71446a9 Address "Precondition not met" on rmw_create_node (#65) (#66)
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>
2019-11-11 15:28:53 -05:00
eboasson
096d4643c8
Fix dashing breakage (#64)
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-07 09:33:17 +01:00
eboasson
c168334087
Support localhost-only communications (#60)
* 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>
2019-11-07 08:14:59 +01:00
Scott K Logan
0a1770e1e2 0.4.2 2019-11-01 13:51:51 -07:00
Scott K Logan
bb8570f165
Suppress a syntax error identified by cppcheck 1.89 (#59)
Signed-off-by: Scott K Logan <logans@cottsay.net>
2019-10-25 09:15:25 -07:00
eboasson
3817149010 Make RMW version acceptable to MSVC (#58)
GCC and Clang support the ternary operator in macros, MSVC does not.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-10-25 09:14:45 -07:00
Karsten Knese
951f5e2e23 skip compilation of rmw_cyclonedds when cyclone dds is not found (#56)
* 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>
2019-10-25 17:45:39 +02:00
Karsten Knese
80bc94e2fa remove executive flags from source code files
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
2019-10-25 10:15:48 +02:00
Michael Carroll
de359efb5f
0.4.1
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-10-24 08:31:35 -05:00
Karsten Knese
e959e66f08 rename return functions
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
2019-10-22 16:50:24 +02:00
evshary
6d907ef583 Solve the lint issue.
Signed-off-by: evshary <evshary@gmail.com>
2019-10-21 12:42:12 +02:00
Erik Boasson
7bfd709fe0 Add already obsoleted loaned message interfaces
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>
2019-10-21 12:37:55 +02:00
Karsten Knese
d8cb336f8f zero copy api for cyclonedds
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
2019-10-21 12:37:55 +02:00
Dan Rose
d47de860aa Use right event info for RMW_EVENT_LIVELINESS_LOST
Signed-off-by: Dan Rose <dan@digilabs.io>
2019-10-20 03:17:46 -07:00
Dan Rose
79e7046784 unbreak Dashing build after #50
Signed-off-by: Dan Rose <dan@digilabs.io>
2019-10-20 03:08:00 -07:00
Dan Rose
c51c884413 Add compilation guards for RMW compatibility
Use CMake rmw_VERSION for conditional compilation

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-10-20 02:41:30 -07:00
Erik Boasson
94e53ce83f update signature for added pub/sub options
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-10-20 02:41:30 -07:00
Brian Marchi
33fed3a65c Add localhost boolean parameter to create node function (#50)
* 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>
2019-10-18 19:30:06 -03:00
Dan Rose
1205ab5ea2 Remove dead string serialization code (#41)
* Remove dead string serialization code code

* Remove more dead cstring code
2019-09-27 10:05:55 +02:00
Erik Boasson
a55c9cb605 Use RMW_RET_NODE_NAME_NON_EXISTENT only if defined
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-09-25 07:51:17 +02:00
dennis-adlink
c2c69ac032 Code improvements in ser/deser code wrt passing data size (#39)
* 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>
2019-09-24 16:13:34 +02:00
evshary
a61a014a11 Return NODE_NAME_NON_EXISTENT instead of ERROR.
Signed-off-by: evshary <evshary@gmail.com>
2019-09-24 15:11:51 +02:00
Dirk Thomas
af5fa3c468
update repo URL with changed org unit (#38) 2019-09-19 08:18:42 -07:00
Erik Boasson
29f4b76d3d Update known limitations in README
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-09-19 13:18:54 +02:00
Erik Boasson
828ae14558 Address uncrustify linter violation
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-09-19 13:18:54 +02:00
dennis-adlink
0e6fd30a8c Validation in deserializer (#36)
* 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>
2019-09-19 11:56:26 +02:00
Dan Rose
b39efafd62 make cyclonedds vender package play nice with colcon (#34)
* 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
2019-09-18 19:49:39 +02:00