There's more…

rosbag compress is a command-line tool that is used for compressing bag files. Currently, there are two supported formats—BZ2 and LZ4. However, BZ2 is the default. We can get its uses and help by using the following command (refer to http://wiki.ros.org/rosbag/Commandline#compress for more information):

$ rosbag compress -h

And compress the given bag files using BZ2 as follows:

$ rosbag compress *.bag

Similarly, rosbag decompress is a command-line tool for decompressing bag files. Moreover, it automatically determines which compression format a bag uses. We can get the uses and help by using the -h option, as follows:

$ rosbag decompress -h

And decompress the given bag files using the following command:

$ rosbag decompress *.bag

We can also record all active topics in rosbag to analyze the system. However, we can exclude some of the topics such as point cloud or image topics from recording by using the -x option:

$ rosbag record -a -x ""/usb_cam/(.*)|/usb_cam_repub/theora/(.*)""

Moreover, rosbag records the file in chunks of a given size:

$ rosbag record -a --size=500 -x ""/usb_cam/(.*)|/usb_cam_repub/theora/(.*)""

Similarly, rosbag records the file in chunks of a given duration:

$ record -a --duration 2m --duration 10m -x ""/usb_cam/(.*)|/usb_cam_repub/theora/(.*)""
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.212.145