ROS 2 package for YDLIDAR sensors.
Build from your ROS 2 workspace root:
colcon build --packages-select ydlidarRun the driver with the default parameters:
ros2 run ydlidar ydlidar_nodeLaunch the driver with the packaged ROS 2 launch file:
ros2 launch ydlidar lidar.launch.pyLaunch the driver and RViz2 together:
ros2 launch ydlidar lidar_view.launch.pyOverride parameters from the CLI:
ros2 run ydlidar ydlidar_node --ros-args -p port:=/dev/ttyUSB0 -p frame_id:=laser_frameUse an alternate parameter file:
ros2 launch ydlidar lidar.launch.py params_file:=/path/to/ydlidar.yamlport (string, default: /dev/ydlidar)
Serial port name used in your system.
baudrate (int, default: 115200)
Serial port baud rate.
frame_id (string, default: laser_frame)
Frame ID for the device.
low_exposure (bool, default: false)
Indicates whether the LIDAR has low light power mode.
angle_fixed (bool, default: true)
Indicates whether the driver needs angle compensation.
heartbeat (bool, default: false)
Indicates whether heartbeat protection is enabled.
resolution_fixed (bool, default: true)
Indicates whether the LIDAR has a fixed angular resolution.
angle_min (double, default: -180.0)
Minimum valid angle in degrees for LIDAR data.
angle_max (double, default: 180.0)
Maximum valid angle in degrees for LIDAR data.
range_min (double, default: 0.08)
Minimum valid range in meters for LIDAR data.
range_max (double, default: 16.0)
Maximum valid range in meters for LIDAR data.
ignore_array (string, default: "")
Comma-separated angle ranges to zero out.
samp_rate (int, default: 9)
LIDAR sampling frequency.
frequency (double, default: 7.0)
LIDAR scanning frequency.
range_error (double, default: 0.2)
Range correction error value.
range_at_error (double, default: 4.0)
Reference distance used by the range correction model.
baseline (double, default: 0.035)
Baseline used by the range correction model.