Robotics StackExchange | Archived questions

Pausing and unpausing gazebo

I need to be able to control hector_quadrotor (gazebo) using another one of my nodes.

What i exactly want :

  1. My node chooses a velocity for the quad to use
  2. My node tells hectorquadrotor to use this velocity using `/cmdvel`
  3. My node tells hector_quadrotor to start simulating physics for 1 second and give the outcome of the final positions.
  4. After 1 second of simulation (may not be 1 second in real time) - hector_quadrotor pauses itself, and gives back the result of the step.
  5. My node reads the current positions, velocities, etc and chooses the next velocity it wants to set.
  6. Go back to step 2

I know of gazebo's services to pause and unpause physics - but I am unable to tell it to do it for a specific time.

I am using roscpp

Any help/direction of approach appreciated.

Asked by AbdealiJK on 2015-06-19 21:55:36 UTC

Comments

Answers

This is a duplicate of http://answers.ros.org/question/211795/synchronous-communication-with-gazebo/ , and the same answer there applies here: this should probably be a gazebo plugin, and you should ask about it on the gazebo forums.

Asked by ahendrix on 2015-06-21 03:27:11 UTC

Comments