Pausing and unpausing gazebo [closed]
I need to be able to control hector_quadrotor (gazebo) using another one of my nodes.
What i exactly want :
- My node chooses a velocity for the quad to use
- My node tells hector_quadrotor to use this velocity using
/cmd_vel
- My node tells hector_quadrotor to start simulating physics for 1 second and give the outcome of the final positions.
- 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.
- My node reads the current positions, velocities, etc and chooses the next velocity it wants to set.
- 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.