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

rosserial_arduino avoid lost messages

asked 2014-11-24 10:14:18 -0500

Wedontplay gravatar image

Hi, i'm using rosserial_arduino package to communicate with my robot hardware. I'm noticing that some messages are lost in both ways (Arduino->Desktop & Desktop->Arduino) I'm not publishing at high speed, to be more precise messages are sent with several seconds interval between them.

Is there a way to make message delivery guaranteed? I can wrap messages in services and use the service responses as aknowledges for but it sounds pretty ugly.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-24 18:27:53 -0500

Wedontplay gravatar image

After some "in depth" debugging I discovered that in my case the problem was caused by a buffer overflow on arduino serial rx buffer. In this case higher baud rates increase the problem :) Is easy to modify the buffer size on arduino source though.

edit flag offensive delete link more

answered 2014-11-24 17:56:07 -0500

Wes G gravatar image

I'm going through something similar with my project. I suggest upping the baud rate (this answer explains how to do that), making sure you aren't sending or receiving too much data and limit the publishing rate to the minimum. I'm exploring the limits of the Arduino MEGA with my current system and with the different encoders, sensors and motor outputs, I may have to move to a second Arduino in the future.

edit flag offensive delete link more

Question Tools



Asked: 2014-11-24 10:14:18 -0500

Seen: 569 times

Last updated: Nov 24 '14