Commit graph

711 commits

Author SHA1 Message Date
Jacob Perron
27b0428f7a
[rclcpp] Add class Waitable (#589)
* [rclcpp] Add class Waitable

Provides a virtual API for interacting with wait sets.

* [rclcpp] Add node interface for Waitables

* [rclcpp] Implement node interface for Waitables

* [rclcpp] Integrate Waitable entities with executor

* Implement remaining logic for integrating Waitables

* Add visibility macros and other refactoring to Waitable class

* Return zero size for entities in a Waitable by default

* Bugfix: Clear list of waitable handles

* Bugfix: update Waitable handle list based on readiness

* Bugfix: update for loop condition

* Give node a node_waitables_

* Give lifecycle node a node_waitables
2018-11-22 14:03:51 -08:00
Shane Loretz
be010cb2d5
Skeleton for Action Server and Client (#579)
* Skeleton for ActionServer and ActionClient
2018-11-21 09:16:51 -08:00
Jacob Perron
f212d73413
Update rcl_wait_set_add_* calls (#586)
Now the functions take an optional output index argument.
Refactored the graph listener usage of rcl_wait_set_add_guard_condition() to take advantage of the new API.
2018-11-20 11:02:13 -08:00
Steven! Ragnarök
c8f3fd3b0e 0.6.0 2018-11-19 07:47:26 -08:00
William Woodall
33a755c535
use new error handling API from rcutils (#577)
Signed-off-by: William Woodall <william@osrfoundation.org>
2018-11-01 21:08:54 -05:00
Karsten Knese
ec834d321b
delete TRANSITION_SHUTDOWN (#576) 2018-10-31 19:20:03 -07:00
Francisco Martín Rico
e30f31551e issue a warning if publishing on a not active publisher (#574)
* issue a warning if publishing on a not active publisher

* Adding a logger private member in LifecyclePublisher for avoiding creating a new one echa call
2018-10-27 17:35:17 -07:00
Francisco Martín Rico
b600c18121 Providing logging macro signature that accepts std::string (#573)
* Providing logging macro signature that accepts std::string

* - RCLCPP_ prefix to macros Add
- New tests added

* - Added doc to the functions and macros
- Functions declared as RCLCPP_PUBLIC

* - Small typo in doc corrected

* Fixed error when compiling with clang

* touch up docs
2018-10-25 15:49:38 -07:00
cho3
144c24c8fd Add SMART_PTRS_DEF to LifecyclePublisher (#569) 2018-10-11 17:33:41 -07:00
Karsten Knese
3353ffbb15
service for transition graph (#555)
* service for transition graph

* remove keys, transition id unique, label ambiguous

* semicolon for macro call
2018-10-11 14:03:57 -07:00
Chris Lalancette
bedb3ae361
Add virtual destructors to classes with virtual functions. (#566)
This fixes the build on MacOS High Sierra and later, and
is the more correct thing to do anyway.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2018-10-08 11:02:08 -04:00
Chris Lalancette
b3cbf06c09
Add semicolons to all RCLCPP and RCUTILS macros. (#565)
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2018-10-05 17:30:22 -04:00
Anis Ladram
eb439ddc73 Removing std::binary_function usage (#561)
Deprecated in C++11, removed in C++17
2018-10-02 09:49:17 +02:00
dhood
6ff3ff43fe
Don't auto-activate ROS time if clock topic is being published (#559)
* Don't auto-activate ROS time if clock topic is being published

* Destroy subscription when not needed, avoid re-creating it

* Additional tests

* Always reset pointer

* Initialise sub in initialiser list
2018-09-25 08:34:25 -07:00
Mikael Arguedas
f6c2f5ba0d use add_compile_options instead of setting only cxx flags 2018-09-20 11:13:23 -07:00
Shane Loretz
e8d3fdd56c
Fix cpplint on xenial (#556)
* Change variable name to fix cpplint on xenial

* Set variable to null to satisfy cpplint

* additional null
2018-09-20 09:19:45 -07:00
Chris Lalancette
be8c05ed9e
Implement get_parameter_or_set_default. (#551)
* Implement get_parameter_or_set_default.

This is syntactic sugar to allow the user to get a parameter.
If the parameter is already set on the node, it gets the value
of the parameter.  If it is not set, then it gets the alternative
value and sets it on the node, ensuring that it exists.

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

* Review fixes (one sentence per line).

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

* Rename get_parameter_or_set_default -> get_parameter_or_set

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2018-09-20 09:21:24 -04:00
Shane Loretz
b860b899e5
Add max_duration to spin_some() (#558)
With max_duration spin_some will execute work until it has spent more
time than the elapsed duration.
2018-09-17 15:51:15 -07:00
dhood
86cc8fdb3a
Output rcl error message when yaml parsing fails (#557) 2018-09-13 17:46:56 -07:00
dhood
80595f37d1
Link to ticket re rcl_yaml_param_parser avoiding circular dependency 2018-09-13 17:10:39 -07:00
Shane Loretz
b1af28047c
Make sure timer is fini'd before clock (#553)
* Make sure timer is fini'd before clock
2018-09-07 17:28:10 -07:00
Michael Carroll
8c6f38a0fa
Get node names and namespaces (#545)
* Rework to account for new get_node_names signiture.

* cpplint.

* Address reviewer feedback.
2018-09-06 08:02:44 -05:00
William Woodall
198c6daf49
Doc fixups (#546)
* add missing docs for number_of_threads parameter

* add missing docs for start_parameter_services parameter

* add missing docs for parameters, rename short variable name

* doc fixups
2018-08-31 18:32:20 -07:00
Shane Loretz
a55e320e6e
Use rcl_clock_t jump callbacks (#543)
* Use rcl_clock_t jump callbacks

Relieves rclcpp::TimeSource responsibility of calling jump callbacks.
2018-08-28 10:12:12 -07:00
Shane Loretz
4653bfcce6
Rcl consolidate wait set functions (#540)
* Use consolidated rcl_wait_set_clear()

* Use consolidated rcl_wait_set_resize()
2018-08-27 11:55:04 -07:00
Sagnik Basu
18ad26e654 Add TIME_MAX and DURATION_MAX functions (#538)
* Add TIME_MAX and DURATION_MAX functions

* Fix Linting Errors

* change funtion name as per coding style

* change function name as per coding style

* Update duration.cpp

* Update time.cpp

* Update test_duration.cpp

* Update time.hpp

* remove extra empty line
2018-08-27 11:44:25 -07:00
Karsten Knese
354d933870
publish shared_ptr of rcl_serialized_message (#541)
* publish shared_ptr of rcl_serialized_message

* const parameter
2018-08-24 14:34:51 -05:00
Dirk Thomas
25a9b4e339
add Time::is_zero and Duration::seconds (#536)
add Duration::seconds
2018-08-20 08:58:32 -07:00
Karsten Knese
45d74ba4dc
log error message instead of throwing exception in destructor (#535) 2018-08-17 10:17:37 -07:00
dhood
e409e44413
Relax tolerance of now test because timing affected by OS scheduling (#533) 2018-08-17 10:03:45 -07:00
Shane Loretz
6b34bcc94c
Remove incorrect exception on sec < 0 (#527)
* Remove incorrect exception on sec < 0
2018-08-09 09:23:33 -07:00
Shane Loretz
ea047655d8
Add rclcpp::Time::seconds() (#526)
* Get seconds since epoch as double
2018-08-08 16:04:35 -07:00
Dirk Thomas
4ddb76f466
construct TimerBase/GenericTimer with Clock (#523)
* construct TimerBase/GenericTimer with Clock

* pass rcl_time_point_value_t to rcl_clock_get_now

* update docblocks
2018-07-27 18:27:25 -07:00
chapulina
fba891c0df Implement rclcpp::is_initialized() (#522)
* Implement rclcpp::is_initialized()

* linter
2018-07-26 13:17:33 -07:00
dhood
8f2052d65a
Support jump handlers with only pre- or post-jump callback (#517)
* Add failing tests for partial jump handlers

* Code deduplication

* Check callbacks before calling them
2018-07-18 07:11:35 +10:00
Mikael Arguedas
3067a72a2a
nothing uses std_msgs anymore (#513) 2018-07-17 13:24:04 -07:00
Dirk Thomas
0ad17575a2
remove use of uninitialized CMake var (#512) 2018-07-11 14:08:09 -07:00
Mikael Arguedas
ae6f8e3e9a
Uncrustify 0.67 (#510)
* fix indentation to comply with uncrusity 0.67

* fix spacing before opening brackets

* space between reference and variable name in signature

* questionable space between pointer marker and variable name
2018-07-11 08:31:11 -07:00
Dirk Thomas
d36910d2d7
remove use of uninitialized CMake var (#511) 2018-07-10 16:51:09 -07:00
Sriram Raghunathan
93e2945802 Expose get_node_names API from node. (#508)
* Exposing get_node_names from node handle

Signed-off-by: Sriram Raghunathan <rsriram7@visteon.com>

* Exposing get_node_names from node handle for lifecycle_nodes

Signed-off-by: Sriram Raghunathan <rsriram7@visteon.com>

* Fix stray demangle type
2018-07-05 17:45:09 -07:00
Mikael Arguedas
4507d7a40b
Fix rosidl dependencies (#507)
* [rclcpp_lifecycle] remove rosidl deps as this package doesnt generate any messages

* depend on rosidl_typesupport_cpp
2018-07-05 13:01:23 -07:00
Dirk Thomas
1869b84a0c 0.5.1 2018-06-28 16:34:33 -07:00
William Woodall
a49281cff3
keep shared pointer reference to rcl_node handle for subscription fini (#505) 2018-06-27 13:37:49 -07:00
William Woodall
4d67a8671b 0.5.0 2018-06-25 16:31:01 -07:00
William Woodall
f5c3854585 changelogs 2018-06-25 16:30:51 -07:00
William Woodall
39c22c8508
typo (#502) 2018-06-19 12:43:06 -07:00
Michael Carroll
bf89dc0797
Further expand test tolerance to address flakiness. (#501)
* Further expand test tolerance to address flakiness.

* Remove newline.
2018-06-19 13:06:30 -05:00
William Woodall
62c8c5b762 executor could take more than once incorrectly (#383)
* Baseline test and force threads to yield.

* Add timer tracking for executor.

* Add locking and test happy-path exit conditions.

* Move logic to multi_threaded_executor

* Address reviewer feedback by reducing scope of set.

* Expand tolerance on testing.

* comment fixup

Otherwise it seemed to me like it would yield twice.
2018-06-18 22:46:28 -05:00
Karsten Knese
d33a46c3b6
comply to new subscription template (#500) 2018-06-19 00:20:55 +02:00
William Woodall
bfbb263f3c fix tests due to changes in rcutils (#452) 2018-06-16 13:48:01 -07:00