* rename initial_parameters in NodeOptions to parameter_overrides
Signed-off-by: William Woodall <william@osrfoundation.org>
* rename automatically_declare_initial_parameters to automatically_declare_parameters_from_overrides
Signed-off-by: William Woodall <william@osrfoundation.org>
* some additional renames I missed
Signed-off-by: William Woodall <william@osrfoundation.org>
* add test for setting after declaring with parameter overrides
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup NodeOptions docs
Signed-off-by: William Woodall <william+github@osrfoundation.org>
Co-Authored-By: chapulina <louise@openrobotics.org>
* clarify relationship between allow_undeclared_parameters and parameter_overrides
Signed-off-by: William Woodall <william@osrfoundation.org>
* Add missing template functionality to lifecycle_node.
Recent changes to the node_parameters interface was accompanied by additions to the
node.hpp header and implementation files. However, these additions were not also made
to the corresponding lifecycle node files. This PR includes the changes required for
the lifecycle node.
Going forward, I suggest that any code like this that supplements the basic node interfaces
should either be factored out into a separate header that both node and lifecycle_node
include, or that the supplemental code simply be included in the appropriate node_interface
file directly, if possible. That way we can avoid code duplication and its symptoms which
is node and lifecycle_node getting out of sync (which they have several times).
Signed-off-by: Michael Jeronimo <michael.jeronimo@intel.com>
* consolidate documentation to just be in rclcpp/node.hpp
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix visibility macros
Signed-off-by: William Woodall <william@osrfoundation.org>
* deprecation methods that were also deprecated in rclcpp::Node
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup variable name
Signed-off-by: William Woodall <william@osrfoundation.org>
* add missing template method implementations
Signed-off-by: William Woodall <william@osrfoundation.org>
* add more methods that were not ported to lifecycle node originally
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix cpplint
Signed-off-by: William Woodall <william@osrfoundation.org>
* improve interoperability with rclcpp::Duration and std::chrono
Signed-off-by: William Woodall <william@osrfoundation.org>
* add to_rmw_time to Duration
Signed-off-by: William Woodall <william@osrfoundation.org>
* add new QoS class to rclcpp
Signed-off-by: William Woodall <william@osrfoundation.org>
* changes to NodeBase, NodeTopics, etc in preparation for changes to pub/sub
Signed-off-by: William Woodall <william@osrfoundation.org>
* refactor publisher creation to use new QoS class
Signed-off-by: William Woodall <william@osrfoundation.org>
* refactor subscription creation to use new QoS class
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixing fallout from changes to pub/sub creation
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixed Windows error: no appropriate default constructor available
why? who knows
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixed Windows error: could not deduce template argument for 'PublisherT'
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix missing vftable linker error on Windows
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix more cases of no suitable default constructor errors...
Signed-off-by: William Woodall <william@osrfoundation.org>
* prevent msvc from trying to interpret some cases as functions
Signed-off-by: William Woodall <william@osrfoundation.org>
* uncrustify
Signed-off-by: William Woodall <william@osrfoundation.org>
* cpplint
Signed-off-by: William Woodall <william@osrfoundation.org>
* add C++ version of default action qos
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixing lifecycle subscription signatures
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix allocators (we actually use this already in the pub/sub factory)
Signed-off-by: William Woodall <william@osrfoundation.org>
* suppress cppcheck on false positive syntax error
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix more cppcheck syntax error false positives
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix case where sub-type of QoS is used
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup get_node_topics_interface.hpp according to reviews and tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* additional fixes based on local testing and CI
Signed-off-by: William Woodall <william@osrfoundation.org>
* another trick to avoid 'no appropriate default constructor available'
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix compiler error with clang on macOS
Signed-off-by: William Woodall <william@osrfoundation.org>
* disable build failure tests until we can get Jenkins to ignore their output
Signed-off-by: William Woodall <william@osrfoundation.org>
* suppress more cppcheck false positives
Signed-off-by: William Woodall <william@osrfoundation.org>
* add missing visibility macros to default QoS profile classes
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix another case of 'no appropriate default constructor available'
Signed-off-by: William Woodall <william@osrfoundation.org>
* unfortunately this actaully fixes a build error on Windows...
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix typos
Signed-off-by: William Woodall <william@osrfoundation.org>
* 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>
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>
* 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>
* refactor init to allow for non-global init
Signed-off-by: William Woodall <william@osrfoundation.org>
* Update rclcpp/include/rclcpp/utilities.hpp
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
* Update rclcpp/include/rclcpp/utilities.hpp
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
* Update rclcpp/include/rclcpp/utilities.hpp
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
* Update rclcpp/src/rclcpp/utilities.cpp
Co-Authored-By: wjwwood <william+github@osrfoundation.org>
* refactor state into context objects and fix signal handling
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid nullptr access in error messages
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid exception in publish after shutdown was called
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix missing and unused headers
Signed-off-by: William Woodall <william@osrfoundation.org>
* cpplint
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixes found during testing
Signed-off-by: William Woodall <william@osrfoundation.org>
* address bug found in review comment
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixes and warnings fixed during testing
Signed-off-by: William Woodall <william@osrfoundation.org>
* addressing review comments
Signed-off-by: William Woodall <william@osrfoundation.org>
* ensure new ExecutorArgs are used everywhere
* [rclcpp] Add class Waitable
Provides a virtual API for interacting with wait sets.
* [rclcpp] Add node interface for Waitables
* [rclcpp] Implement node interface for Waitables
* [rclcpp] Integrate Waitable entities with executor
* Implement remaining logic for integrating Waitables
* Add visibility macros and other refactoring to Waitable class
* Return zero size for entities in a Waitable by default
* Bugfix: Clear list of waitable handles
* Bugfix: update Waitable handle list based on readiness
* Bugfix: update for loop condition
* Give node a node_waitables_
* Give lifecycle node a node_waitables
* Split ParametrVariant into Parameter and ParameterValue
* Test expects ParameterTypeException
* get_parameter_value() -> get_value_message()
* Make to_parameter() const and rename to to_parameter_msg()
* 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
* expand topic name before invoking count pub/sub
* convenience function for get_namespace()
* uncrustify
* typo
* add get_namespace() test
* add get_namespace() for lifecycle
* add /W4 flag for windows
* use uint8 like defined in messages: fix warning C4244
* fix sign size_t comparison
* add only pedantic, not W4, deal with windows another day
* another sign compare warning
* initial state machine implementation
(fix) correctly initialize default state machine
uncrustify
(dev) first high level api interface
src/default_state_machine.c
(fix) correctly initialize arrays in statemachine
(dev) deactivate/activate publisher demo
(dev) initial state machine implementation in rcl
* (dev) demo application for a managed lifecycle node
* add visibility control
* correct install of c-library
* fix compilation on windows
* refactoring of external/internal api
* (dev) generate static functions for c-callback
* (fix) correct typo
* (dev) cleanup for c-statemachine
(dev) cleanup for c-statemachine
* (dev) cpp callback map
* (dev) mv source file into project folders
* (dev) more helper functions for valid transition
* (dev) pimpl implementation for cpp lifecyclemanager
* (dev) register non-default callback functions
* (dev) cleanup lifecycle node to serve as base class
* (dev) new my_node child of lifecyclenode for demo purpose
update
stuff
(cleanup) remove unused comments
(fix) correct dllexport in windows
(fix) correctly install libraries
(fix) uncrustify
(dev) composition over inheritance
(dev) publish notification in state_machine transition
(dev) lifecycle talker + listener demo for notification
(dev) custom transition message generation
(dev) publish transition message on state change
(dev) correctly malloc/free c data structures
(fix) use single thread executor
(dev) use services for get state
(fix) set freed pointer to NULL
(dev) add change state service
(dev) introduce services: get_state and change_state in LM
(dev) asynchronous caller script for service client
(fix) correct dllexport for pimpl
(dev) correct constness
(dev) concatenate function for topic
(fix) uncrustify
prepare new service api
(tmp) refactor stash
(fix) correctly concatenate topics
(fix) correctly initialize Service wo/ copy
(dev) call both service types
extract demo files
(fix) remove debug prints
(dev) change to lifecycle_msgs
(refactor) extract rcl_lifecycle package
(refactor) extract lifecycle demos
(fix) address review comments
(fix) address review comments
(fix) pass shared_ptr by value
(fix) make find_package(rmw) required
(fix) return to shared node handle pointer
(refactor) attach sm to lifecycle node and disable lc_manager
(dev) construct service from existing rcl_service_t
(refactor) extract method for adding a service to a node
(fix) stop mock msgs from being installed
service takes rcl_node_t*
correct typo
add_service has to be public
uncrustify
initial state machine implementation
(fix) correctly initialize default state machine
uncrustify
(dev) first high level api interface
src/default_state_machine.c
(fix) correctly initialize arrays in statemachine
(dev) deactivate/activate publisher demo
(dev) initial state machine implementation in rcl
(dev) demo application for a managed lifecycle node
add visibility control
correct install of c-library
fix compilation on windows
refactoring of external/internal api
(dev) generate static functions for c-callback
(fix) correct typo
(dev) cleanup for c-statemachine
(dev) cleanup for c-statemachine
(dev) cpp callback map
(dev) mv source file into project folders
(dev) more helper functions for valid transition
(dev) pimpl implementation for cpp lifecyclemanager
(dev) register non-default callback functions
(dev) cleanup lifecycle node to serve as base class
(dev) new my_node child of lifecyclenode for demo purpose
update
stuff
(cleanup) remove unused comments
(fix) correct dllexport in windows
(fix) correctly install libraries
(fix) uncrustify
(dev) composition over inheritance
(dev) publish notification in state_machine transition
(dev) lifecycle talker + listener demo for notification
(dev) custom transition message generation
(dev) publish transition message on state change
(dev) correctly malloc/free c data structures
(fix) use single thread executor
(dev) use services for get state
(fix) set freed pointer to NULL
(dev) add change state service
(dev) introduce services: get_state and change_state in LM
(dev) asynchronous caller script for service client
(fix) correct dllexport for pimpl
(dev) correct constness
(dev) concatenate function for topic
(fix) uncrustify
prepare new service api
(tmp) refactor stash
* (dev) construct service from existing rcl_service_t
* service takes rcl_node_t*
* correct typo
* add_service has to be public
* uncrustify
* (fix) correctly concatenate topics
* (fix) correctly initialize Service wo/ copy
* (dev) call both service types
* extract demo files
* (fix) remove debug prints
* (dev) change to lifecycle_msgs
* (refactor) extract rcl_lifecycle package
* (refactor) extract lifecycle demos
* (fix) address review comments
(fix) address review comments
* (fix) make find_package(rmw) required
* (refactor) attach sm to lifecycle node and disable lc_manager
* (fix) adjust code to rcl_test refactor
* (dev) remove unused deps
* (rebase) merge commit
* (bugfix) correct rcl_ret_t error handling
* (fix) depedencies
* (refactor) change to lifecycle_msgs
* (fix) correct find_rcl
* (refactor) comply for new state machine
* visibility control and test api
* (rebase) change to new typesupport
* uncrustify'
* fix visibility control
* (fix) correct whitespace
* (fix) unused variable
* comparison signed and unsigned
* get_state returns complete state
* get_available_states service
* new service msgs
* get available states and transitions api
* (broken) state after rebase, does not compile demos
* fix the way lifecycle node impl is included
* fixed rebase compilation errors
* remove copy&paste comment
* remove empty line
* (test) register custom callbacks
* (dev) return codes
* style
* test for exception handling
* refacotr new state machine
* c++14
* change exception message for windows ci bug
change exception message for windows ci bug