Commit graph

17 commits

Author SHA1 Message Date
brawner
dd62d09042 Add fault injection macros and unit tests to rcl_lifecycle (#731)
* Add fault injection macros and unit tests to rcl_lifecycle

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

* Address feedback

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

* PR Fixup

Signed-off-by: Stephen Brawner <brawner@gmail.com>
2020-10-16 19:28:38 +02:00
brawner
7146919c3f
Increase rcl_lifecycle test coverage and add more safety checks (#649)
* Increase test coverage and add more safety checks

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

* More coverage

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

* Concatenating error messages

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>

* PR Fixup

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>

* Forgot a

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>

* PR Fixup

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>

* Moving var to top

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>

Co-authored-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
2020-05-22 14:44:11 -07:00
Dirk Thomas
4b9c0a30be
code style only: wrap after open parenthesis if not in one line (#565)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
2020-02-03 09:06:35 -08: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
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
Karsten Knese
77ef88a4f6
delete TRANSITION_SHUTDOWN (#313) 2018-10-31 19:19:45 -07:00
Karsten Knese
5e3d4be720
Lifecycle refactor (#298)
* no static initialization of states anymore

* make transition labels more descriptive

* introduce labeled keys

* define default transition keys

* fix memory management

* introduce service for transition graph

* export transition keys

* remove keys, transition id unique, label ambiguous

* semicolon for macro call
2018-10-11 14:03:41 -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
dhood
7d0045adb8
Add debug logging (#187)
* use ROS_PACKAGE_NAME in debug msgs

* rcl_lifecycle too

* Swap unnamed macros to named

* Remove semicolon

* Add debug logging

* Timer debug logging

* Wait debug

* A bit less wait debug...

* Clearer time output

* Remove the wait sublogger

* Use conditional logging instead of the else{}

* Add 'X finalized' msg

* Add send_response logging

* Remove extra semicolons

* Add publish/take messages

* [style nitpick] formatted variables on the next line
2017-11-21 17:23:50 -08:00
Dirk Thomas
ad044b509a reset expected error msg to avoid warning 2017-08-11 15:06:19 -07:00
Karsten Knese
3cff9020d1 replace rcl_lifecycle_ret_t with lifecycle_msgs__TRANSITION__CALLBACK* (#153) 2017-08-02 14:05:03 -07:00
Karsten Knese
5cdef527de remove fprintf, use logging macros (#152)
* remove fprintf, use logging macros

* consistent includes
2017-07-27 07:55:26 -07:00
Karsten Knese
c37bfec072 use rcl_allocator for rcl_lifecycle & namespaced topics (#142)
* use rcl_allocator for rcl_lifecycle

* correct return value interpretation

* fix unsigned comparison

* use namespace for lifecycle in-built topics

* linters
2017-06-16 14:44:06 -07:00
Karsten Knese
6fbfb4ee07 Warn unused (#139)
* add unused warning

* comply with unused warning

* add unused warning

* comply with unused warning

* remove wrongly modified files

* consistent include style
2017-05-25 19:52:25 -07:00
dhood
fc75c58962 Debug info for test_rcl_get_node_names (#133)
* Debug output for failed node_names test

* Give test nodes unique names

* Put test name in printout
2017-05-02 10:25:48 -07:00
William Woodall
64f1b16d2f add concept of node namespace to rcl API (#112)
* add concept of node namespace to rcl API

also validate node name and node namespace

* name_space -> namespace_

* doc clarification

* make use of rmw_validate_namespace()

* clear expected error messages in test_node.cpp

* avoid unused invalid_index

* include the validation result value when it is unknown

* use _snprintf_s on windows

* uncrustify
2017-04-08 02:04:51 -07:00
Karsten Knese
a18ef97e5a add rcl lifecycle
* (refactor) add rcl_lifecycle package

* (refactor) cleanup free calls

* (fix) initialize state machine with external node handle

* (dev) use external typesupport

* (fix) use external typesupport

* (fix) cleanup states

* (fix) no pointer comparison in state machine

* (test) refactor for rcl testing purpose

* (test) test suite for lifecycle sequence

* (dev) change to rcl_ret_t

* (test) wrong transition test

* (fix) dependency for isolated build

* (clean) remove std_msgs as a dep

* (fix) enable correct visibility control

* (fix) correct test for initialization

* (fix) correct visibility attributes

* (dev) change default value to lifecycle_msgs

* (clean) style and lifecycle prefix

* (dev) cmake macro get_rcl_lifecycle_information

* (cleanup) remove unused files'

* (cleanup) remove callback pointer

* (debug) add print state machine function

* (review) address review comments

* (bugfix) correct export in information.cmake

* (fix) correct visibility control

* (vcs) fix convertion from size_t to unsigned int

* (typo) fix internal struct name

* const correctness

* get_available_states service

* new service msgs

* tes for multiple instances

* (dev) return codes

* initial refactor

* test default sequence

* refactor state machine

* apply upstream changes

* c++14

* disable state machine print

* address review comments

* uncrustify

* fix comparison with unsigned warning
2016-12-14 09:28:54 -08:00