Commit graph

663 commits

Author SHA1 Message Date
Abby Xu
a77c51032d fix memory leaks in test_security_directory (#420)
* fix memory leak in test_security_directory

Signed-off-by: Abby Xu <abbyxu@amazon.com>

* fix linter errors

Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-14 15:52:43 -07:00
Dirk Thomas
816ce67893
add explicit dependency on rcl_logging_log4cxx (#435)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2019-05-09 14:20:09 -07:00
Abby Xu
7abd214f2a Fix leak in rcl context fini (#434)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-09 13:36:22 -07:00
Jacob Perron
2815b6876f 0.7.2 2019-05-08 16:53:26 -07:00
Jacob Perron
0c24c7ec8e Update graph test for change to rmw names and types struct (#407)
* Update action graph tests to account for type namespace

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Enable OpenSplice action graph test

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Exclude some action graph tests with OpenSplice

It appears that getting graph information from finalized nodes succeeds with OpenSplice, unlike the other RMW implementations.
Since we do not have tests covering this case in rcl, it's not clear if this is a bug or expected behaviour.
In the meantime, I've disabled testing this specific case for OpenSplice.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* const bool

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-05-07 22:47:37 -07:00
Nick Burek
ac8ee90740 Changes the default 3rd party logger from rcl_logging_noop to rcl_logging_log4cxx (#425)
Signed-off-by: burekn <burekn@amazon.com>
2019-05-06 16:22:59 -04:00
Abby Xu
ec878a4781 fix leak in node.c (#424)
* fix leak in node.c

Signed-off-by: Abby Xu <abbyxu@amazon.com>

* add comment for rcl_get_secure_root

Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-03 16:05:18 -07:00
Emerson Knapp
452309f1ce Add new RCL_RET_UNSUPPORTED (#432)
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
2019-05-03 13:42:11 -07:00
M. M
461ad9cd71 New interfaces and their implementations for QoS features (#408)
* implement rcl_wait and rcl_take for rcl_event_t

Signed-off-by: Miaofei <miaofei@amazon.com>

* address feedback regarding formatting issues

Signed-off-by: Miaofei <miaofei@amazon.com>

* Remove dependency on sleep in test_events

Signed-off-by: Ross Desmond <44277324+ross-desmond@users.noreply.github.com>

* update total max wait time for setting up publisher and subscriber to 10 seconds

Signed-off-by: Miaofei <miaofei@amazon.com>

* Fix test_events for rmw_connext

Signed-off-by: Ross Desmond <44277324+ross-desmond@users.noreply.github.com>

* Refactor out timed loop from tests to function

Signed-off-by: Miaofei <miaofei@amazon.com>

* address additional feedback from pull request

Signed-off-by: Miaofei <miaofei@amazon.com>

* update comment regarding difference between connext and opensplice

Signed-off-by: Miaofei <miaofei@amazon.com>

* fix uncrustify issues

Signed-off-by: Miaofei <miaofei@amazon.com>

* update test_events for compatibility with API changes

Signed-off-by: Miaofei <miaofei@amazon.com>

* temporarily disable test_events for macOS

Signed-off-by: Miaofei <miaofei@amazon.com>
2019-05-03 10:17:27 -07:00
Chris Lalancette
7660956a96
Add an allocator to the external logging initialization. (#430)
* Add an allocator to the external logging initialization.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2019-05-02 21:44:07 -04:00
Jacob Perron
eabe426866
Add return code to CancelGoal service response (#422)
* Add return code to CancelGoal service response

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add case for terminated goals

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Check for ERROR_NONE instead of 0

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-05-02 15:25:07 -07:00
Abby Xu
d947655a53 fix buffer overflow in test_security_dir (#423)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-02 12:45:51 -07:00
Michael Carroll
3d48555597
Rmw preallocate (#428)
* Proposola of changes for RMW_Preallocate. Related /ros2/rmw#160

Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>

* Changed RCL interface

Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>

* Updates for allocation in serialize methods.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Fix tests for new APIs.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-05-02 11:32:13 -05:00
Jacob Perron
4262d4cb29 Use new test interface definitions
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-05-01 16:31:46 -07:00
Michel Hidalgo
4f07417370
Migrate launch tests to new launch_testing features & API (#405)
* Update after launch_testing features becoming legacy.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Migrate rcl tests to new launch_testing API.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Migrate missing rcl test to new launch_testing API.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2019-04-30 19:48:09 -03:00
Thomas Moulard
23510fe64b Fix argument passed to logging macros (#421)
This commit fixes two problems with the logging
statements:
- %p requires a void * object to be passed
- %d expects an integer. For size_t objects, %zu should be used

Signed-off-by: Thomas Moulard <tmoulard@amazon.com>
2019-04-30 15:47:37 -07:00
Chris Lalancette
f98d37ec65
Make sure to initialize the bool field. (#426)
This way we avoid tripping a Fast-CDR check for a 0 or 1
in the bool field.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2019-04-30 15:59:45 -04:00
Steven! Ragnarök
f943e6dcb5 0.7.1 2019-04-29 14:56:53 -07:00
jhdcs
64610d2548 Replace reinterperet_cast with static_cast (#410)
* Converted reinterpret_cast to static_cast where I felt it was safe-ish

Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>

* Fixed inconsistent type inference

Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
2019-04-22 13:24:21 -07:00
Dirk Thomas
273797e387
fix leak in __wait_set_clean_up (#418)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2019-04-17 10:13:09 -07:00
Jacob Perron
26744b0e5d
Rename action state transitions (#409)
* Rename action state transitions

Now using active verbs.
Resolves #399.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-16 04:46:16 -07:00
M. M
edaa18ae4b correct initialization of rmw_qos_profile_t struct instances (#416)
Signed-off-by: Miaofei <miaofei@amazon.com>
2019-04-15 17:43:51 -07:00
Steven! Ragnarök
d94c958a23 0.7.0 2019-04-14 08:39:01 -07:00
Jacob Perron
b5039d20d7
Add Action graph API (#411)
* Add action graph API

Builds on top of the rcl graph API.
A list of action names associated with action clients can be constructed by
looking for subscriber topic names that have the suffix "/_action/feedback".
Likewise, action servers are associated with publisher topic names with the same suffix.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Enable multiple rmw action graph API tests

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Use ament_target_dependencies for osrf_testing_tools_cpp

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix lint errors

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Refactor

* Move graph API common implementation to local function
* Refactor tests

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Disable graph tests with OpenSplice

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Include graph.h in rcl_action.h

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Remove duplicate test

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Prefix increment operators

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Rename 'suffix' -> 'identifier'

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add missing finalize calls and remove redundant branch

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Finalize names and types struct on error

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix bugs in tests

Pass valid names and types struct and update expected error code.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Add zero allocator tests

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix indentation

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Check if action identifiers are the suffix

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-14 07:30:51 -07:00
ivanpauno
11b5eb865b Correct bool reading from yaml files (#415)
* Replace some wrong strncmp calls with strcmp

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Add quotes checking when detecting bools

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
2019-04-12 15:25:44 -07:00
Jacob Perron
d810f12e94
Add more test cases for graph API + fix bug (#404)
* Add more test cases for graph API
* Guard against invalid allocator in rcl_get_service_names_and_types.
* Increase timeout for Connext tests
* Refactor tests
  * Isolate unknown node name tests
  * Add invalid node name tests
* Add zero allocator tests
* Fix a segfault when passing a zero allocator to rcl_names_and_types_init.
* Add TODOs for buggy tests

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-10 11:30:09 -07:00
Dirk Thomas
c3ea0df317
fix missing include (#413)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2019-04-09 12:31:11 -07:00
Mikael Arguedas
121f9708c2 use pedantic (#412)
* use pedantic now that memory tools is in another repo

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>

* add pragma to ignore tinydir warning

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
2019-04-09 11:18:02 -07:00
ivanpauno
64a1412594
Add function to get publisher actual qos settings (#406)
* Add rcl_publisher_get_actual_qos function

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Add test for rcl_publisher_get_actual_qos

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Correct RMW_IMPLEMENTATION checking. Add opensplice system default qos test

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Add system default test for connext

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Solve windows build problem

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
2019-04-01 17:54:48 -03:00
Jacob Perron
03dec21cde
Refactor graph API docs (#401)
Fix errors, remove redundant information, and try to make sentences more concise.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-03-20 14:19:59 -07:00
Dirk Thomas
bda09929ba add section about DCO to CONTRIBUTING.md 2019-03-20 08:37:06 -07:00
ivanpauno
99630cb66d
Using ament_target_dependencies where possible (#400)
* Using ament_target_dependencies where possible

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Modified rcl_add_custom_* to use AMENT_DEPENDENCIES where possible

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Added again osrf_testing_tools_cpp::memory_tools library where needed.

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Modified with PR comment, and replaced forgotten osrf_testing_tools_cpp including

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
2019-03-19 09:22:16 -03:00
Michael Carroll
29b0838388
Fix regression around fully qualified node name. (#402)
* Fix regression around fully qualified node name.

Regression was introduced in 114bc5289 (PR #381).

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Clean up test code based on feedback.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Combine tests to prevent Connext timeout.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-03-18 17:08:33 -05:00
Jacob Perron
dcffef54f1
Add function rcl_names_and_types_init (#403)
This wraps the rmw function just like the finalize function.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-03-18 15:06:51 -07:00
Jacob Perron
1d8b831bdf Fix typo in Doxyfile
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-03-12 00:12:37 -07:00
Dirk Thomas
756b065653
update tests to use separated action types (#340)
* update test to IDL-based action generation

* update test to IDL-based action generation

* fix merge conflict

* update new tests

* update action types

* match renamed action types

* style fix

* update types using unique_identifier_msgs
2019-03-11 21:12:36 -07:00
Jacob Perron
1a34301995
[rcl_action] Minor documentation fixes (#397)
* Update rcl_action Doxyfile

Add reference to rcl tagfile and fix generated tagfile name.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Fix minor doc errors

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-03-11 14:46:18 -07:00
Dirk Thomas
4f9e6bc12f
initialize sequence number of client (#395)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2019-03-08 16:18:54 -08:00
Michel Hidalgo
85a46726b6
Add launch along with launch_testing as test dependencies. (#393)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2019-03-06 09:03:02 -08:00
Sachin Suresh Bhat
2ff5df0c11 Set symbol visibility to hidden for rcl (#391)
* Set symbol visibility to hidden for rcl

Enabling symbol visibility feature in gcc and clang compilers.
This will hep find symbol export related issues in linux and
potentially reduce compile times.

Discourse topic link:
https://discourse.ros.org/t/set-symbol-visibility-to-hidden-for-rmw-and-rcl-packages/7981

Signed-off-by: Sachin Suresh Bhat <bhatsach@amazon.com>

* Remove WIN specific compiler definition in configure_rcl

Signed-off-by: Sachin Suresh Bhat <bhatsach@amazon.com>

* Rename macro name rcl_set_symbol_visibility_hidden

Signed-off-by: Sachin Suresh Bhat <bhatsach@amazon.com>

* Change macro to args for rcl_set_symbol_visibility_hidden

Signed-off-by: Sachin Suresh Bhat <bhatsach@amazon.com>
2019-03-05 18:09:55 -08:00
Shane Loretz
b5cdc496d0
Split test_token to avoid compiler note (#392)
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
2019-02-27 14:54:54 -08:00
Michel Hidalgo
e133167524 Drops legacy launch API usage. (#387)
* Drops legacy launch API usage.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Adds launch_testing as test dependency.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2019-02-27 13:36:43 -06:00
AAlon
b0a124dcf6 Security directory lookup improvements (#332)
* Changing security directory lookup to a prefix match rather than exact match.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Changing security directory lookup to a prefix match rather than exact match.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Changing security directory lookup to a prefix match rather than exact match.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Changing security directory lookup to a prefix match rather than exact match.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Adding security_directory module and moving rcl_get_secure_root function to it. Adding tests.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Changing security directory prefix matching to be optional. Improving error messages around security directory lookup.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Fixing get_best_matching_directory so that it always fetches the next file inside the loop.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* make pr ready for ros2cli security feature (#1)

* update docs about possibility of rcl_take no taking (#356)

* update rcl_wait doc with respect to subs and possibility of failing takes

* add a note about possible failing takes in rcl_take docs

* 0.6.2

* Set rmw_wait timeout using ros timers too (#357)

* 0.6.3

* Avoid timer period being set to 0 (#359)

* Fix logic that moves goal handles when one expires (#360)

* Fix error from uncrustify v0.68 (#364)

* Ensure that context instance id storage is aligned correctly (#365)

* Ensure that context instance id storage is aligned correctly

* Make alignment compatible with MSVC

* Namespace alignment macro with RCL_

* [rcl] Guard against bad allocation calling rcl_arguments_copy() (#367)

* [rcl] Add test for copying arguments struct with no arguments

* Override allocate function in test to reveal bug

* [rcl] Only allocate arrays if there are things to copy in rcl_argument_copy()

Also guard against freeing invalid pointers if rcl_argument_copy() fails.

* Remove uncessary guard against NULL pointer

* linter, styles, uncrustify fixes

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Update rcl/include/rcl/security_directory.h

Co-Authored-By: AAlon <avishayalon@gmail.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Adding line break in docstring

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Removing duplicate doc string

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Removing tinydir from the source tree, instead using the ROS package tinydir_vendor.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Removing tinydir

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Reformatting license notice as per linter template.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Update test_security_directory.cpp

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Changing input to putenv to be a global, statically allocated buffer.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* test_security_directory - Using a larger buffer for env string manipulations.

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Copy environment variable to allocated string so it is not clobbered by next lookup

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Address review comments

fix security directory exact match comment and unset env vars before tests

Signed-off-by: Emerson Knapp <eknapp@amazon.com>

* Remove strncpy

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
2019-02-21 09:25:25 -08:00
Michel Hidalgo
471075197c
Enforce non-null argv values on rcl_init(). (#388)
* Enforce non-null argv values on rcl_init().

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Adds test case for null argv values on rcl_init().

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2019-02-12 15:07:52 -03:00
Jacob Perron
5ec52d004b
Fix rcl_action documentation (#380)
* Fix rcl_action_goal_info_t documentation

* Fix rcl_action_expire_goals documentation

* Fix information about thread safety

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-02-12 09:31:19 -08:00
William Woodall
4c9be76b92
remove incorrect argument documentation (#361)
* remove incorrect argument documentation

* remove another incorrect argument doc
2019-02-08 16:14:36 -08:00
Ross Desmond
af49d6b3bf Change error to warning for multiple loggers. (#384)
* Change error to warning for multiple loggers

* Updating warning message

* Updating TODO message.

* Reformatting todo and uncrustify warn message.

* Add early return back in.

* Break string literal across multiple lines.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* Remove commented-out error and return block.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
2019-02-07 15:44:24 -08:00
Jacob Perron
97b87263d9 Remove dummy executable
Previously used to test compilation of rcl_action headers.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-02-07 11:24:30 -08:00
Jacob Perron
97bc6ac764 Remove unused action server option 'clock_type'
The clock type is instead as an argument to the action server's init function and stored in the impl.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-02-07 11:24:30 -08:00
Jacob Perron
8de90f66aa Set error message when there is an invalid goal transition
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-02-07 11:24:30 -08:00