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

Mavros publishes messages as bursts

asked 2017-02-23 17:07:35 -0500

janindu gravatar image

updated 2017-02-23 17:27:42 -0500


I have a pixhawk connected to an onboard computer over serial port (baud rate 57600). I get /mavros/local_position/odom at ~8 Hz. However, when I plot timestamps of the messages, I get a graph like this : /mavros/local_position/odom/x over timestamp

What I can see from here is that the odom messages come as bursts.

I'm looking for :

  1. What causes this?
  2. How can I get a smoother odom output?
  3. What additional information would be needed to isolate the problem?

Thank you!

edit retag flag offensive close merge delete


I have no experience whatsoever with mavros, but you could see whether is uses a buffer of some kind somewhere. Perhaps also check whether it's using TCP (instead of UDP) and Nagle is not turned off.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-24 00:38:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-24 00:59:46 -0500

janindu gravatar image

updated 2017-02-24 01:00:28 -0500

This is a bandwith issue. I had set stream rate to 30 Hz all messages. When I changed it to stream only position data, I got a smoother curve.

rosservice call /mavros/set_stream_rate 6 30 0

edit flag offensive delete link more

Question Tools



Asked: 2017-02-23 17:07:35 -0500

Seen: 262 times

Last updated: Feb 24 '17