Livox-mid-360录制的.lvx2文件转化为.bag文件(TBC)
起初在CSDN上找了一些博文,试了之后都不行(可能大部分都是针对.lvx文件的,而我要转.lvx2),中间尝试问gpt,他提供了创建lauch文件的方法(试了也不行,在此贴出来仅供参考):
1、新建一个配置文件
~/catkin_ws/src/livox_ros_driver2/config/lvx_play.json
:{"lidar_config": {"data_src": 2,"lvx_file_path": "/home/huang/Data/2025-09-19_16-03-08.lvx2","publish_freq": 10.0,"frame_id": "livox_frame"} }
2、修改
lvx_to_rosbag.launch
,让节点加载这个配置文件:~/catkin_ws/src/livox_ros_driver2/launch/lvx_to_rosbag.launch:
<launch><!-- 参数 --><arg name="config_path" default="$(find livox_ros_driver2)/config/lvx_play.json"/><arg name="rosbag_enable" default="true"/><arg name="bag_dir" default="/home/huang/Data"/><!-- 播放 .lvx2 文件 --><node name="livox_lidar_publisher" pkg="livox_ros_driver2"type="livox_ros_driver2_node" output="screen">