ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The rosbag wiki has the information. Assuming your pen drive is at /mnt/pen you can use either the -o or -O flag:

rosbag record -o /mnt/pen/ /chatter
rosbag record -O /mnt/pen/test.bag /chatter

The first case with lower-case -o will output a bag file with the timestamp at the location you specify. The second case with upper-case -O will output a bag file simply named test.bag at the location you specify (_without_ the timestamp on the filename).