Commit graph

369 commits

Author SHA1 Message Date
Jacob Perron
f755c64de8
Fix error from uncrustify v0.68 (#364) 2018-12-21 10:06:28 -08:00
Shane Loretz
657d9e84c7 0.6.3 2018-12-13 17:09:47 -08:00
Shane Loretz
3b7c208bba
Set rmw_wait timeout using ros timers too (#357) 2018-12-13 15:50:37 -08:00
Steven! Ragnarök
e5df9aa428 0.6.2 2018-12-12 21:51:15 -08:00
William Woodall
c3c0789c7a
update docs about possibility of rcl_take no taking (#356)
* update rcl_wait doc with respect to subs and possibility of failing takes

* add a note about possible failing takes in rcl_take docs
2018-12-12 15:28:25 -08:00
Jacob Perron
f0aef34bd7 [rcl] Bugfix: ensure NULL timeout is passed to rmw_wait() when min_timeout is not set
Otherwise, there is a risk of integer overflow (e.g. in rmw_fastrtps) and rmw_wait() will wake immediately.
2018-12-11 11:07:41 -08:00
Steven! Ragnarök
3b101540a2 0.6.1 2018-12-06 21:58:54 -08:00
Nick Burek
228cd0082c Adding new cli parameters for configuring the logging. (#327)
* Adding new cli parameters for configuring the logging.

cr https://code.amazon.com/reviews/CR-3728503

* Moving the external logger library from rcutils into rcl. Also automatic uncrustify.

* Fixing issue with rebase

* Temporarily switching the default to noop logger ext_lib while system dependency issue is solved for Windows/Mac.

* Fixing the format2/3 xmllint issue.

* style changes, and one actual fix

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

* rename rc_logging* to rcl_logging*

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

* Expand rcl_logging_configure API with allocator

This is to make sure that this API is complete, and we can merge rcl#350 later without breaking the API at a later date.

* update logging.c with new use of allocator in API

* update init.c with new API changes

* Switching back to va_list for output handlers.

* address review comments

Signed-off-by: William Woodall <william@osrfoundation.org>
2018-12-06 17:47:56 -08:00
Ross Desmond
8d6fb9aab5 Add node graph api to rcl. (#333)
This is an omnibus rollup of all of the previous commits
from https://github.com/ros2/rcl/pull/333
2018-12-06 16:04:29 -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
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
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
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
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
William Woodall
4d8cb487f8
use new error handling API from rcutils (#314)
* use new error handling API from rcutils

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

* use semicolons after macros

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

* use new error handling API from rcutils

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

* minimize vertical whitespace

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

* use semicolons after macros

Signed-off-by: William Woodall <william@osrfoundation.org>
2018-11-01 21:08:31 -05:00
Jacob Perron
9d4b1c9912
Minor doc fixes (#305) 2018-10-08 18:50:24 -07:00
Chris Lalancette
3d0e2b7966
Add macro semicolons (#303)
* Add semicolons to all RCLCPP and RCUTILS macros.

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

* Add semicolons in Windows stdatomic_helper.h

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2018-10-05 17:30:27 -04:00
Shane Loretz
0a6d9186e8
Rcl timer with ros time (#286)
* rcl_wait() on timers with ROS clock

Timers handle time jump callbacks
rcl_wait() wakes when ros time gets a time after timer's next call time

* Set timer impl to NULL after fini
2018-09-13 09:28:12 -07:00
William Woodall
e5e338a8e0
typo (#297) 2018-09-11 17:39:39 -07:00
Dirk Thomas
a0f83b071a
ensure that timer period is non-negative (#295) 2018-09-06 18:36:28 -07:00
Dirk Thomas
16adb1e4f6
fix calculation of next timer call (#291)
* fix calculation of next timer call

* fix logic for period zero
2018-09-06 17:41:51 -07:00
Shane Loretz
e78e400018
Null deallocated jump callbacks (#294)
* Add failing test for add-remove-add callback

* Fix crash when adding callback after last was removed
2018-09-06 14:06:45 -07:00
Michael Carroll
f93072b1b8
Include namespaces in get_node_names. (#287) 2018-09-06 08:04:41 -05:00
William Woodall
7289d4a00a
Doc fixups (#288)
* remove vestigial parameter documentation

* fix parameter name typo

* small fixup
2018-08-31 18:32:27 -07:00
Shane Loretz
955c0c93da
Check if pointers are null before calling memset (#290) 2018-08-31 15:31:53 -07:00
Shane Loretz
ceff88b974
Clock has multiple time jump callbacks (#284)
* Clock has multiple time jump callbacks

Replaces pre_update and post_update
Adds callbacks when ROS time is activated or deactivated
Add rcl_clock_change_t, rcl_time_jump_t, rcl_jump_threshold_t
Add rcl_clock_add_jump_callback()
Add rcl_clock_remove_jump_callback()

* Fini generic clock after confirming correct clock type

* test_time no ASAN detections
2018-08-27 15:37:06 -07:00
Shane Loretz
ba9f24b852
consolidate wait set functions (#285)
* Consolidate functions to clear wait set

Add rcl_wait_set_clear()
Remove
  rcl_wait_set_clear_subscriptions()
  rcl_wait_set_clear_guard_conditions()
  rcl_wait_set_clear_clients()
  rcl_wait_set_clear_services()
  rcl_wait_set_clear_timers()

* Consolidate functions to resize wait set

Add rcl_wait_set_resize()
Removed
  rcl_wait_set_resize_subscriptions()
  rcl_wait_set_resize_guard_conditions()
  rcl_wait_set_resize_timers()
  rcl_wait_set_resize_clients()
  rcl_wait_set_resize_services()
2018-08-27 11:54:53 -07:00
Shane Loretz
3aebe9fbf9
ROS clock storage initially set to zero (#283) 2018-08-21 12:57:04 -07:00
Chris Ye
adc0190259 Fix deallocate issue of parameter_files (#279)
Correct pointer arithmetic on parameter_files to avoid deallocate memory out-of-bounds

Signed-off-by: Chris Ye <chris.ye@intel.com>
2018-08-16 11:21:28 -05:00
Dirk Thomas
1e5bf4ac29
initialize memory before sending a message (#277)
* initialize memory before sending a message

* add todo referencing ticket

* wrap todo
2018-08-14 16:58:30 -07:00
dhood
e2f7c26123
Set error message when clock type is not ROS_TIME (#275) 2018-08-03 13:21:26 -07:00
dhood
3356bd4cf1
Copy allocator passed in to clock init (#274)
* Store allocator passed in to clock init

* Linter fix
2018-08-01 11:24:13 -07:00
Dirk Thomas
b324f9de0d
initialize timer with clock (#272)
* initialize timer with clock

* use rcl_clock_get_now

* call rcl_clock_fini at the end of each test

* modify rcl_clock_get_now to take a rcl_time_point_value_t

* update docblock

* update to pass time_point_value

* add check for NULL

* add rcl_timer_clock()

* fix style

* doc fixes

* fini clock
2018-07-27 18:28:02 -07:00
Mikael Arguedas
d3a734f266
use test_msgs instead of std_msgs in tests (#270) 2018-07-17 13:24:39 -07:00
dhood
c21a250a06 Add regression test for node:__ns remapping (#263)
* Add regression test for node:__ns remapping

* Fix node:=__ns remapping

* Finalize node in remap integration test
2018-07-16 15:18:23 -07:00
Mikael Arguedas
16159adfc2
Uncrustify 0.67 (#266)
* fix indentation to comply with uncrusity 0.67

* fix spacing to comply with uncrusity 0.67
2018-07-11 08:31:06 -07:00
William Woodall
d13a902d9a 0.5.0 2018-06-25 14:38:04 -07:00
William Woodall
aa4ac7d06c changelogs 2018-06-25 14:36:46 -07:00
William Woodall
d63e2bc9cf
changes to support memory audit (#261)
* changes to rcutils_path_join()

* remove uses of malloc/realloc/calloc/free for allocator usage instead

* remove unused class members
2018-06-16 22:06:07 -07:00
William Woodall
8f744520bd use rcutils_format_string() rather than malloc and rcutils_snprintf() (#240) 2018-06-16 13:47:51 -07:00
Karsten Knese
99c05cf3b4
*_raw function (#170)
* publish_raw function

* rcl_take_raw function

* comply to master

* add documentation

* use rcl_subscription_is_valid

* documentation fixups

* address review comments

* raw->serialized
2018-06-16 10:35:46 +02:00
Mikael Arguedas
bb6ea4c124
use test_msgs instead of example_interfaces (#259) 2018-06-13 18:29:58 +02:00
dhood
639916df70
Add regression test for connext 'wrong type writer' error (#257)
* Add regression test for connext 'wrong type writer' error

* Use osrf_testing_tools_cpp
2018-06-12 09:27:02 -07:00
dhood
6c785ffeb3
Set default logger level from command line (#256)
* Set default logger level from command line

* Return INVALID_REMAP_RULE

* Add tests

* Do string parsing in rcutils

* Set log level after parsing all arguments

Less convenient but seems cleaner

* Document log arg format, custom return code

* Rename function

* Rename argument

* Refactor argument parsing after rebasing to include param files

* Renaming from param files support

* Doc fixup

* __log -> __log_level

* Use RCUTILS_SAFE_FWRITE_TO_STDERR on bad alloc

* doc fixup

* doc fixup

* Document behaviour if multiple __log_level rules found

* Update docblock formatting

* Label all documentation in arguments.c as internal
2018-06-12 08:11:25 -07:00
William Woodall
9a84b2d7a7
update to use new memory_tools from osrf_testing_tools_cpp (#238)
* remove old memory tools

* updates to use new memory_tools from osrf_testing_tools_cpp

* fixup new test

* fix lambda captures for Windows

* uncrustify fix

* extra_test_env -> rmw_implementation_env_var

* Stray extra_test_libraries

* Use default rmw impl outside of for_each_rmw_implementation loop

* style fixup

* fix typo
2018-06-12 00:13:21 -07:00