ROS 2 rclcpp + rcl - jazzy  jazzy
ROS 2 C++ Client Library with ROS Client Library
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
rclcpp::SyncParametersClient Class Reference

Public Member Functions

template<typename NodeT >
 SyncParametersClient (std::shared_ptr< NodeT > node, const std::string &remote_node_name, const rmw_qos_profile_t &qos_profile)
 
template<typename NodeT >
 SyncParametersClient (std::shared_ptr< NodeT > node, const std::string &remote_node_name="", const rclcpp::QoS &qos_profile=rclcpp::ParametersQoS())
 
template<typename NodeT >
 SyncParametersClient (rclcpp::Executor::SharedPtr executor, std::shared_ptr< NodeT > node, const std::string &remote_node_name, const rmw_qos_profile_t &qos_profile)
 
template<typename NodeT >
 SyncParametersClient (rclcpp::Executor::SharedPtr executor, std::shared_ptr< NodeT > node, const std::string &remote_node_name="", const rclcpp::QoS &qos_profile=rclcpp::ParametersQoS())
 
template<typename NodeT >
 SyncParametersClient (NodeT *node, const std::string &remote_node_name, const rmw_qos_profile_t &qos_profile)
 
template<typename NodeT >
 SyncParametersClient (NodeT *node, const std::string &remote_node_name="", const rclcpp::QoS &qos_profile=rclcpp::ParametersQoS())
 
template<typename NodeT >
 SyncParametersClient (rclcpp::Executor::SharedPtr executor, NodeT *node, const std::string &remote_node_name, const rmw_qos_profile_t &qos_profile)
 
template<typename NodeT >
 SyncParametersClient (rclcpp::Executor::SharedPtr executor, NodeT *node, const std::string &remote_node_name="", const rclcpp::QoS &qos_profile=rclcpp::ParametersQoS())
 
RCLCPP_PUBLIC SyncParametersClient (rclcpp::Executor::SharedPtr executor, const rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base_interface, const rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr node_topics_interface, const rclcpp::node_interfaces::NodeGraphInterface::SharedPtr node_graph_interface, const rclcpp::node_interfaces::NodeServicesInterface::SharedPtr node_services_interface, const std::string &remote_node_name, const rmw_qos_profile_t &qos_profile)
 
RCLCPP_PUBLIC SyncParametersClient (rclcpp::Executor::SharedPtr executor, const rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base_interface, const rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr node_topics_interface, const rclcpp::node_interfaces::NodeGraphInterface::SharedPtr node_graph_interface, const rclcpp::node_interfaces::NodeServicesInterface::SharedPtr node_services_interface, const std::string &remote_node_name="", const rclcpp::QoS &qos_profile=rclcpp::ParametersQoS())
 
