Commit graph

586 commits

Author SHA1 Message Date
Jacob Perron
ec8539b65c
Fix memory corruption when maximum number of parameters is exceeded (#456)
If the maximum number is exceeded fail with an informative error message.

Fixes #419.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-06-07 14:56:05 -07:00
Jacob Perron
79b3ec1052
Log warning when remapping to an invalid node name (#454)
Similar to the warnings when remapping to invalid namespaces, this better communicates failures to the user.

Resolves #449

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-06-05 12:26:16 -07:00
Emerson Knapp
8085c6adbf Use size_t printf format for size_t variable (#453)
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
2019-06-03 19:52:04 -07:00
Michael Carroll
4f68bbf43f
0.7.4
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-05-29 18:43:41 -05:00
Emerson Knapp
c39d0d1e0a Fix tests now that FastRTPS correctly reports that liveliness is not supported (#452)
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
2019-05-28 13:09:55 -07:00
Emerson Knapp
d55f015296 In test_events, wait for discovery to be complete bidirectionally before moving on (#451)
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
2019-05-28 12:43:48 -07:00
Ralf Anton Beier
5f0d331712 Allow empty strings if they are quoted. (#450)
Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
2019-05-24 08:57:47 -07:00
Siddharth Kucheria
9566f39d60
rcl_action - user friendly error messages for invalid transitions (#448)
* user friendly error messages for invalid transitions

Signed-off-by: Siddharth Kucheria <kucheria@usc.edu>
2019-05-21 15:17:37 -07:00
Abby Xu
0736f93cc0 fix leak in test_service (#447)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-20 16:44:45 -07:00
Abby Xu
fa1757bee8 fix leak in test_guard_condition (#446)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-20 16:12:42 -07:00
Abby Xu
2a9b2979a2 fix leak in test_get_actual_qos (#445)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-20 16:12:27 -07:00
Abby Xu
82f93afde5 fix leak in test_expand_topic_name (#444)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-20 16:11:58 -07:00
William Woodall
c972d0300e
0.7.3 2019-05-20 15:57:11 -07:00
William Woodall
f8333942fd
changelogs
Signed-off-by: William Woodall <william@osrfoundation.org>
2019-05-20 15:57:00 -07:00
Prajakta Gokhale
3806aa226d Fix leaks in rcl_action unit tests (#442)
Fix memory leaks detected by AddressSanitizer from rcl_action unit
tests.

Signed-off-by: Prajakta Gokhale <prajaktg@amazon.com>
2019-05-20 15:04:30 -07:00
Abby Xu
545076505b fix leak in test_client (#443)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-20 14:17:28 -07:00
Cameron Evans
0c4c743d29 Fix leaks in test_wait.cpp (#439)
Signed-off-by: cevans87 <c.d.evans87@gmail.com>
2019-05-17 15:38:05 -07:00
Abby Xu
6042af41c7 fix leak in test_context (#441)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-17 11:48:58 -07:00
Abby Xu
2380a1a3a8 fix leak in test_init (#440)
Signed-off-by: Abby Xu <abbyxu@amazon.com>
2019-05-16 15:56:20 -07:00
M. M
2f6abbb0ee enable rcl test_events unit tests on macOS (#433)
Signed-off-by: Miaofei <miaofei@amazon.com>
2019-05-16 15:31:30 -07:00
M. M
4e0b33f8a8 Enable deadline tests for FastRTPS (#438)
* improve robustness of test_events

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

* refactor code

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

* enable testing of fastrtps

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

* fix failing tests and remove useless tests

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

* disable liveliness tests for fastrtps as it is not supported

Signed-off-by: Miaofei <miaofei@amazon.com>
2019-05-16 08:10:55 -07:00
ivanpauno
7984f94423
Correct launch_testing.assert.assertExitCodes usage (#437)
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
2019-05-15 17:19:12 -03:00
Chris Lalancette
667443b59c Revert "Changes the default 3rd party logger from rcl_logging_noop to… (#436)
* Revert "Changes the default 3rd party logger from rcl_logging_noop to rcl_logging_log4cxx (#425)"

This reverts commit ac8ee90740.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Revert "add explicit dependency on rcl_logging_log4cxx (#435)"

This reverts commit 816ce67893.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Add dependency on rcl_logging_noop.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2019-05-14 21:45:26 -07:00
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