赞
踩
官方git安装Livox-SDK2和ROS Driver 2。
打开ROS Driver2工程,修改livox_ros_driver2/config/MID360_config.json文件内的参数中ip部分,cmd_data_ip改为192.168.1.50,下面的ip改为雷达的ip,192.168.1.1** 最后两位为雷达S/N码最后两位数字。
{ "lidar_summary_info" : { "lidar_type": 8 # protocol type index, please don't revise this value }, "HAP": { "device_type" : "HAP", "lidar_ipaddr": "", "lidar_net_info" : { "cmd_data_port": 56000, # command port "push_msg_port": 0, "point_data_port": 57000, "imu_data_port": 58000, "log_data_port": 59000 }, "host_net_info" : { "cmd_data_ip" : "192.168.1.5", # host ip (it can be revised) "cmd_data_port": 56000, "push_msg_ip": "", "push_msg_port": 0, "point_data_ip": "192.168.1.5", # host ip "point_data_port": 57000, "imu_data_ip" : "192.168.1.5", # host ip "imu_data_port": 58000, "log_data_ip" : "", "log_data_port": 59000 } }, "lidar_configs" : [ { "ip" : "192.168.1.100", # ip of the LiDAR you want to config "pcl_data_type" : 1, "pattern_mode" : 0, "blind_spot_set" : 50, "extrinsic_parameter" : { "roll": 0.0, "pitch": 15.0, #改变了雷达的姿态 "yaw": 0.0, "x": 0, "y": 0, "z": 0 } } ] }
连接雷达后输入下面指令查看ip配置是否成功
source ./devel/setup.bash
roslaunch livox_ros_driver2 msg_MID360.launch
如果运行如下命令后Rviz中没有显示点云数据,则有可能是雷达配置问题。
source devel/setup.sh
roslaunch livox_ros_driver2 rviz_MID360.launch
在livox_ros_driver2的上级目录src下保存fast-lio的工程
fast-lio2源码
问题一:编译报错,fast-lio源码使用的驱动是livox_ros_driver,而mid360使用的是livox_ros_driver2,二者数据结构有所不同。
解决编译问题:为使用mid360作为硬件输入修改源代码中的所有livox_ros_driver为livox_ros_driver2(包括.cpp .h 以及 package.xml),编译成功。
roslaunch livox_ros_driver2 msg_MID360.launch
在另一个终端中执行
roslaunch fast_lio mapping_mid360.launch
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。