ROS 2 rclcpp + rcl - humble
humble
ROS 2 C++ Client Library with ROS Client Library
|
Implementation of the NodeParameters part of the Node API. More...
#include <rclcpp/node_interfaces/node_parameters.hpp>
Public Types | |
using | CallbacksContainerType = std::list< OnSetParametersCallbackHandle::WeakPtr > |
![]() | |
using | OnParametersSetCallbackType = OnSetParametersCallbackHandle::OnParametersSetCallbackType |
Public Member Functions | |
RCLCPP_PUBLIC | NodeParameters (const node_interfaces::NodeBaseInterface::SharedPtr node_base, const node_interfaces::NodeLoggingInterface::SharedPtr node_logging, const node_interfaces::NodeTopicsInterface::SharedPtr node_topics, const node_interfaces::NodeServicesInterface::SharedPtr node_services, const node_interfaces::NodeClockInterface::SharedPtr node_clock, const std::vector< Parameter > ¶meter_overrides, bool start_parameter_services, bool start_parameter_event_publisher, const rclcpp::QoS ¶meter_event_qos, const rclcpp::PublisherOptionsBase ¶meter_event_publisher_options, bool allow_undeclared_parameters, bool automatically_declare_parameters_from_overrides) |
RCLCPP_PUBLIC const rclcpp::ParameterValue & | declare_parameter (const std::string &name, const rclcpp::ParameterValue &default_value, const rcl_interfaces::msg::ParameterDescriptor ¶meter_descriptor=rcl_interfaces::msg::ParameterDescriptor{}, bool ignore_override=false) override |
Declare and initialize a parameter. More... | |
RCLCPP_PUBLIC const rclcpp::ParameterValue & | declare_parameter (const std::string &name, rclcpp::ParameterType type, const rcl_interfaces::msg::ParameterDescriptor ¶meter_descriptor=rcl_interfaces::msg::ParameterDescriptor(), bool ignore_override=false) override |
Declare a parameter. More... | |
RCLCPP_PUBLIC void | undeclare_parameter (const std::string &name) override |
Undeclare a parameter. More... | |
RCLCPP_PUBLIC bool | has_parameter (const std::string &name) const override |
Return true if the parameter has been declared, otherwise false. More... | |
RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::SetParametersResult > | set_parameters (const std::vector< rclcpp::Parameter > ¶meters) override |
Set one or more parameters, one at a time. More... | |
RCLCPP_PUBLIC rcl_interfaces::msg::SetParametersResult | set_parameters_atomically (const std::vector< rclcpp::Parameter > ¶meters) override |
Set one or more parameters, all at once. More... | |
RCLCPP_PUBLIC std::vector< rclcpp::Parameter > | get_parameters (const std::vector< std::string > &names) const override |
Get descriptions of parameters given their names. | |
RCLCPP_PUBLIC rclcpp::Parameter | get_parameter (const std::string &name) const override |
Get the description of one parameter given a name. | |
RCLCPP_PUBLIC bool | get_parameter (const std::string &name, rclcpp::Parameter ¶meter) const override |
Get the description of one parameter given a name. | |
RCLCPP_PUBLIC bool | get_parameters_by_prefix (const std::string &prefix, std::map< std::string, rclcpp::Parameter > ¶meters) const override |
Get all parameters that have the specified prefix into the parameters map. | |
RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::ParameterDescriptor > | describe_parameters (const std::vector< std::string > &names) const override |
RCLCPP_PUBLIC std::vector< uint8_t > | get_parameter_types (const std::vector< std::string > &names) const override |
RCLCPP_PUBLIC rcl_interfaces::msg::ListParametersResult | list_parameters (const std::vector< std::string > &prefixes, uint64_t depth) const override |
RCLCPP_PUBLIC RCUTILS_WARN_UNUSED OnSetParametersCallbackHandle::SharedPtr | add_on_set_parameters_callback (OnParametersSetCallbackType callback) override |
Add a callback for when parameters are being set. More... | |
RCLCPP_PUBLIC void | remove_on_set_parameters_callback (const OnSetParametersCallbackHandle *const handler) override |
Remove a callback registered with add_on_set_parameters_callback . More... | |
RCLCPP_PUBLIC const std::map< std::string, rclcpp::ParameterValue > & | get_parameter_overrides () const override |
Return the initial parameter values used by the NodeParameters to override default values. | |
Implementation of the NodeParameters part of the Node API.
Definition at line 82 of file node_parameters.hpp.
|
overridevirtual |
Add a callback for when parameters are being set.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 987 of file node_parameters.cpp.
|
overridevirtual |
Declare and initialize a parameter.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 471 of file node_parameters.cpp.
|
overridevirtual |
Declare a parameter.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 496 of file node_parameters.cpp.
|
overridevirtual |
Return true if the parameter has been declared, otherwise false.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 557 of file node_parameters.cpp.
|
overridevirtual |
Remove a callback registered with add_on_set_parameters_callback
.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 967 of file node_parameters.cpp.
|
overridevirtual |
Set one or more parameters, one at a time.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 565 of file node_parameters.cpp.
References set_parameters_atomically().
|
overridevirtual |
Set one or more parameters, all at once.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 591 of file node_parameters.cpp.
References rclcpp::Publisher< MessageT, AllocatorT >::publish(), and rclcpp::Parameter::to_parameter_msg().
Referenced by set_parameters().
|
overridevirtual |
Undeclare a parameter.
Implements rclcpp::node_interfaces::NodeParametersInterface.
Definition at line 532 of file node_parameters.cpp.