Template Function as2_motion_controller_param_utils::readParam

Function Documentation

template<typename T>
T as2_motion_controller_param_utils::readParam(rclcpp::Node *node, const std::string &name)

Read a scalar parameter of type T from the node.

Specializations are provided for bool, int64_t, double and std::string. Throws rclcpp::exceptions::ParameterNotDeclaredException if the parameter was not declared, or rclcpp::ParameterTypeException on type mismatch.

Parameters:
  • node – Pointer to the ROS 2 node holding the parameters.

  • name – Fully-qualified parameter name.

Returns:

Parameter value of type T.