Integrar un LiDAR en ROS2: guía completa
Guía paso a paso para integrar un LiDAR Ouster, Hesai, Livox o SICK en ROS2 (Humble/Iron/Jazzy): instalación de controladores, configuración de red, PTP, QoS, lanzamiento, visualización RViz2, SLAM y fusión de sensores.
1. Introducción
El LiDAR se ha convertido en un sensor imprescindible en robótica móvil para la navegación autónoma, la cartografía SLAM y la percepción. Esta guía cubre la integración de los controladores Ouster (ouster-ros), Hesai (hesai_ros_driver), Livox (livox_ros_driver2) y SICK (sick_scan_xd) en ROS2 Humble, Iron y Jazzy.
2. Instalación de los controladores
Ouster: git clone --branch ros2 https://github.com/ouster-lidar/ouster-ros.git, colcon build. Topics: /ouster/points (PointCloud2), /ouster/imu. Hesai: git clone https://github.com/HesaiTechnology/hesai_ros_driver.git. Topics: /hesai/pandar. Livox: git clone https://github.com/Livox-SDK/livox_ros_driver2.git. Topics: /livox/lidar. SICK: git clone https://github.com/SICKAG/sick_scan_xd.git. Topics: /scan (2D), /cloud (3D).
3. Configuración de red
Configure una IP estática en la misma subred que el LiDAR (ej: 192.168.1.50/24). Active PTP (IEEE 1588) mediante linuxptp para una sincronización precisa: sudo ptp4l -i eth0 -m -s. Use QoS BEST_EFFORT en ROS2 para las nubes de puntos para evitar la saturación DDS.
4. Visualización y procesamiento avanzado
Visualice la nube de puntos en RViz2 (Add > PointCloud2). Para SLAM 2D, use slam_toolbox después de la proyección mediante pointcloud_to_laserscan. Para SLAM 3D, use Cartographer. La fusión LiDAR/IMU se realiza con robot_localization. Para la agrupación y detección de obstáculos, use PCL (pcl_ros).
5. Lista de verificación y conclusión
Verifique: ROS2 en entorno, controlador compilado, IP estática, ping OK, PTP activo, QoS BEST_EFFORT, RViz2 funcional, TF publicadas y SLAM validado. La clave de una integración exitosa: configuración de red, QoS ROS2 y árbol TF correcto.
💻
Need help integrating this software solution?
We can advise you on the software, SDKs and tools best suited to your project.
Talk to an expert →Mentioned in this article
Browse the detailed pages for each mentioned entity.
Software & SDK
Flasheye
Flasheye
Edge application for LiDAR intrusion detection and counting for perimeter surveillance.
Outsight
Outsight
Real-time LiDAR perception software platform for smart city, transport and security.
RTAB-Map
OpenIntRoLab (Sherbrooke)
RGB-D and LiDAR SLAM with topological mapping and place recognition.
ROS2 Perception Pipeline
OpenOpen Robotics
ROS2 perception stack (vision, LiDAR, fusion) for mobile robots and vehicles.
NVIDIA Isaac Sim
NVIDIA
NVIDIA robotics simulator with physically accurate LiDAR sensor rendering for testing and validation.
Apollo
OpenBaidu
Open-source autonomous driving platform with LiDAR perception, HD maps and planning.
Cartographer
OpenGoogle / ROS
Google's real-time 2D and 3D SLAM library, integrated with ROS.
LIO-SAM
OpenTixiao Shan / MIT
Tightly-coupled LiDAR-IMU SLAM via factor graph optimization for high accuracy.
Autoware
OpenThe Autoware Foundation
Open-source autonomous driving framework: perception, localization, planning and control.
Hesai SDK
OpenHesai Technology
Official SDK and ROS2 drivers for Hesai LiDARs (AT, Pandar, QT, FT).
FAST-LIO / FAST-LIO2
OpenHKU MaRS Lab
Ultra-fast LiDAR-inertial SLAM with high accuracy, no additional sensor required.
RViz2
OpenOpen Robotics
The official ROS2 3D visualizer for LiDAR point clouds and other robotic data.
ROS2 Navigation (Nav2)
OpenOpen Robotics
ROS2 navigation framework for mobile robots: planning, control and LiDAR SLAM.