I have a setup with a differential robot rolling in a simple environment. The robot is controlled by a ROS node and is simulated in Gazebo.
I am looking for a way to record the actual trajectory of the robot in the simulator and to be able to replay the same trajectory later.
I have already tried multiple solutions, but none of them worked well:
- rosbag record /tf -O tf.bag => rosbag play tf.bag
-- Doesn't work at all : robot don't moves
- rosbag record /gazebo/model_states -O gms.bag => rosbag play gms.bag /gazebo/model_states:=/gazebo/set_model_state
-- Error message concerning the data type
- rosbag record /cmd_vel -O vel.bag => rosbag play vel.bag
-- Record the commands sent to the robot controller, not the actual pose. So in the playback, the trajectory can be slightly different which is a problem for my application.
Is there any other way to record and replay a reference trajectory ?
↧