Ask Your Question

rostopic echo shows wrong format of message from arduino

asked 2015-01-20 10:09:27 -0500

vd77 gravatar image

So I made a custom message: odometry_message: Header header int32 encoder1 int32 encoder2

Then I compile in into arduino sketchbook (rosrun rosserial_arduino make_libraries .) I run a python serial node on arduino, set up a publisher that publishes such messages. However when I user rostopic echo to show the message, it shows only two fields of a message: encoder1 encoder2. Also they are completely wrong. If I remove Header field form the message and recompile, everything is okay and the values are valid. Why can't rostopic echo display message in full format and why does adding header spoil the encoder values (issues w/serialization)?

Much thanks.

edit retag flag offensive close merge delete


This sounds like your messages were not synchronized properly. The messages for the arduino must be the same as the ROS messages. A first check would be rosmsg show your/msg and see if that is correct.

dornhege gravatar image dornhege  ( 2015-01-20 10:50:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-20 11:06:04 -0500

vd77 gravatar image

Okay, after 4 hours of pain I managed to get the result: I deleted the whole build folder in catkin workspace, made clean and rebuilt project from the ground. The wrong message format was cached somewhere deep.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-01-20 10:09:27 -0500

Seen: 129 times

Last updated: Jan 20 '15