* in progress broken test_time_source
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* style
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* test undeclared params
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* Only get parameter if it is set
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* doc fixup
Signed-off-by: William Woodall <william@osrfoundation.org>
* use override rather than virtual in places
Signed-off-by: William Woodall <william@osrfoundation.org>
* rename ParameterInfo_t to ParameterInfo and just use struct, no typedef
Signed-off-by: William Woodall <william@osrfoundation.org>
* add method to access ParameterValue within a Parameter
Signed-off-by: William Woodall <william@osrfoundation.org>
* enable get<Parameter> and get<ParameterValue> on Parameter class
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid const pass by value
Signed-off-by: William Woodall <william@osrfoundation.org>
* match type of enum in C++ to type used in message definition
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup after rebase
Signed-off-by: William Woodall <william@osrfoundation.org>
* more fixup after rebase
Signed-off-by: William Woodall <william@osrfoundation.org>
* replace create_parameter with declare_parameter
Signed-off-by: William Woodall <william@osrfoundation.org>
* provide implementation for templated declare_parameter method
Signed-off-by: William Woodall <william@osrfoundation.org>
* style
Signed-off-by: William Woodall <william@osrfoundation.org>
* do not use const reference when it's a primitive (like bool)
Signed-off-by: William Woodall <william@osrfoundation.org>
* typo
Signed-off-by: William Woodall <william@osrfoundation.org>
* follow to bool change that wasn't staged
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* added lots of docs, alternative API signatures, and some of the tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* more tests and associated fixes
Signed-off-by: William Woodall <william@osrfoundation.org>
* address documentation feedback
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup previously added tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* add tests and fixes for describe_parameter(s) and get_parameter_types
Signed-off-by: William Woodall <william@osrfoundation.org>
* remove old parameter tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* use const reference where possible
Signed-off-by: William Woodall <william@osrfoundation.org>
* address comments
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix tests for deprecated methods
Signed-off-by: William Woodall <william@osrfoundation.org>
* address feedback
Signed-off-by: William Woodall <william@osrfoundation.org>
* significantly improve the reliability of the time_source tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* uncrustify, cpplint, and cppcheck fixes
Signed-off-by: William Woodall <william@osrfoundation.org>
* Revert "significantly improve the reliability of the time_source tests"
This reverts commit 3ef385d8419c3f71cba91e622138583a91b2682a.
Signed-off-by: William Woodall <william@osrfoundation.org>
* only declare use_sim_time parameter if not already declared
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup rclcpp_lifecycle
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* add missing namespace scope which fails on Windows
Signed-off-by: William Woodall <william@osrfoundation.org>
* extend deprecation warning suppression to support Windows too
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix compiler warnings and missing visibility macro
Signed-off-by: William Woodall <william@osrfoundation.org>
* remove commented left over tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix compiler warning on Windows
Signed-off-by: William Woodall <william@osrfoundation.org>
* suppress deprecation warning on include of file in Windows
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid potential loss of data warning converting int64_t to int
Signed-off-by: William Woodall <william@osrfoundation.org>
* trying to fix more loss of data warnings
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix test_node
Signed-off-by: William Woodall <william@osrfoundation.org>
* add option to automatically declare parameters from initial parameters (yaml file)
Signed-off-by: William Woodall <william@osrfoundation.org>
* remove redundant conditional
Signed-off-by: William Woodall <william@osrfoundation.org>
Both, the `Executor::execute_any_executable` and the destructor for the `AnyExecutable` object used by the multithreaded executor, reset the `can_be_taken_from_` flag on a MutuallyExclusive group. This cause the variable to get out of sync and threads to process executables out of sequence.
This fix clears the callback group variable of the `AnyExecutable` instance effectively preventing its destructor from modifying the variable at the wrong time.
Issue: #702
Signed-off-by: Guillaume Autran <gautran@clearpath.ai>
* Created function to generate exception objects
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Created function to generate exception objects
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Fixed typo
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Fixed typo
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Throw exceptions not created by ret
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Throw exceptions not created by ret
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* convert throw_from_rcl_error to use from_rcl_error
Mostly just a convenience function
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Updated .gitignore
Please ignore
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Re-ordered functions to allow compilation
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* Revert "Updated .gitignore"
This reverts commit bee0ee13ce687bc56bdc7ad1e8382506d9aef428.
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* restore .gitignore to original state
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* oops, actually restore .gitignore
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
* logging, remove_const before comparison
This change removes the const value from the logger before
comparing with std::is_same.
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
* logging template, replace remove_const by remove_cv
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
* Append typename
Located after compiling rclcpp_action from source
Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
* Options-based create_publisher and create_subscription interfaces
Introduce new Options structs for creating publishers and subscribers. Deprecate existing interfaces for checking in CI how often they are used.
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
* Remove default params that resulted in ambiguous declarations.
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
* Remove one deprecation to limit upstream impact, add documentation on pub/sub options, slim down test lambdas character count
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
* Un-abbreviate Allocator in new interfaces/types, define a common Options specialization that doesn't need empty brackets
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
* Suppress cppcheck syntaxError for the one function
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
* Introduce rclcpp_components package
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Keep pointer to NodeWrapper vs NodeInterface.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Remove component registration from rclcpp
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Make topics names private-prefix.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Handle name and namespace with remap rules.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Linting.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Address reviewer feedback.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Change to smart pointers for managing memory.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Update to use rcpputils filesystem/split.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Address reviewer feedback and add docs.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Add tests around ComponentManager.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Lint.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Address reviewer feedback and add overflow check.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Fix CI.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
The two distinct operations of acquiring and subsequent checking of a
timer have to be protected by one lock_guard against races with other
threads. The releasing of a timer has to be protected by the same lock.
Given this requirement there is no use for a second mutex.
Signed-off-by: Marko Durkovic <marko@ternaris.com>
* when call wait for service in an while loop, the event will be make forever and never release
* fix it by: creating it when we need
Signed-off-by: reed-lau <geoliuwei@gmail.com>
* Fix flakey test
Signed-off-by: Pete Baughman <pete.baughman@apex.ai>
* Fix lint and uncrustify issues
Signed-off-by: Pete Baughman <pete.baughman@apex.ai>
* match renamed action types
* fix action type casting
* rename type/field to use correct term
* rename custom GoalID type to avoid naming collision, update types using unique_identifier_msgs
* remove obsolete comments
* change signature of set_succeeded / set_canceled
* change signature of on_terminal_state_(uuid_, result_msg);set_succeeded / set_canceled
* change signature of set_aborted
* change signature of publish_feedback
* update another test
There are getters for the other interfaces, but the logging interface
appears to have been overlooked.
Signed-off-by: Michael Jeronimo <michael.jeronimo@intel.com>
* Sub Node alternative
* Sub Node alternative
* Test // characters in namespaces
* Sub Node alternative
* Test // characters in namespaces
* Fixing style and warning in the order of initalizing members
* Fixing cases with / in different positions, and adding new tests
* Removing commented methods
* Changing extended_namespace to sub_namespace
* Fixed a bug when merging
* Fixed a bug when merging
* Sub Node alternative
* Sub Node alternative
* Test // characters in namespaces
* Fixing style and warning in the order of initalizing members
* Fixing cases with / in different positions, and adding new tests
* Removing commented methods
* Changing extended_namespace to sub_namespace
* Fixed a bug when merging
* Merge with origin to update branch
* improvements to API and documentation
Signed-off-by: William Woodall <william@osrfoundation.org>
* style and fixing tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup subnode specific tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* remove vestigial function
Signed-off-by: William Woodall <william@osrfoundation.org>
* improve documentation
Signed-off-by: William Woodall <william@osrfoundation.org>
* add test to check interaction between ~ and sub-nodes
Signed-off-by: William Woodall <william@osrfoundation.org>
* typo
Signed-off-by: William Woodall <william@osrfoundation.org>
* Start work on creaating NodeOptions structure.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Continue work on NodeOptions.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Update tests for NodeOptions impl.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Update documentation and copy/assignment.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Update rclcpp_lifecycle to conform to new API.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Use builder pattern with NodeOptions.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Documentation updates.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* Update rclcpp_lifecycle to use NodeOptions.
Signed-off-by: Michael Carroll <michael@openrobotics.org>
* change to parameter idiom only, from builder pattern
Signed-off-by: William Woodall <william@osrfoundation.org>
* Update rclcpp/include/rclcpp/node_options.hpp
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
Signed-off-by: William Woodall <william@osrfoundation.org>
* follow up with more resets of the rcl_node_options_t
Signed-off-by: William Woodall <william@osrfoundation.org>
* todo about get env
Signed-off-by: William Woodall <william@osrfoundation.org>
* Add in the ability to get parameters in a map.
Any parameters that have a "." in them will be considered to
be part of a "map" (though they can also be get and set
individually). This PR adds two new template specializations
to the public node API so that it can take a map, and store
the list of values (so setting the parameter with a name of
"foo" and a key of "x" will end up with a parameter of "foo.x").
It also adds an API to get all of the keys corresponding to
a prefix, and returing that as a map (so a get of "foo" will
get all parameters that begin with "foo."). Note that all
parameters within the map must have the same type, otherwise
an rclcpp::ParameterTypeException will be thrown.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Fix style problems pointed out by uncrustify/cpplint.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Move tests for set_parameter_if_not_set/get_parameter map to rclcpp.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Rename get_parameter -> get_parameters.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Add in documentation from review.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* added new constructors for sync parameter client
* sync param client now has raw ptr member instead of shared ptr
* fixed pointer style
* allow objects which do not inherit from node to create a sync parameters client
* use signal safe synchronization with platform specific semaphores
Signed-off-by: William Woodall <william@osrfoundation.org>
* addressed feedback and refactored into separate files
Signed-off-by: William Woodall <william@osrfoundation.org>
* Apply suggestions from code review
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
* include what you use (cpplint)
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid redundant use of SignalHandler::
Signed-off-by: William Woodall <william@osrfoundation.org>
* Update rclcpp/src/rclcpp/signal_handler.hpp
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
* fix Windows build
Signed-off-by: William Woodall <william@osrfoundation.org>
* actually fix Windows
Signed-off-by: William Woodall <william@osrfoundation.org>
Resolves#595
* Separate the Node Time Source from the Node Clock
* Implement initial value checking of use_sim_time parameter parameter
* Be sure to update all newly attached clocks
* Homogenizing the behavior to use the last received value otherwise zero time when enabling sim time.
* Add virtual destructors to interface classes
* [WIP] Refactor signal handling.
* fix deadlock
Signed-off-by: William Woodall <william@osrfoundation.org>
* finished fixing signal handling and removing more global state
Signed-off-by: William Woodall <william@osrfoundation.org>
* add missing include of <condition_variable>
* use unordered map in signal handling class
Signed-off-by: William Woodall <william@osrfoundation.org>
* use consistent terminology
Signed-off-by: William Woodall <william@osrfoundation.org>
* use emplace in map
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid throwing in destructor
Signed-off-by: William Woodall <william@osrfoundation.org>
* words
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid throwing from destructors in a few places
Signed-off-by: William Woodall <william@osrfoundation.org>
* make install/uninstall thread-safe
Signed-off-by: William Woodall <william@osrfoundation.org>