$ 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