Commit graph

114 commits

Author SHA1 Message Date
Sid Faber
1ca2269e66
Improve security logic and memory management
Properly handle downstream effects of ROS_SECURITY_STRATEGY and ROS_SECURITY_ENABLE environment variables through security_options. Improve memory management and make sure to only set security qos properties when all files are sure to exist.
2020-04-02 12:36:31 -04:00
Sid Faber
5e934200ce
Fix memory leaks
Also remove superfluous include and blank line.

Signed-off-by: Sid Faber <sid.faber@canonical.com>
2020-03-27 08:54:55 -07:00
Sid Faber
bca0852f50 Update conditional compile logic
Add in conditional compile based on ENABLE_SECURITY make flag
and Cyclone DDS feature availability.  Also addressed review
comments.

Signed-off-by: Sid Faber <sid.faber@canonical.com>
2020-03-26 18:04:57 +00:00
Sid Faber
99d2738a84 Enable use of Cyclone DDS security features
Add utility function to insert security settings to the cyclone QOS
object used to create nodes.  Include a utility to find security
files and properly format their location to use with DDS.

Signed-off-by: Sid Faber <sid.faber@canonical.com>
2020-03-20 20:54:03 +00:00
Miaofei Mei
025762ac4f
Add rmw_*_event_init() functions (#115)
Signed-off-by: Miaofei <miaofei@amazon.com>
2020-03-19 17:15:07 -03:00
Thijs Sassen
137678e99e Updated version to match cyclonedds package
Signed-off-by: Thijs Sassen <thijs.sassen@adlinktech.com>
2020-03-12 14:33:00 +01:00
Emerson Knapp
8e8b1ff044 Use a list instead of a set for node names list
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
2020-03-11 09:44:10 +01:00
Erik Boasson
a6deecfceb Update for changes on Cyclone DDS security branch
The security specification has a mode in which keyhashes containing the
MD5 of the key value are required on the wire, and this requires some
small changes to the topic interface.  Currently, these changes reside
only on the security branch of Cyclone DDS.

The changes use conditional compilation to handle both the master branch
of Cyclone and the security branch to minimise version dependencies.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-03-05 17:29:05 +01:00
Erik Boasson
b4c0620b5b Fix leak in client/service topic error handling
And refactor to reduce the amount of code duplication.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-03-05 15:18:28 +01:00
Dennis Potman
6162be51f9 Fix sertopic referencing
Use the function dds_create_topic_generic for creating topic, so that
the sertopic that is actually used is referenced in the publisher.

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-03-05 15:18:28 +01:00
Ivan Santiago Paunovic
49d4a51abf
Update usage of rmw_topic_endpoint_info_array (#101)
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
2020-02-20 14:11:35 -03:00
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