Welcome to ROSMASTER R2 repository
1-2. Introduction and use of 4ROS lidar
1. Introduction and use of radar
1. Program function description
After the program runs, drive 4ROS lidar, open the radar scanning data, and visualize the lidar scanning data in rviz.
2. Program code reference path
Raspberry Pi PI5 master control, you need to enter the docker container first,
The location of the function source code is,
xxxxxxxxxx~/yahboomcar_ros2_ws/software/library_ws/src/ydlidar_ros2_driver-master/launch/ydlidar_launch.py~/yahboomcar_ros2_ws/software/library_ws/src/ydlidar_ros2_driver-master/launch/view_ydlidar_launch.py3. Program startup
After entering the docker container, enter the docker terminal,
xxxxxxxxxxros2 launch ydlidar_ros2_driver ydlidar_launch.py #Start the radar aloneros2 launch ydlidar_ros2_driver ydlidar_launch_view.py #Start the radar and rviz to visualize dataRun screenshot,

You can use the following command to print the data scanned by the radar,
xxxxxxxxxxros2 topic echo /scan
4. 4 Introduction to ROS radar
4.1 Overview
4ROS LiDAR, based on the pulse ToF ranging principle, and equipped with related optical, electrical, and algorithm design, realizes high-frequency and high-precision distance measurement. At the same time, the mechanical structure rotates 360 degrees to continuously obtain angle information, thereby realizing 360-degree scanning ranging and outputting point cloud data of the scanning environment.
4.2. Distance measurement principle
TOF distance measurement method: TOF laser radar is based on measuring the flight time of light to obtain the distance of the target object. Its working principle is mainly manifested in that a laser
transmitter emits a modulated laser signal, which is reflected by the object to be measured and received by the laser detector. The distance of the target can be calculated by measuring the phase difference between the emitted laser and the received laser.
4.3. Performance parameters

4.4. Distance measurement accuracy

4.5. Product features
Dustproof and waterproof, meeting IP65
360-degree full-range scanning, 5-12Hz adjustable scanning frequency
High-speed distance measurement, distance measurement frequency 20000Hz
Small distance measurement error, good distance measurement stability
Strong resistance to ambient light interference