寫在前言:請認真閱讀mid360官方手冊,第一次配雷達ip真的很多坑
參考資料
mid360雷達sdk:https://github.com/Livox-SDK
Livox Viewer2:https://www.livoxtech.com/downloads
LIO-Livox:https://github.com/Livox-SDK/LIO-Livox
Livox-Mapping:https://github.com/Livox-SDK/livox_mapping
1、設(shè)置靜態(tài)ip
首先在Ubuntu20.04下將本機IP地址置于和雷達IP同一局域網(wǎng)下!不用改wifi的ip,改以太網(wǎng)的ip
sudo ifconfig
sudo ifconfig enp2s0 192.168.1.50 //將enp6s0換成雷達和電腦的以太網(wǎng)有線連接的名稱
或者在設(shè)置中修改以太網(wǎng)ip
2、雷達的廣播碼
!記住雷達的廣播碼,后面要用到
雷達的廣播碼在雷達后面,可以在雷達機身的QR 碼下面查看,共15位數(shù)
比如我的雷達廣播碼是47MDL1C0010159
3、下載SDK
查看官方簡介
Livox-SDK 和 livox_ros_driver: Drivers for receiving LiDAR data and more, support Lidar Mid-40, Mid-70, Tele-15, Horizon, Avia.
Livox-SDK2 和 livox_ros_driver2: Drivers for receiving LiDAR data and controlling lidar, support Lidar HAP and Mid-360.
!所以我們要下載Livox-SDK2 和 livox_ros_driver2
安裝Livox-SDK2:
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd ./Livox-SDK2/
mkdir build
cd build
cmake .. && make -j8
sudo make install
安裝livox_ros_driver2:
git clone https://github.com/Livox-SDK/livox_ros_driver2.git ws_livox/src/livox_ros_driver2
cd ws_livox
source /opt/ros/noetic/setup.sh
./build.sh ROS1
4、下載Livox Viewer2
https://www.livoxtech.com/downloads
正確連接雷達硬件并完成IP配置后運行指令./livox viewer.sh
啟動Livox Viewer2
如果沒有點云顯示,就是因為ip沒有設(shè)置正確,或者在Livox Viewer的設(shè)置按鈕中也可以設(shè)置ip
5、rviz顯示點云
!需要更改livox_ros_driver2/config/MID360_config.json文件內(nèi)參數(shù)
!需要更改livox_ros_driver2/launch_ROS1/msg_MID360.launch文件內(nèi)參數(shù)
!需要更改livox_ros_driver2/launch_ROS1/rviz_MID360.launch文件內(nèi)參數(shù)
HAP同理,改完后在rviz中查看點云數(shù)據(jù),注意!命令不一樣!是livox_ros_driver2!
roslaunch livox_ros_driver2 rviz_MID360.launch
!下面的ip改為雷達的"ip": 192.168.1.1** 最后兩位為雷達S/N碼最后兩位數(shù)字
其實雷達廣播碼可改可不改,默認也可以正常運行
文章來源:http://www.zghlxwxcb.cn/news/detail-422834.html
6、查看話題
$ rostopic list
/livox/imu
/livox/lidar
$ rostopic type /livox/lidar
sensor_msgs/PointCloud2
$ rostopic type /livox/lidar
livox_ros_driver2/CustomMsg
rviz_MID360.launch
會發(fā)送sensor_msgs/PointCloud2
話題類型的/livox/lidar,是rviz可以顯示的點云類型msg_MID360.launch
會發(fā)送livox_ros_driver2/CustomMsg
話題類型的/livox/lidar,是fast_lio要求輸入的數(shù)據(jù)類型文章來源地址http://www.zghlxwxcb.cn/news/detail-422834.html
xfer_format | launch文件 xfer_format 可修改話題類型 |
---|---|
0 | Livox pointcloud2(PointXYZRTLT) pointcloud format |
1 | Livox customized pointcloud format |
2 | Standard pointcloud2 (pcl :: PointXYZI) pointcloud format in the PCL library (just for ROS) |
到了這里,關(guān)于【3D激光SLAM】Livox-mid-360激光雷達ip配置的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!