为什么需要 rviz_MID360_launch.py
Livox MID360 + RViz2 可视化 · CustomMsg vs PointCloud2
Livox MID360
RViz2 可视化
CustomMsg
PointCloud2
ROS2 Humble
问题
启动 Livox MID360 后:
ros2 launch livox_ros_driver2 msg_MID360_launch.py
LiDAR 话题以 Livox CustomMsg 格式发布:
ros2 topic type /livox/lidar
livox_ros_driver2/msg/CustomMsg
警告 RViz2 的 PointCloud2 显示期望 sensor_msgs/msg/PointCloud2,因此无法直接显示 Livox 自定义消息。
通过 解决方案
cd ~/slam_ws
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch livox_ros_driver2 rviz_MID360_launch.py
通过 该 launch 文件将
通过 并自动打开 RViz2 并加载正确配置
/livox/lidar 发布为 sensor_msgs/msg/PointCloud2通过 并自动打开 RViz2 并加载正确配置
推理过程
RViz shows no points
↓
Check /livox/lidar message type
↓
Topic is Livox CustomMsg
↓
RViz PointCloud2 needs sensor_msgs/PointCloud2
↓
Use rviz_MID360_launch.py
↓
Point cloud becomes visible
两种 launch 文件对比
| Launch 文件 | 消息类型 | 用途 |
|---|---|---|
msg_MID360_launch.py | Livox CustomMsg | FAST-LIO 等 SLAM 程序 |
rviz_MID360_launch.py | sensor_msgs/PointCloud2 | RViz2 直接可视化 |
重要区别:
•
•
•
msg_MID360_launch.py → 用于 SLAM(FAST-LIO 等)•
rviz_MID360_launch.py → 用于 RViz2 可视化
使用建议
视觉检查 LiDAR: 使用
FAST-LIO SLAM: 可能需要切换回
rviz_MID360_launch.pyFAST-LIO SLAM: 可能需要切换回
msg_MID360_launch.py
对于点云可视化验证,使用 rviz_MID360_launch.py 即可在 RViz2 中看到清晰的 360° 激光扫描。
平台:Jetson Orin · ROS2 Humble · Livox MID360 · RViz2
(c) 卓博泰科技 · Livox MID360 RViz2 可视化指南
(c) 卓博泰科技 · Livox MID360 RViz2 可视化指南