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

You also need to set the length of your array in the message you're publishing. I don't recall if there is an explicit rosserial tutorial with this information. But you can check a ros_lib message definition, e.g.: build/rosserial_tivac_tutorials/ros_lib/std_msgs/Int16MultiArray.h

There's a data_lengthfield in the message definition. It doesn't publish the data, because your data_length==0.

You're missing my_array.data_length = 8; before publishing.