* Remove a bunch of redundant nullptr assignments
* Fix some memory leaks
* Ensure source string is deallocated
* Remove redundant array size assignment
Signed-off-by: Scott K Logan <logans@cottsay.net>
* Added benchmark test to rcl_yaml_param_parser
Signed-off-by: ahcorde <ahcorde@gmail.com>
* reset heap counters
Signed-off-by: ahcorde <ahcorde@gmail.com>
* updated benchmark tests
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Added feedback
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Replace BENCHMARK_DEFINE_F and BENCHMARK_REGISTER_F with BENCHMARK_F
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Used rcpputils for the path
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Clean up the CMake dependencies
Signed-off-by: Scott K Logan <logans@cottsay.net>
* Updated test
Signed-off-by: ahcorde <ahcorde@gmail.com>
* udpated test name
Signed-off-by: ahcorde <ahcorde@gmail.com>
Co-authored-by: Scott K Logan <logans@cottsay.net>
* Fix yaml parser error when meets .nan
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Correct code style
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Modify as suggested
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Improve test
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Fix minor flaw
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Fix minor flaw again
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Satisfy windows CI
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Change the match rule for special float
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
Distinguish +.inf and -.inf
Signed-off-by: Ada-King <Bingtao.Du@sony.com>
* Remove unnecessary #include change.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Add in two more necessary includes.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Co-authored-by: Ada-King <Bingtao.Du@sony.com>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: Ada-King <Bingtao.Du@sony.com>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* Refactor parser.c for better testability (#754)
* Refactor rcl_yaml_param_parser for better testability
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Reorder parser.c to match parser.h
Signed-off-by: Stephen Brawner <brawner@gmail.com>
squash! Reorder parser.c to match parser.h
* Refactor yaml_variant.c for deduplication
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* ADD_VALUE_TO_SIMPLE_ARRAY for deduplication
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove fprintf
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Move headers to src directory
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Rebase #780
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Missing includes
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Use valid clock in case of issue in rcl_timer_init (#795)
* Use valid clock in case of issue
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Cleanup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* Store reference to rcl_clock_t instead of copy (#797)
rcl_clock_t can't be trivially copied because adding or removing clock
jump callbacks to a copy will free the pointer held by the original
instance.
Signed-off-by: Shane Loretz<sloretz@openrobotics.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Co-authored-by: brawner <brawner@gmail.com>
* Fix missing call fini() for lifecycle_transition and node in test_rcl_lifecycle
Signed-off-by: Barry Xu <barry.xu@sony.com>
* Fix error overwritten while allocator is Nullptr.
Signed-off-by: Barry Xu <barry.xu@sony.com>
* Optimize used variables
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Co-authored-by: Barry Xu <barry.xu@sony.com>
* Add bug fix for rcl_node_options_copy
If copy source has options->arguments.impl==NULL
this will cause problem when calling fini
on options dst
* Add test case for bug fix
* Return error when passing not init object
* Remove unexpected usage test
* Init options with non empty arguments
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
* Add tests for node_options usage
* Add tests for copying options arguments
* Add bad argument tests for wait sets
* Add tests for wait_set_get_allocator function
* Add test for rcl_take_response function
* Change take_request to match take_response without info
* Change specific test for sequence_number
* Add tests for client take failed
* Remove tests already done in nominal setup
* Add bad arguments tests
* Add test for init returning BAD_ALLOC
* Add test for client get_options
* Add test for already init client
* Add bad argument tests
* Add basic test get_default_domain_id
* Add test for rmw to rcl return code function
* Add test for get_localhost_only
* Add tests for localhost expected usage
* Address peer review comments
* Add test for env variable leading to ULONG_MAX
* Change return values to enum in test
* Fix rcl_get_localhost_only return value
* Address peer review comments
* Add unexpected value to get_localhost
* Add reset_rcl_error after expected fails
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
* Check for case RMW_LOCALHOST_ONLY_DISABLED in init_options
* Take init value from node context
* Convert enum variable to boolean
* Remove extra check
* Remove not needed reference and dereference
* Change rcl_get_localhost_only to match signature
* Add parenthesis to make clearer precedence
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
* Add action_server validity check, and remove dead code
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Increase test coverage of rcl_action
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Reorganizing impl structs into private header
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing PR Feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing memory error and PR feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
* transition start and goal states can be null
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
* correct tests
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
* Cleanup and address issues in parser.c
Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
squash! Cleanup and address issues in parser.c
* Increase test coverage of parser
Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
* PR Fixup
Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
* PR Fixup
Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
Co-authored-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
* 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>
* warn about unused return value for set_logger_level
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* revert change of RCL_UNUSED macro
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>