ROS(015: Recording and playing back data)

$ roscore

$ rosrun turtlesim turtlesim_node

$ rosrun turtlesim turtle_teleop_key

$ rostopic list -v

$ mkdir ~/bagfiles

$ cd ~/bagfiles

$ rosbag record -a

$ rosbag info <your bagfile>

$ rosbag paly <your bagfile>

$ rosbag play -r 2 <your bagfile>

 

$ rosrun turtlesim turtlesim_node

$ rosrun turtlesim turtle_teleop_key

$rosbag record -O subset /turtle1/cmd_vel /turtle1/pose

 

 

Ref:

http://wiki.ros.org/ROS/Tutorials/Recording%20and%20playing%20back%20data

打赏