Commit graph

722 commits

Author SHA1 Message Date
Mikael Arguedas
e4b5c0bbb9
Byte array parameter rename (#428)
* rename bytes_value to byte_values

* adapt enum to new names

* rename byte_values to byte_array_values

* linters
2018-01-26 15:03:22 -08:00
jwang11
e08c80052a Move clear wait set from after rcl_wait to ahead (#427)
* Move clear wait set from after rcl_wait to ahead

Current code clear wait set after rcl_wait, it is not respond latency
friendly. In fact, clear wait set operation is not urgent, making sure it is
done before next rcl_wait should be fine.

Signed-off-by: jwang <jing.j.wang@intel.com>

* remove trailing whitespace
2018-01-18 18:49:52 -08:00
Ethan Gao
b81f55e5df Fix the dereference to NULL (#405)
* Fix the dereference to NULL
rmw_*_validation_result_string(validation_result) may return NULL,
and it's dereferenced by passing arg to NameValidationError

Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>

* address NULL case of undefined type

Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>

* Address the issue to deference to NULL with adapt
to the change of API rmw_*_validation_result_string

Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>

* revise the typo

* throw exception when valid rmw check but invalid rcl check

Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>
2018-01-09 06:02:23 +11:00
Sriram Raghunathan
2bf688827b Change rmw_count_publishers API, to rcl equivalent rcl_count_publishe… (#425)
* Change rmw_count_publishers API, to rcl equivalent rcl_count_publishers and remove the TODO line.

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

* Remove rmw_handle and refer to rcl_node_handle, change the API signature to topic_names.

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

* Use rcl_* specific functions to derive the fully qualified topic name.

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

* [nitpick] remove unnecessary variable storage
2017-12-19 19:45:58 -08:00
Ethan Gao
199a26984d Fix the potential application crash issues (#426)
* err msg

* err msg

* Fix the potential application crash issues

Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>

* minor tweak the code structure

Signed-off-by: Ethan Gao <ethan.gao@linux.intel.com>
2017-12-19 16:39:56 -05:00
Mikael Arguedas
bea1a52e24 0.4.0 2017-12-08 18:06:51 -08:00
Karsten Knese
3e0fa4be66
deallocate state and transition handles after call to fini (#424)
* deallocate state and transition handles after call to fini

* deallocate also when error occured
2017-12-06 17:26:18 -08:00
Karsten Knese
6d13bcb0fc
Fix 394 (#419)
* copy and assignment operator for state

copy and assignment operator for transition

remove unused const_casts

address comments

check for null in copy constructor

up

use init and fini functions from rcl

remove unused include

* explicitly zero initialize state and transitions

* add todo comment for follow up
2017-12-05 22:51:52 -08:00
Karsten Knese
c40f3c25c6
Fix 393 (#418)
* correctly copy state label

* correctly copy transition label

* uncrustify

* address comments

* up

* use init and fini functions from rcl
2017-12-05 20:22:57 -08:00
dhood
d823982f22
Allow logger to be passed into macros as a reference (#423)
* Remove reference for logger so it can be rclcpp::Logger &

This is the type when captured by reference in a lambda; windows can't
resolve it without.

* Wrap lines
2017-12-05 15:12:20 -08:00
dhood
6129a12df5
Remove namespaces and namespace escalation e.g. node:: (#416)
* Remove publisher:: namespace

* Remove subscription:: namespace

* Remove client:: namespace

* Remove service:: namespace

* Remove parameter_client:: namespace

* Remove parameter_service:: namespace

* Remove rate:: namespace

* Remove timer:: namespace

* Remove node:: namespace

* Remove any_service_callback:: namespace

* Remove any_subscription_callback:: namespace

* Remove event:: namespace

* Remove ContextSharedPtr escalation

Users can use the  directive themselves if they want

* Remove single_threaded_executor:: namespace

* Remove multi_threaded_executor:: namespace

* Remove context:: namespace

* node:: removal from new logger additions

* Fix linter issues that has been triggered with uncrustify

* Remove utilities:: namespace
2017-12-05 15:02:00 -08:00
Tully Foote
713ee8059c
Mirror clock API from Node to LifecycleNode (#417)
* Mirror clock API from Node to LifecycleNode

Follow up to #407

* adding headers for completeness
2017-12-05 00:25:28 -08:00
dhood
2e4e85f141
Add Logger class and give one to nodes (#411)
* Add Logger class and give one to nodes

* Try to improve compiler errors when non-Logger is passed to macros

* Add define for 'disabling' loggers

* Add/update tests

* Linter fix

* Documentation

* Windows fix

* Move free functions to source file (windows was upset)

* Fix windows by changing prototype ordering

* Store node logger in NodeBase

* Windows is not happy with this EXPECT_ANY_THROW

* Move get_logger to a NodeLogger interface

* Move Logger into 'logger' namespace

* Move helper function for macro errors into macro header

* Remove 'logger' namespace

* Return type on separate line

* Update copyright year

* Give lifecycle nodes a logger

* Add test for lifecycle node logger

Move the default_state_machine tests to another file because having
different test fixtures was causing init to be called twice.

* Switch to static_assert for logger check

* global ns scope in macro calls

just in case

* Revert "Add test for lifecycle node logger" (make diff smaller)

demos use the loggers and we don't test other node stuff in lifecycle_node

* Update for rcutils function name change

* Add reference to Node::get_logger() in doxygen

* Rename NodeLoggerInterface to NodeLoggingInterface
2017-12-04 16:07:29 -08:00
dhood
d989bd15c1
Prevent callback from being captured as a reference (#414) 2017-12-03 19:26:30 -08:00
dhood
bc47fa83dc
Rename severity_threshold -> level (#412) 2017-12-03 18:40:28 -08:00
dhood
8177771773
Allow creating parameter client from constructor of Node subclass (#413) 2017-12-03 17:12:43 -08:00
dhood
e9f0328ec8
Allow client to trigger another service call from its callback (#415) 2017-12-03 17:11:50 -08:00
Tully Foote
284dc17918
Add a clock interface to the Node API (#407)
node clock interface lower level abstraction
Update node and node interface to expose get_clock and now.
add unit tests to cover node clock API
2017-11-30 14:07:23 -08:00
dhood
3b06aa3721
Escalate more namespaces e.g. rclcpp::Service (#410) 2017-11-30 13:27:44 -08:00
Tully Foote
3426696541
provide a class to filter parameter events conveniently based on name and type of parameter event (#391)
adding test for parameter events filter
2017-11-29 11:11:18 -08:00
Mikael Arguedas
7bbf5f6e5b
waitset -> wait_set (#408)
* waitset -> wait_set

* cpplint

* use wait set in doc

* doc fixup
2017-11-27 13:30:07 -08:00
Tully Foote
5e64191e10
Resolve erase race condition. (#406)
Fixes #401

Extend time source tests to allocate and deallocate callback handlers.
2017-11-21 20:44:28 -08:00
Tully Foote
5e565c7e75
detach nodes from executors in destruction. (#404) 2017-11-21 11:42:44 -08:00
Hunter Allen
9be9d66da5
Remove const modifier to prevent compiler error for GCC 8. (#403) 2017-11-20 15:54:53 -05:00
Tully Foote
5c57de016f
work around windows failing debug test. Ticketing full debugging separately. (#402) 2017-11-19 20:09:41 -08:00
William Woodall
eed5999221
small doc touchup (#400) 2017-11-17 16:06:06 -08:00
Mikael Arguedas
e08428c79b
include cstdlib for std::abs function (#399) 2017-11-17 11:26:52 -08:00
Tully Foote
a215d2d22e
update rclcpp to use the refactored TimeSource Clock logic (#371)
This implements a TimeSource in rclcpp, adds the Clock class.
2017-11-16 17:26:56 -08:00
dhood
24f39700c6
Implement rclcpp-specific logging macros [taking name not object] (#389) 2017-11-15 14:14:09 -08:00
Karsten Knese
989084b3de move callback (#387) 2017-10-15 22:40:03 -07:00
G.A. vd. Hoorn
70d2b4b739 macros: fix two minor typos in doxygen. (#386) 2017-10-13 12:08:10 -07:00
G.A. vd. Hoorn
c182f5805e lifecycle: fix minor typo in LC pub Doxygen (#384) 2017-10-13 06:25:20 -07:00
Karsten Knese
022b2b1b80 sync parameter takes optional remote node name (#380) 2017-10-02 11:46:00 -07:00
Dirk Thomas
070b3125c1 Merge pull request #382 from ros2/remove_indent_off
remove obsolete INDENT-OFF usage
2017-09-29 14:24:31 -07:00
Dirk Thomas
c70f2f1452 Merge pull request #381 from ros2/uncrustify_master
update style to match latest uncrustify
2017-09-29 11:12:43 -07:00
Dirk Thomas
acd231abab remove obsolete INDENT-OFF usage 2017-09-29 10:34:52 -07:00
Dirk Thomas
38c750b876 update style to match latest uncrustify 2017-09-28 15:38:40 -07:00
Shane Loretz
e1f4568bc7 Fix static assertion on xcode 9 (#379)
* Change allocator type to match map key
2017-09-27 19:09:20 -07:00
William Woodall
5813ba54db use throw_from_rcl_error() for error state cleanup (#376) 2017-09-19 14:13:28 -07:00
William Woodall
ca5fb57126 Improvements to rclcpp::Time (#375)
* enable Time to be trivially constructible

This is required to use it in a Qt Signal/Slot.

* operator= should return T &

See: https://stackoverflow.com/questions/9072169/why-should-the-assignment-operator-return-a-reference-to-the-object

* add operator!=
2017-09-19 08:32:10 -07:00
dhood
4a2e9d8af9 Reset rcl errors (#374) 2017-09-14 11:03:24 -07:00
Dirk Thomas
ed26865b71 0.0.3 2017-09-13 15:07:07 -07:00
dhood
a8aa556df0 Check for the client error code, not server (#373) 2017-09-12 08:59:13 -07:00
Mikael Arguedas
b68b761462 restore . as parameter separator (#372) 2017-09-12 08:43:42 -07:00
Karsten Knese
1c42a75f43 parameter client takes node interfaces (#368)
* parameter client takes node interfaces

* correct wrong copy paste

* correctly fetch node name

* use node_topics_interface for creating parameter event

* fix typos
2017-09-05 15:04:36 -07:00
Karsten Knese
2c5ab49e7c change parameter separator to forward slash (#367)
* change parameter separator to forward slash

* add separator to prefix

* const char separator
2017-09-05 11:46:31 -07:00
Dirk Thomas
a5f94ac412 Merge pull request #369 from csukuangfj/fix-test-typo
fix a typo.
2017-09-04 08:22:42 -07:00
KUANG Fangjun
de14d54322 fix a typo. 2017-09-04 16:10:45 +02:00
Karsten Knese
b1ed15ebc7 use forward slashes instead of double underscores (#364)
* use forward slashes instead of double underscores

* define parameter service suffixes in commonly shared header

* style

* forgot list_parameters

* correct license year
2017-09-01 10:00:29 -07:00
Dirk Thomas
f175726b0e Merge pull request #366 from ros2/reset_error_code_init_failed
reset error code before throwing in rclcpp::utilities::init
2017-08-31 16:44:01 -07:00