Function bitbots_utils::get_parameters_from_other_node

Function Documentation

std::map<std::string, rclcpp::Parameter> bitbots_utils::get_parameters_from_other_node(rclcpp::Node::SharedPtr own_node, const std::string &other_node_name, const std::vector<std::string> &parameter_names, const std::chrono::seconds &service_timeout)

Get the parameters from other node by calling the get_parameters service.

Parameters
  • own_node – The node that calls the service

  • other_node_name – The name of the node that provides the parameters

  • parameter_names – The names of the parameters to get

  • service_timeout – The timeout for the service call, if the service call takes longer than this the other node is not available

Returns

std::map<std::string, rclcpp::Parameter> A map of the parameters with the name as key