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

Hi Jack Thanks for your answer. I tried to encode my data to decimal character string. My python code is "D %d %d %d" % data1, data2, data3. Unfortunately, the string length is changing among 13, 16, and 19. It depended on value of the data*. I feel this is not the right way. So I took your second suggestion and published two msgs std_msgs/String msg and geometry_msgs/Vector3 to deal with cmd and data respectively. I just tested it out. It works well. thanks. A side notes that I chose Vector3 vs std_msgs/Int16MultiArray just because I could not figure out how to publish Int16MultiArray in python. It is headache. Do you have any thing about this? thanks a lot. Jayson