ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosserial arduino Serial Port read failure

asked 2014-06-13 08:28:38 -0500

honky gravatar image

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.

edit retag flag offensive close merge delete

Comments

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

al-dev gravatar image al-dev  ( 2014-06-13 09:20:12 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-06-13 11:15:32 -0500

honky gravatar image

updated 2014-06-13 11:16:14 -0500

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.

edit flag offensive delete link more

Comments

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

dmngu9 gravatar image dmngu9  ( 2015-07-20 05:38:14 -0500 )edit
0

answered 2016-09-02 01:40:58 -0500

bob gravatar image

I had this problem and found GORT which is a serial monitor program was the error. Just having GORT installed caused the connection to behave erratically so you have to completely uninstall gort and restart the computer

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-06-13 08:28:38 -0500

Seen: 2,764 times

Last updated: Sep 02 '16