template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector< rclcpp::Parameterget_parameters (const std::vector< std::string > &parameter_names, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 
RCLCPP_PUBLIC bool has_parameter (const std::string &parameter_name)
 
template<typename T >
get_parameter_impl (const std::string &parameter_name, std::function< T()> parameter_not_found_handler)
 
template<typename T >
get_parameter (const std::string &parameter_name, const T &default_value)
 
template<typename T >
get_parameter (const std::string &parameter_name)
 
template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector< rcl_interfaces::msg::ParameterDescriptor > describe_parameters (const std::vector< std::string > &parameter_names, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 
template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector< rclcpp::ParameterType > get_parameter_types (const std::vector< std::string > &parameter_names, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 
template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector< rcl_interfaces::msg::SetParametersResult > set_parameters (const std::vector< rclcpp::Parameter > &parameters, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 
template<typename RepT = int64_t, typename RatioT = std::milli>
rcl_interfaces::msg::SetParametersResult set_parameters_atomically (const std::vector< rclcpp::Parameter > &parameters, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 
template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector< rcl_interfaces::msg::SetParametersResult > delete_parameters (const std::vector< std::string > &parameters_names, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 Delete several parameters at once. More...
 
template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector< rcl_interfaces::msg::SetParametersResult > load_parameters (const std::string &yaml_filename, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 Load parameters from yaml file. More...
 
template<typename RepT = int64_t, typename RatioT = std::milli>
rcl_interfaces::msg::ListParametersResult list_parameters (const std::vector< std::string > &parameter_prefixes, uint64_t depth, std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 
template<typename CallbackT >
rclcpp::Subscription< rcl_interfaces::msg::ParameterEvent >::SharedPtr on_parameter_event (CallbackT &&callback)
 
RCLCPP_PUBLIC bool service_is_ready () const
 
template<typename RepT = int64_t, typename RatioT = std::milli>
bool wait_for_service (std::chrono::duration< RepT, RatioT > timeout=std::chrono::duration< RepT, RatioT >(-1))
 

Static Public Member Functions

template<typename CallbackT , typename NodeT >
static rclcpp::Subscription< rcl_interfaces::msg::ParameterEvent >::SharedPtr on_parameter_event (NodeT &&node, CallbackT &&callback)
 

Protected Member Functions

RCLCPP_PUBLIC std::vector< rclcpp::Parameterget_parameters (const std::vector< std::string > &parameter_names, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::ParameterDescriptor > describe_parameters (const std::vector< std::string > &parameter_names, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC std::vector< rclcpp::ParameterType > get_parameter_types (const std::vector< std::string > &parameter_names, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::SetParametersResult > set_parameters (const std::vector< rclcpp::Parameter > &parameters, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::SetParametersResult > delete_parameters (const std::vector< std::string > &parameters_names, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::SetParametersResult > load_parameters (const std::string &yaml_filename, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC rcl_interfaces::msg::SetParametersResult set_parameters_atomically (const std::vector< rclcpp::Parameter > &parameters, std::chrono::nanoseconds timeout)
 
RCLCPP_PUBLIC rcl_interfaces::msg::ListParametersResult list_parameters (const std::vector< std::string > &parameter_prefixes, uint64_t depth, std::chrono::nanoseconds timeout)
 

Detailed Description

Definition at line 381 of file parameter_client.hpp.

Member Function Documentation

◆ delete_parameters()

template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector<rcl_interfaces::msg::SetParametersResult> rclcpp::SyncParametersClient::delete_parameters ( const std::vector< std::string > &  parameters_names,
std::chrono::duration< RepT, RatioT >  timeout = std::chrono::duration<RepT, RatioT>(-1) 
)
inline

Delete several parameters at once.

This function behaves like command-line tool ros2 param delete would.

Parameters
parameters_namesvector of parameters names
timeoutfor the spin used to make it synchronous
Returns
the future of the set_parameter service used to delete the parameters

Definition at line 657 of file parameter_client.hpp.

◆ load_parameters()

template<typename RepT = int64_t, typename RatioT = std::milli>
std::vector<rcl_interfaces::msg::SetParametersResult> rclcpp::SyncParametersClient::load_parameters ( const std::string &  yaml_filename,
std::chrono::duration< RepT, RatioT >  timeout = std::chrono::duration<RepT, RatioT>(-1) 
)
inline

Load parameters from yaml file.

This function behaves like command-line tool ros2 param load would.

Parameters
yaml_filenamethe full name of the yaml file
timeoutfor the spin used to make it synchronous
Returns
the future of the set_parameter service used to load the parameters

Definition at line 677 of file parameter_client.hpp.

◆ on_parameter_event()

template<typename CallbackT , typename NodeT >
static rclcpp::Subscription<rcl_interfaces::msg::ParameterEvent>::SharedPtr rclcpp::SyncParametersClient::on_parameter_event ( NodeT &&  node,
CallbackT &&  callback 
)
inlinestatic

The NodeT type only needs to have a method called get_node_topics_interface() which returns a shared_ptr to a NodeTopicsInterface, or be a NodeTopicsInterface pointer itself.

Definition at line 718 of file parameter_client.hpp.


The documentation for this class was generated from the following files: