Unpausing and controlling robot from one ROS message
Hey,
I'm new to plugins programming with Gazebo and I'd like some hints/help on own I make Gazebo to behave like I want.
I currently have Gazebo running with gazebo_ros and a ROS node able to spawn and delete models to the world. One of the models is a differential drive robot and the simulation is paused. I would like to be able to send a single Twist message on a ROS topic to perform two actions : apply velocities to the robot and run the simulation for a constant amount of time steps.
I don't really need it to work with a single message but the issue I always run into is that I can't apply velocities when paused, and unpausing before applying speeds would lead to inconsistent behavior because i don't control the time during which the robot moves at the applied speed.
What I've tried:
I created a ROS node that iterate the simulation for X time-steps when paused, but it can't control the robot
I tried to use the diff_drive_plugin
to control the robot but it can't receives messages when the simulation is paused. If i send the message then iterate over a few time-steps, the message is not catched, ie. it's not buffered when the simulation is paused.
I tried writing a custom Model plugin but same issue
Thanks for your help. Feel free to ask any additional details.