1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| # 下载下来 cd ~/catkin_ws/src git clone https://ghproxy.com/https://github.com/peitianyu/bag2txt cd .. && catkin_make # 修改launch文件,并运行 <launch> <node name="odom2txt" pkg="ros_data2txt" type="odom2txt" respawn="false" output="screen" > <param name="file_name" type="string" value="/mnt/d/file_ws/Learning/ros/bag2txt_ws/log/9_2_odom.txt"/> // 修改 <param name="topic_name" type="string" value="/odom"/> </node>
<node name="laser_scan2txt" pkg="ros_data2txt" type="laser_scan2txt" respawn="false" output="screen" > <param name="file_name" type="string" value="/mnt/d/file_ws/Learning/ros/bag2txt_ws/log/9_2_scan.txt"/> // 修改 <param name="topic_name" type="string" value="/scan"/> </node>
<node name="playbag" pkg="rosbag" type="play" args="--clock /mnt/d/file_ws/Learning/ros/bag2txt_ws/bag/scan_odom_2022_9_2.bag" /> // 修改 </launch>
# 运行 roslaunch ros_data2txt bag2txt.launch 自动生成
|