0
$\begingroup$

Rosanswers logo

Hi, I've written a small sensor_msgs::Imu publisher on a arduino micro which works for a short time but crashes after some seconds with following status:

[INFO] [WallTime: 1402665675.175567] Note: publish buffer size is 512 bytes
[INFO] [WallTime: 1402665675.176102] Setup publisher on /imu_data [sensor_msgs/Imu]
[WARN] [WallTime: 1402665687.484972] Serial Port read returned short (expected 1 bytes, received 0 instead).
[WARN] [WallTime: 1402665687.485703] Serial Port read failure: 
[ERROR] [WallTime: 1402665699.934101] Lost sync with device, restarting...

I supposed this might be some buffer overflow, which is why I increased the nh.spinOnce() during the loop to no effect.

What does the message mean and how can I fix it? Thnx in advance.


Originally posted by honky on ROS Answers with karma: 51 on 2014-06-13

Post score: 0


Original comments

Comment by al-dev on 2014-06-13:
You can check how much RAM you actually use with avr-size, see here : http://answers.ros.org/question/11159/problem-setting-up-rosserial_arduino/ and the rosserial documentation : http://wiki.ros.org/rosserial/Overview/Limitations

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The library I used had some weird Serial.print()'s in the middle of the code which kinda scrambled the communication with ros. Removing them all fixed the problem.

Thanks to al-dev for the link in the comments, had been an interesting read anyhow.


Originally posted by honky with karma: 51 on 2014-06-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by dmngu9 on 2015-07-20:
i have the same problem: lost sync , port read failure. How did you solve it please? I passed a message with 3 float members to arduino mega and it seems lost sync error all the time

$\endgroup$

Your Answer

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