无人机避障——感知篇(接纳Livox-Mid360激光雷达获取点云数据显示)
电脑设置:Xavier-nx、ubuntu 18.04、ros melodic激光雷达:Livox_Mid-360
1、安装激光雷达驱动
下载安装Livox-SDK2
如果git clone不了,在github上下载相应的zip举行手动安装,安装网址如下:
https://github.com/Livox-SDK/Livox-SDK2
https://github.com/Livox-SDK/Livox-SDK2/blob/master/README.md
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd ./Livox-SDK2/
mkdir build
cd build
cmake .. && make -j
sudo make install 编译乐成 !!!
https://i-blog.csdnimg.cn/direct/33e73b057c88451fb8438609932847e4.png
[注意]:编译之后别忘记末了一条下令行 :sudo make install
https://i-blog.csdnimg.cn/direct/fbed8fbbb90240988baf4b1ab56246d1.png 下载安装Livox ROS Driver 2
https://github.com/Livox-SDK/livox_ros_driver2
git clone https://github.com/Livox-SDK/livox_ros_driver2.git ws_livox/src/livox_ros_driver2
cd ws_livox/src/livox_ros_driver2
source /opt/ros/melodic/setup.sh
./build.sh ROS1
编译乐成!!!
https://i-blog.csdnimg.cn/direct/0ae50fdc4e2b446497e84dbadd980fbf.png 2、通过ip地址链接Mid-360
ip地址:一般贴在雷达金属外壳的二维码下的SN数字的后两位,都是192.168.1.1网段,后两位加上就是ip地址,好比我的雷达后两位是51,因此我的ip地址就是192.168.1.151。
修改config文件中的ip地址:文件路径在/home/nvidia/ws_livox/src/livox_ros_driver2/config/MID360_config.json中
https://i-blog.csdnimg.cn/direct/70952586a7a74fdba5cfba982e7e3f5b.png
修改host_net_info中的ip地址为当前用来读取数据的上位机的ip地址,根据自身网络举行修改。
{
"lidar_summary_info" : {
"lidar_type": 8
},
"MID360": {
"lidar_net_info" : {
"cmd_data_port": 56100,
"push_msg_port": 56200,
"point_data_port": 56300,
"imu_data_port": 56400,
"log_data_port": 56500
},
"host_net_info" : {
"cmd_data_ip" : "192.168.1.209",
"cmd_data_port": 56101,
"push_msg_ip": "192.168.1.209",
"push_msg_port": 56201,
"point_data_ip": "192.168.1.209",
"point_data_port": 56301,
"imu_data_ip" : "192.168.1.209",
"imu_data_port": 56401,
"log_data_ip" : "",
"log_data_port": 56501
}
},
"lidar_configs" : [
{
"ip" : "192.168.1.151",
"pcl_data_type" : 1,
"pattern_mode" : 0,
"extrinsic_parameter" : {
"roll": 0.0,
"pitch": 0.0,
"yaw": 0.0,
"x": 0,
"y": 0,
"z": 0
}
}
]
}
3、运行launch文件
nvidia@Xavier-NX:~/ws_livox$ roslaunch livox_ros_driver2 rviz_MID360.launch https://i-blog.csdnimg.cn/direct/b578e9bb979a40ea99c03d0d31b0e54a.png
4、雷达点云效果
https://i-blog.csdnimg.cn/direct/60f4d5fba2554ff3ad5d74f2cee5fde4.png
[注意]:细节问题,网线一定要毗连稳定,因为我延长了激光雷达的网线,导致一段时间内不停没有点云信息,但是运行完launch文件以后又显示初始化乐成。 末了发现网线有问题,换一下就好了。
参考资料:
Livox_Mid-360激光雷达使用教程_livox mid360用户手册-CSDN博客
【Livox激光MID-360】调试记录_faster-lio mid360-CSDN博客
https://github.com/Livox-SDK/livox_ros_driver2
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]