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

Terminate called after throwing an instance of 'ros::serialization::StreamOverrunException'

asked 2016-03-18 08:19:29 -0500

Huan Qiu gravatar image

updated 2016-03-19 02:43:15 -0500

gvdhoorn gravatar image

Today, I meet a question. When the node is running, BufferOverrun occurs. My node throws the following exception:

terminnate called after throwing an instance of 'ros::serializetion::StreamOverrunEception'
what(): Buffer Overrun

Could somebody help me Thanks, Qiu.

edit retag flag offensive close merge delete

Comments

Can you post more description like (what is the type of your machine, the code generating the exception, the msg structure...). there are multiple causes for this exception and guessing dosen't help !

Captcha gravatar image Captcha  ( 2016-03-18 11:06:06 -0500 )edit

Hi MarcoPolo, My machine is a embedded computer motherboard, the cpu is Inter Celeron J1900,Base Frequency is 2 GHz, 4G RAM. The place throwing the exception is not located in my code. In my scan callback function, there is a while circulation, in circulation I monitor the tf and get a srv.

Huan Qiu gravatar image Huan Qiu  ( 2016-03-18 20:43:30 -0500 )edit

the srv is self-defined to get the new scan. When my program is running in the while circulation, the exception might occur. I do not know why and where the exception occurs. It confuses me for a few days. I am looking forward to your answers. Thanks.

Huan Qiu gravatar image Huan Qiu  ( 2016-03-18 20:46:45 -0500 )edit

2 Answers

Sort by » oldest newest most voted
5

answered 2016-03-21 03:18:58 -0500

Huan Qiu gravatar image

Thanks for MarcoPolo's help! Now the question has been solved. The reason is that the frequency of publishing a topic is so fast that lead to buffer overrun. When I increase buffer size ( make the param queue_size of advertise become bigger) or slow the frequency, the node will be ok!

edit flag offensive delete link more
0

answered 2016-03-20 06:10:11 -0500

Captcha gravatar image

I would guess that your machine (and most of the embedded platforms) is configured to run big-endian. The ROS communication protocol uses little-endian on the wire and as far as I know, roscpp's seralizer (if you are coding with roscpp) doesn't account for running on a big-endian host.

But you can likely work around your problem by configuring your machine to run as little-endian instead of big-endian. There's usually a way to do that.

So, just to check whether this is your problem or not, try first to run your code on a laptop ? if it works, then you have the diagnosis ! Keep me updated :)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-18 08:19:29 -0500

Seen: 7,198 times

Last updated: Mar 21 '16