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

Revision history [back]

We think it's a good idea to define an array of geometry_msgs/Twist in a custom message.

geometry_msgs/Twist[] twists

and use it as follows

custom_msg::Twists msg;
msg.twists[0].linear.x = 0.1;
msg.twists[1].linear.x = 0.2;
// ...

Custom Message Definition Tutorial: http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv ...