rosbag record录制

1.topics 录制参数及语法

$ rosbag record --help  #显示详细参数及语法

Options:
  -h, --help            show this help message and exit
  -a, --all             record all topics
  -e, --regex           match topics using regular expressions
  -x EXCLUDE_REGEX, --exclude=EXCLUDE_REGEX
                        exclude topics matching the follow regular expression
                        (subtracts from -a or regex)

2.实例rosbag record topics


rosbag record /front_scan /scan /odom /imu -o 1 # -o 1 录制某个节点信息,且命名文件1
rosbag record -a -O $1 -x "/monitor/(.*)" # -x 过滤掉某个的“ ”topic,-a 录制其它所有的topic

3.查看bag包订阅的topics

$ rosbag info .ros/_2020-05-29-16-36-17_1.bag 
path:        .ros/cti_all_bag/_2020-05-29-16-36-17_1.bag
version:     2.0
duration:    2:59s (179s)
start:       May 29 2020 16:36:17.14 (1590741377.14)
end:         May 29 2020 16:39:17.13 (1590741557.13)
size:        56.6 MB
messages:    73953
compression: none [68/68 chunks

你可能感兴趣的:(ROS机器人)