0
$\begingroup$

Rosanswers logo

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.


Originally posted by vd77 on ROS Answers with karma: 38 on 2015-01-20

Post score: 0


Original comments

Comment by dornhege on 2015-01-20:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by vd77 with karma: 38 on 2015-01-20

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.