How do I send an array of int16's using rosserial
I am trying to use the std_msgs, and can' figure out how to send an array of int16.
i have set std_msgs::Int16 head;
I then try to assign the array to head head.data=array;
that doesn't work
I have tried std_msgs::Int16 head[22]; that doesn't work
How does one set up an array of integers as a message in ROS? I have looked in the documentation and can't find anything. Can someone please help me.
Please post your complete code, not just a couple of lines here and there.
Please provide more information. What do you mean "it doesn't work" ?. Does it compile? Does it communicate? Does it receive empty arrays?
Check out this question: http://answers.ros.org/question/22962...