Template Function grid_map::multiArrayMessageCopyToMatrixEigen

Function Documentation

template<typename EigenType_, typename MultiArrayMessageType_>
bool grid_map::multiArrayMessageCopyToMatrixEigen(const MultiArrayMessageType_ &m, EigenType_ &e)

Copies a ROS xxxMultiArray message into an Eigen matrix.

Template Parameters:
  • MultiArrayMessageType_ – a std_msgs::xxxMultiArray message (e.g. std_msgs::Float32MultiArray)

  • EigenType_ – an Eigen matrix with matching Scalar type as that of the multi-array message.

Parameters:
  • m[in] the ROS message to which the data will be copied.

  • e[out] the Eigen matrix to be converted.

Returns:

true if successful.