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 movesrosbag record /gazebo/model_states -O gms.bag
=>rosbag play gms.bag /gazebo/model_states:=/gazebo/set_model_state
: Error message concerning the data typerosbag record /cmd_vel -O vel.bag
=>rosbag play vel.bag
The last option is the best for now, but it records 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 ?
Originally posted by kubiack on ROS Answers with karma: 36 on 2014-10-29
Post score: 1