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

ROS Multiple Subscriber Callback Inconsistency

asked 2016-04-19 10:09:14 -0500

basbursen gravatar image


I am trying to control 8 hector quadrotors in gazebo using one node as command-giver.There are 8 subscribers for position topics of quadrotors.Depending on the positions, I give velocities.But there is a problem.In one run every quadrotor respond, in another one just 2 respond and in another just 1 responds.I think there is an issue with callback mechanism.

Did anyone encounter an issue like this?

I am running the code in Ubuntu installed on a virtual machine.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-05-09 01:44:50 -0500

janindu gravatar image

Publishers and subscribers take a bit of time to setup. I have faced with a situation where my publisher publishes before the subscriber is up and running. Make sure all your subscribers are up and running with something like the following

ros::Rate loop(0.5)

and then try publishing.

edit flag offensive delete link more

answered 2016-04-20 01:40:48 -0500

This sounds like it could be a problem with publisher or subscriber queue sizes. Can you try increasing those and see if things improve? (Please edit original question or add a comment, do not post an Answer in reponse :) ).

edit flag offensive delete link more

Question Tools



Asked: 2016-04-19 10:09:14 -0500

Seen: 177 times

Last updated: May 09 '16