ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The snippet in my original post is basically how you initialize MultiArrays. Just push_back() a new std_msgs::MultiArrayDimension for each dimension and set it up according to the docs @Lorenz referenced.

Using resize(n, std_msgs::MultiArrayDimension()) should also work.