Robotics StackExchange | Archived questions

ROS Multiple Subscriber Callback Inconsistency

Hello,

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.

Asked by basbursen on 2016-04-19 10:09:14 UTC

Comments

Answers

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 :) ).

Asked by Stefan Kohlbrecher on 2016-04-20 01:40:48 UTC

Comments

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)
loop.sleep() 

and then try publishing.

Asked by janindu on 2016-05-09 01:44:50 UTC

Comments