自定义名-o,加参数$1
cti@cti-KL35:~$ ./st.sh shengty_11A_36
[ INFO] [1593572596.460562681]: Subscribing to /rs_filtered_points
[ INFO] [1593572596.476194742]: Subscribing to /rslidar_node/parameter_descriptions
[ INFO] [1593572596.488584302]: Subscribing to /rslidar_node/parameter_updates
[ INFO] [1593572596.499559868]: Subscribing to /rslidar_packets
[ INFO] [1593572596.505688639]: Subscribing to /rslidar_packets_difop
[ INFO] [1593572596.513256704]: Subscribing to /rslidar_points
[ INFO] [1593572596.518432993]: Recording to shengty_11A_36_2020-07-01-11-03-16.bag.
#!/bin/bash
## ./recored_data.sh [output_filename]
source /opt/cti/kinetic/setup.bash #加载环境
#选需要录制的topics
rosbag record \
/rs_filtered_points \
/rslidar_node/parameter_descriptions \
/rslidar_node/parameter_updates \
/rslidar_packets \
/rslidar_packets_difop \
/rslidar_points \
-o $1 # -o输出名字 $1参数