Template Function as2_motion_controller_param_utils::readArray

Function Documentation

template<std::size_t N>
std::array<double, N> as2_motion_controller_param_utils::readArray(rclcpp::Node *node, const std::string &name)

Read a fixed-size double array parameter into std::array<double, N>.

The runtime size is checked against the compile-time N. A size mismatch is treated as fatal: the function logs RCLCPP_FATAL and throws rclcpp::exceptions::InvalidParameterValueException so the controller does not silently run with a half-configured solver.

Template Parameters:

N – Expected number of elements in the array.

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

  • name – Fully-qualified parameter name.

Returns:

Fixed-size std::array<double, N> with the values.