Recording and playing back data

roscore
rosrun turtlesim turtlesim_node 
rosrun turtlesim turtle_teleop_key

记录所有的topic

mkdir ~/bagfiles
cd ~/bagfiles
rosbag record -a

检查信息

rosbag info <your bagfile>

运行所记录的信息内容

rosbag play <your bagfile>

2倍频率运行

rosbag play -r 2 <your bagfile>

记录部分topic

rosrun turtlesim turtlesim_node 
rosrun turtlesim turtle_teleop_key

rosbag record -O subset /turtle1/command_velocity /turtle1/pose


你可能感兴趣的:(Recording and playing back data)