Commit graph

483 commits

Author SHA1 Message Date
Alexis Pojomovsky
46e2911d45 Removed unnecessary condition in cmake 2018-12-05 17:37:21 -03:00
Alexis Pojomovsky
316c62d20d Make test_action_communication to be compiled against all available rmw" 2018-12-05 16:53:41 -03:00
Alexis Pojomovsky
b1c4d95abe Change UUID type in action msgs (#338)
* Make use of unique_identifier_msgs/uuid in rcl_action

* Update to use goal_id.uuid

* Remove unnecessary find_package of unique_identifier_msgs
2018-12-04 11:05:20 -08:00
Shane Loretz
c1dfda97e1
add rcl_action_server_is_valid_except_context (#348) 2018-12-01 08:55:07 -08:00
Shane Loretz
dcaef179b1 Fini even if node context is invalid and reset error (#346) 2018-11-30 21:45:47 -06:00
Shane Loretz
fd77323b9d
Add timer to action server to check expired goals + asan fixes (#343)
* Add timer to action server to check expired goals

* Fix leak in action_server

* Fix leaks and heap overflow errors

* Fix leaks in tests
2018-11-30 18:24:17 -08:00
Alexis Pojomovsky
128f28499b Increased timeout for rcl_wait in action tests (#344) 2018-11-30 14:56:07 -08:00
William Woodall
1529b620cc
fix compiler warning in clang (#345)
* fix compiler warning in clang

Signed-off-by: William Woodall <william@osrfoundation.org>

* same thing but for node too

Signed-off-by: William Woodall <william@osrfoundation.org>
2018-11-30 16:40:02 -06:00
William Woodall
97ad0013e2
refactor init to not be global (#336)
* refactor init to not be global

Signed-off-by: William Woodall <william@osrfoundation.org>

* style changes

Signed-off-by: William Woodall <william@osrfoundation.org>

* refactor to hide use of C11 atomics in implementation

Signed-off-by: William Woodall <william@osrfoundation.org>

* fix new action tests

Signed-off-by: William Woodall <william@osrfoundation.org>

* use alternative atomic init for Windows support

* updates after rebase

Signed-off-by: William Woodall <william@osrfoundation.org>

* cleanup rmw_init_options before copying

Signed-off-by: William Woodall <william@osrfoundation.org>

* fix two bugs in new init code

* relax validity checks in a few places to facilitate post shutdown cleanup

Signed-off-by: William Woodall <william@osrfoundation.org>

* fixing tests for new API behavior

Signed-off-by: William Woodall <william@osrfoundation.org>

* to allocator -> to allocate

* acutally call rmw_shutdown() and address review comments

Signed-off-by: William Woodall <william@osrfoundation.org>
2018-11-29 21:32:54 -08:00
Alexis Pojomovsky
dfaa412bbf
Merge pull request #331 from ros2/hidmic/complete-action-tests
Completes integration tests for action client/server
2018-11-29 20:30:33 -03:00
Shane Loretz
b2694dfb3d
rcl_action_expire_goals() outputs goals that expire (#342)
* rcl_action_expire_goals() outputs goals that expire
2018-11-28 19:10:06 -08:00
Alexis Pojomovsky
aead12917a Addressed peer review comments v2 2018-11-28 15:07:46 -03:00
Michael Carroll
fbd2b08937
Methods to retrieve matched counts on pub/sub. (#326)
* Methods to retrieve matched counts on pub/sub.

* Add documentation.

* Use simplified error checking.

* Add sleep for opensplice and connext.

* Fix docs.

* Address reviewer feedback.

* Wait on guard condition rather than static timeout.

* Attempt to force mismatched QoS settings.

* Fix mismatched QoS test.
2018-11-28 10:35:19 -06:00
Shane Loretz
15ac20738c
process_cancel_request no longer changes goal state (#341) 2018-11-27 15:05:38 -08:00
Alexis Pojomovsky
10eebe3a3b Added checks for wait set entities 2018-11-27 14:25:56 -03:00
Alexis Pojomovsky
d03d5605c1 Addressed peer review comments 2018-11-27 14:11:47 -03:00
Alexis Pojomovsky
4ee3182380 Updated action tests to match the updated API
Added action cancel test

Added action result communication test

Added action status communication test

Added action feedback communication test

Fix wrong return code in action client
2018-11-26 19:27:53 -03:00
Michel Hidalgo
bde76ab40e [rcl action] Augments test_action_communication test. 2018-11-22 11:14:56 -03:00
Michel Hidalgo
f531f682ea [rcl action] Exposes sequence numbers for all requests and responses. (#339) 2018-11-21 16:50:03 -08:00
Jacob Perron
f39ac3cbe7 [rcl_action] Clean up CMakeLists.txt 2018-11-20 17:53:23 -08:00
Jacob Perron
ce8ac5eeec [rcl_action] Implement wait set functions for action server 2018-11-20 17:53:23 -08:00
Jacob Perron
acc974e43b
Add action server implementation (#323)
* Implement action server init, fini, and is_valid functions

* Add macros for initializing services and publishers

* Implement rcl_action_server_get_default_options()

* Implement rcl_action_accept_new_goal()

* Add function, rcl_action_server_goal_exists(), for checking if goal is already being tracked by an action server

* Add unit tests

* Implement rcl_action_server_get_goal_handles()

* Implement rcl_action_server_get_options()

* Implement rcl_action_server_get_action_name()

* Implement rcl_action_get_goal_status_array()

* Bugfix: reset pointers and size in type finalize functions
Also let finalize functions be called on already finalized objects

* Implement send/take functions for action server services

* Implement action server publishers for feedback and status

* Implement rcl_action_process_cancel_request()

* Add partial communication tests

* Define UUID_SIZE

* Use type-erased pointer for rcl_action_publish_status()

* Implement rcl_action_clear_expired_goals()
Introduce rcl_clock_t to action server implementation.

* Change internal goal handle array to be an array of pointers.

* Add check for invalid action names

* Do heap allocation of temporary array to satisfy MSVC compiler

* Bugfix: finalize node in test tear downs and reset expected errors

* Update documentation

* Update package.xml

* Pass in rcl_clock_t to action server
Rather than initializing internally.

* Do not finalize goal handles in expire function
Instead, leave it up to the caller to finalize goal handles.
Renamed the function to rcl_action_expire_goals.
2018-11-20 12:04:13 -08:00
Jacob Perron
d86d1c4135 Refactor actions wait set functions to leverage new wait set API 2018-11-20 10:04:49 -08:00
Jacob Perron
87d41f0808 [rcl] Output index in container when adding an entity to a wait set
This feature is useful when different libraries interact with the same wait set (e.g. rcl_action).
2018-11-20 10:04:49 -08:00
Steven! Ragnarök
b2177b2281 0.6.0 2018-11-19 06:22:36 -08:00
Michel Hidalgo
e59c14638d
Merge pull request #329 from ros2/hidmic/fix-empty-action-name
Makes rcl_action_get_*_name() functions check for empty action names.
2018-11-16 16:11:28 -03:00
Michel Hidalgo
f256da0a86
Merge pull request #319 from ros2/hidmic/action-client-implementation
Action client implementation
2018-11-15 13:42:08 -03:00
Michel Hidalgo
276aed1dff [rcl action] Addresses peer review comments (#329) 2018-11-14 19:33:21 -03:00
Michel Hidalgo
d77c9b6965 [rcl action] Makes rcl_action_get_*_name() functions check for empty action names. 2018-11-14 17:27:17 -03:00
Michel Hidalgo
c7e61834b4 [rcl action] Use macros instead of static function for action client impl. 2018-11-14 16:56:05 -03:00
Michel Hidalgo
78168bb52a [rcl action] Removes duplicate typedef in action_client header. 2018-11-14 15:54:32 -03:00
Ruffin
a2546fa0b0
Expand node_secure_root using local_namespace (#300)
* Expand node_secure_root using local_namespace

* rcutils_normalize_path -> rcutils_to_native_path

* correct comments and docblock

* node_root_norm -> node_root_path

* normalized -> native

* Adding TODOs for function reuse

* Adding Null check node_secure_root

* Adding override for ROS_SECURITY_NODE_DIRECTORY
Addressing https://github.com/ros2/sros2/issues/69

* Change from strcpy to memcpy

Signed-off-by: Ruffin White <roxfoxpox@gmail.org>
2018-11-13 14:13:24 -08:00
Jacob Perron
8b00791a56
[rcl_action] Add function to check if goal can be transitioned to CANCELING (#325)
* [rcl_action] Add function for checking if goal can be transitioned to CANCELING

Add unit tests for the new function rcl_action_goal_handle_is_cancelable(), as well as rcl_action_goal_handle_is_active().
2018-11-13 11:55:28 -08:00
Michel Hidalgo
629403e29d [rcl action] Fixes bad assertion in test_action_client. 2018-11-13 14:12:00 -03:00
Michel Hidalgo
f2afddc910 [rcl action] Cleanup CMake code for test_action_client. 2018-11-13 12:03:05 -03:00
Michel Hidalgo
0c31382165 [rcl action] Addresses peer review comments (#319).
* Remove redundant null check for given rcl_node_t pointer.
* Always deallocate rcl_action_client_t pimpl on finalization.
* Minor formatting fixes.
2018-11-13 10:53:04 -03:00
Michel Hidalgo
7efd1a15ae [rcl action] Adds action client tests. 2018-11-12 14:26:42 -03:00
Michel Hidalgo
cca18daad2 [rcl action] Fixes after changes introduced by (#310) 2018-11-12 13:59:50 -03:00
Michel Hidalgo
e2ee3c5475 [rcl action] Wait set support for action clients (restrictive). 2018-11-12 13:59:50 -03:00
Michel Hidalgo
89563623f7 [rcl action] Refactors action client error checking. 2018-11-12 13:59:50 -03:00
Michel Hidalgo
d1c3990f5d Addresses peer review comments (#319) 2018-11-12 13:59:50 -03:00
Michel Hidalgo
16205873ea [rcl action] Action client first implementation. 2018-11-12 13:59:47 -03:00
William Woodall
9351fd89c7
Move stdatomic helper to rcutils (#324)
* move stdatomic_helper* to rcutils

Signed-off-by: William Woodall <william@osrfoundation.org>

* refactor after moving stdatomic_helper.h to rcutils

Signed-off-by: William Woodall <william@osrfoundation.org>
2018-11-08 16:15:43 -06:00
Jacob Perron
5d12f54d13
Add subfolder argument to the ROSIDL_GET_SRV_TYPE_SUPPORT macro (#322) 2018-11-08 09:49:21 -08:00
Jacob Perron
e6985c0226 [rcl] Return appropriate error code when there is a bad allocation 2018-11-06 14:15:04 -08:00
Jacob Perron
48c168a5ca [rcl] Remove redundant error checking and set explicit error message with '_is_valid' functions 2018-11-06 14:15:04 -08:00
Jacob Perron
b2578bbbda
[rcl_action] Implement goal handle (#320)
* Add action goal handle implementation and unit tests
* Add check to goal state machine transition function for index out of bounds
2018-11-06 10:28:06 -08:00
Jacob Perron
1120b2f6a4 [rcl_action] Remove unnecessary 'target_link_libraries' macro 2018-11-02 12:41:13 -07:00
Jacob Perron
88eaa3a926 [rcl_action] Store allocator used for message initialization in the message struct
This relieves the user from providing the correct allocator when finalizing messages.
2018-11-02 12:41:13 -07:00
Jacob Perron
e64fcaf5a8 [rcl_action] Bugfix: check if number of elements to allocate for message is greater than zero 2018-11-02 12:41:13 -07:00