Commit graph

53 commits

Author SHA1 Message Date
Alejandro Hernández Cordero
e2dbc5d5d5
Added Quality declaration: rclcpp, rclpp_action, rclcpp_components andrclcpp_lifecycle (#1100)
* Added Quality declaration: rclcpp, rclpp_action, rclcpp_components, rclcpp_lifecycle

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feedback

Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-05-01 22:41:22 +02:00
Jacob Perron
1c943d16fc 0.9.0 2020-04-29 22:44:16 -07:00
brawner
e6325839f1
Increasing test coverage of rclcpp_action (#1043)
* Increasing test coverage of rclcpp_action

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Increasing test coverage of rclcpp_action

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>

* Fix warnings

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-04-29 14:25:52 -07:00
Dirk Thomas
45f3976453
export targets in a addition to include directories / libraries (#1096)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2020-04-27 10:30:33 -07:00
William Woodall
df3c2ffa8a
deprecate redundant namespaces (#1083)
* deprecate redundant namespaces, move classes to own files, rename some classes

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

* fixup

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

* address review comments

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

* fix ups since rebase

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

* avoid deprecation warnings from deprecated functions

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

* more fixes

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

* another fixup, after another rebase

Signed-off-by: William Woodall <william@osrfoundation.org>
2020-04-23 15:28:45 -07:00
Dirk Thomas
d62fce39bb
rename rosidl_generator_c namespace to rosidl_runtime_c (#1062)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2020-04-10 21:58:22 -07:00
Alejandro Hernández Cordero
c1a7a65537
Changed rosidl_generator_c/cpp to rosidl_runtime_c/cpp (#1014)
Signed-off-by: ahcorde <ahcorde@gmail.com>
2020-04-10 12:25:16 +02:00
Jacob Perron
e3949cb5ec
Fix unknown macro errors reported by cppcheck 1.90 (#1000)
It was complaining about an unknown macro RCLCPP_SMART_PTR_DEFINITIONS.
Passing rclcpp include directories to cppcheck resolves the errors
reported in rclcpp_action and rclcpp_lifecycle.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2020-03-04 09:05:21 -08:00
Alejandro Hernández Cordero
88ce87457c
[rclcpp_action] removed rosidl_generator_c dependency (#992)
* rclcpp_action removed rosidl_generator_cpp and rosidl_generator_c dependencies

Signed-off-by: Alejandro Hernández <ahcorde@gmail.com>

* rclcpp_action restored rosidl_generator_c dependency

Signed-off-by: Alejandro Hernández <ahcorde@gmail.com>

* rclcpp action alpha order CMakeLists.txt

Signed-off-by: Alejandro Hernández <ahcorde@gmail.com>
2020-02-27 18:25:10 +01:00
Jacob Perron
6ef23841f4
Fix typo in action client logger name (#937)
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-12-05 16:29:13 -08:00
Michael Carroll
2014385671
0.8.3
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-11-19 23:16:21 -06:00
astere-cpr
ecc39cace6 issue-919 Fixed "memory leak" in action clients (#920)
Whenever a call is made to `rclcpp_action::Client::wait_for_action_server`
a weak pointer to an Event object gets added to the graph_event_ vector
of the NodeGraph interface. This vector will be cleared on a node graph
change event, but if no such event occurs the weak pointer will be stuck
in the vector.  Furthermore, if client code issues repeated calls to
`wait_for_action_server` the vector will keep growing.

The fix moves the Event object creation right after the early return from
`wait_for_action_server` so that the Event object is not created in the
case that the server is known to be present and therefore there is no
need to wait for a node graph change event to occur.

Signed-off-by: Adrian Stere <astere@clearpath.ai>
2019-11-19 16:09:41 -03:00
William Woodall
a512d58a4f
0.8.2 2019-11-18 16:56:29 -08:00
William Woodall
64319062cd
changelogs
Signed-off-by: William Woodall <william@osrfoundation.org>
2019-11-18 16:56:14 -08:00
Michel Hidalgo
b92db52bb1
[rclcpp_action] Bump test_client timeout. (#917)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2019-11-12 19:15:38 -03:00
Shane Loretz
8cc2a9ba83 0.8.1
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
2019-10-23 17:25:23 -07:00
Steven Macenski
d83a947c26 template node type for rclcpp action server and clients (#892)
Signed-off-by: stevemacenski <stevenmacenski@gmail.com>
2019-10-16 18:31:36 -07:00
Michael Carroll
231b991098
Trait tests for generated actions (#853)
* Trait tests for generated actions

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

* Address reviewer feedback

Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-10-15 13:51:57 -05:00
Jacob Perron
8e69b7d505
[rclcpp_action] Do not throw exception in action client if take fails (#888)
As documented in rcl_action, a return code of RCL_RET_ACTION_CLIENT_TAKE_FAILED does not mean that
an error occurred.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-10-14 09:03:59 -07:00
Michael Carroll
b178c47134
0.8.0
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-09-26 14:11:36 -05:00
Chris Lalancette
9b47f36080
Fix UnknownGoalHandle error string. (#856)
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2019-09-18 17:52:49 -04:00
Jacob Perron
41a99b64d3
Guard against making multiple result requests for a goal handle (#808)
This fixes a runtime error caused by a race condition when making consecutive requests for the
result.
Specifically, this happens if the user provides a result callback when sending a goal and then
calls async_get_result shortly after.

Resolves #783

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-08-07 09:26:19 -07:00
Dan Rose
4a5eed968c Add line break after first open paren in multiline function call (#785)
* Add line break after first open paren in multiline function call

as per developer guide:
https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#open-versus-cuddled-braces
see https://github.com/ament/ament_lint/pull/148

Signed-off-by: Dan Rose <dan@digilabs.io>

Fix dedent when first function argument starts with a brace

Signed-off-by: Dan Rose <dan@digilabs.io>

Line break with multiline if condition
Remove line breaks where allowed.

Signed-off-by: Dan Rose <dan@digilabs.io>

Fixup after rebase

Signed-off-by: Dan Rose <dan@digilabs.io>

Fixup again after reverting indent_paren_open_brace

Signed-off-by: Dan Rose <dan@digilabs.io>

* Revert comment spacing change, condense some lines

Signed-off-by: Dan Rose <dan@digilabs.io>
2019-08-07 08:33:06 -07:00
Jacob Perron
c7d01d7bf3
Fix typo in test fixture tear down method name (#787)
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-07-18 14:49:42 -07:00
Jacob Perron
24080a458d 0.7.5 2019-05-30 17:31:20 -07:00
Michael Carroll
347f8d0b1d
0.7.4
Signed-off-by: Michael Carroll <michael@openrobotics.org>
2019-05-29 18:53:14 -05:00
Jacob Perron
131a11bba5
Guard against calling null goal response callback (#738)
Also make sure to invoke the goal response callback before the result callback.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-05-23 21:00:58 -07:00
William Woodall
1a662d46fb
0.7.3 2019-05-20 16:12:29 -07:00
William Woodall
4467ce9913
changelogs
Signed-off-by: William Woodall <william@osrfoundation.org>
2019-05-20 16:12:05 -07:00
William Woodall
ef41059a75
0.7.2 2019-05-08 17:27:05 -07:00
William Woodall
cfeb6a6360
changelogs
Signed-off-by: William Woodall <william@osrfoundation.org>
2019-05-08 17:25:59 -07:00
William Woodall
c769b1b030
change API to encourage users to specify history depth always (#713)
* improve interoperability with rclcpp::Duration and std::chrono

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

* add to_rmw_time to Duration

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

* add new QoS class to rclcpp

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

* changes to NodeBase, NodeTopics, etc in preparation for changes to pub/sub

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

* refactor publisher creation to use new QoS class

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

* refactor subscription creation to use new QoS class

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

* fixing fallout from changes to pub/sub creation

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

* fixed Windows error: no appropriate default constructor available

why? who knows

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

* fixed Windows error: could not deduce template argument for 'PublisherT'

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

* fix missing vftable linker error on Windows

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

* fix more cases of no suitable default constructor errors...

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

* prevent msvc from trying to interpret some cases as functions

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

* uncrustify

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

* cpplint

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

* add C++ version of default action qos

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

* fixing lifecycle subscription signatures

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

* fix allocators (we actually use this already in the pub/sub factory)

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

* suppress cppcheck on false positive syntax error

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

* fix more cppcheck syntax error false positives

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

* fix case where sub-type of QoS is used

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

* fixup get_node_topics_interface.hpp according to reviews and tests

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

* additional fixes based on local testing and CI

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

* another trick to avoid 'no appropriate default constructor available'

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

* fix compiler error with clang on macOS

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

* disable build failure tests until we can get Jenkins to ignore their output

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

* suppress more cppcheck false positives

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

* add missing visibility macros to default QoS profile classes

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

* fix another case of 'no appropriate default constructor available'

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

* unfortunately this actaully fixes a build error on Windows...

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

* fix typos

Signed-off-by: William Woodall <william@osrfoundation.org>
2019-05-08 14:24:40 -07:00
Jacob Perron
ecf35114b6
Add return code to CancelGoal service response (#710)
* Populate return code of CancelGoal service response

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

* Throw if there is an error processing a cancel goal request

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

* Make cancel callback signature consistent across cancel methods and add tests

Refactored the callback signature for canceling one goal. Now it is the same as the other cancel methods.
This makes it easier to communicate the error code to the user.

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

* Address review

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-05-02 15:25:15 -07:00
Steven! Ragnarök
d34fa607a2 0.7.1 2019-04-26 11:37:10 -07:00
Jacob Perron
02050c3901 Add optional cancel callback to asynchronous cancel goal methods
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-26 09:21:24 -07:00
Jacob Perron
1a0f8e3f28 Add optional result callback to async_get_result
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-26 09:21:24 -07:00
Jacob Perron
0da966b981 Use options struct for passing callbacks to async_send_goal
Now supports callbacks for the goal response and result.
This also makes it easier to incorporate action clients in composable nodes since we don't have to rely on waiting on futures.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-26 09:21:24 -07:00
Karsten Knese
60996d1e59
overload for node interfaces (#700)
* overload for node interfaces

Signed-off-by: Karsten Knese <karsten@openrobotics.org>

* remove new line

Signed-off-by: Karsten Knese <karsten@openrobotics.org>

* overload client for node iterfaces

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
2019-04-17 17:01:26 -05:00
Jacob Perron
68d0ac1e61
Rename action state transitions (#677)
* Rename action state transitions

Now using active verbs as described in the design doc:

http://design.ros2.org/articles/actions.html#goal-states

Connects to ros2/rcl#399.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-04-16 04:46:40 -07:00
Steven! Ragnarök
24769507d3 0.7.0 2019-04-14 13:11:48 -07:00
Emerson Knapp
83beaf8a3f Don't hardcode int64_t for duration type representations (#648)
In LLVM's `libcxx`, `int64_t` doesn't match chrono literals. See example below. To compile, run  `clang++-6.0 -stdlib=libc++ -std=c++14 TEST.cpp`

```
using namespace std::chrono_literals;

template<typename RatioT = std::milli>
bool
wait_for_service(
   std::chrono::duration<int64_t, RatioT> timeout
)
{
   return timeout == std::chrono::nanoseconds(0);
}

int main() {
   wait_for_service(2s);
   return 0;
}

```

Result of compilation
```
TEST.cpp:6:1: note: candidate template ignored: could not match 'long' against 'long long'
wait_for_service(
```

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
2019-03-12 18:32:41 -04:00
Jacob Perron
fce1d4b86f Add documentation to rclcpp_action
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-03-12 11:56:18 -07:00
Jacob Perron
b8b875228b Add Doxyfile for rclcpp_action
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
2019-03-12 11:56:18 -07:00
Michel Hidalgo
718d24f942 update to use separated action types (#601)
* match renamed action types

* fix action type casting

* rename type/field to use correct term

* rename custom GoalID type to avoid naming collision, update types using unique_identifier_msgs

* remove obsolete comments

* change signature of set_succeeded / set_canceled

* change signature of     on_terminal_state_(uuid_, result_msg);set_succeeded / set_canceled

* change signature of set_aborted

* change signature of publish_feedback

* update another test
2019-03-11 21:12:47 -07:00
Shane Loretz
3919ab1897
Wait for action server before sending goal (#637)
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
2019-02-22 10:30:21 -08:00
Jacob Perron
5c92811739 Refactor server goal handle's try_canceling() function (#603)
Makes use of rcl_action_goal_handle_is_cancelable() for one less rcl_action call.
2019-01-08 11:52:51 -08:00
Steven! Ragnarök
69d7e69957 0.6.2 2018-12-12 21:56:41 -08:00
Steven! Ragnarök
9da1b95ece 0.6.1 2018-12-06 22:12:26 -08:00
William Woodall
8bffd25746 add wait_for_action_server() for action clients (#598)
* add wait_for_action_server() for action clients

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

* Handle negative timeouts in wait_for_service() and wait_for_action_server() methods.

* Fix uncrustify errors.

* Ignore take failure on services for connext
2018-12-06 18:57:25 -08:00
Shane Loretz
ef2014ac4d
adapt to action implicit changes (#602) 2018-12-06 16:42:25 -08:00