Welcome to Muto RS Robot repository
1)About lidar
1.About lidar
1. Program function description
After the program runs, drive the lidar, turn on the radar scanning data, and visualize the lidar scanning data in rviz.
2. Program code reference path
After entering the docker container, the location of the source code of this function is:
#A1 lidar/root/yahboomcar_ros2_ws/software/library_ws/src/sllidar_ros2/launch/sllidar_launch.py#4ROS lidar/root/yahboomcar_ros2_ws/software/library_ws/src/ydlidar_ros2_driver-master/launch/ydlidar_raw_launch.py#A1 lidar visualization/root/yahboomcar_ros2_ws/software/library_ws/src/sllidar_ros2/launch/view_sllidar_launch.py#4ROS lidar visualization/root/yahboomcar_ros2_ws/software/library_ws/src/ydlidar_ros2_driver-master/launch/ydlidar_view_launch.py3. Program startup
xxxxxxxxxx#Start A1 lidarros2 launch sllidar_ros2 sllidar_launch.py#Start A1 lidar+rviz to visualize dataros2 launch sllidar_ros2 view_sllidar_launch.py#Start 4ROS lidarros2 launch ydlidar_ros2_driver ydlidar_raw_launch.py#Start 4ROS lidar+rviz to visualize dataros2 launch ydlidar_ros2_driver ydlidar_view_launch.pyRun screenshot, take starting "A1 lidar+visualization" as an example,

You can print the data scanned by lidar through the following command:
xxxxxxxxxxros2 topic echo /scan

4. Introduction to SLAMTEC lidar
4.1. Overview
Single-line lidar refers to a radar whose line beam emitted by the laser source is a single line. It is divided into triangular ranging and TOF lidar. It is mainly used for robots.
Most field applications. It has fast scanning speed, strong resolution and high reliability. Compared with multi-line lidar, single-line lidar has better scanning speed at angular frequency and
The response is faster in terms of sensitivity, so the distance and accuracy of measuring obstacles are also more accurate.
4.2. Principle of ranging
The A1 radar uses triangulation ranging, while the S2 radar uses time-of-flight (TOF) ranging.
Trigonometric distance measurement
The laser triangulation ranging method mainly uses a beam of laser to illuminate the measured target at a certain incident angle. The laser is reflected and scattered on the target surface, and a lens is used to focus the reflected laser light at another angle.The light spot is imaged on the CCD (Charge-coupled Device, photosensitive coupling component) position sensor.When the measured object moves along the direction of the laser, the light spot on the position sensor will move, and its displacement corresponds to the movement distance of the measured object.Therefore, the distance value between the measured object and the baseline can be calculated from the light spot displacement distance through algorithm design. Since the incident light and reflected light form a triangle, the geometric triangle theorem is used to calculate the spot displacement, so this measurement method is called laser
TOF ranging method
TOF lidar is based on measuring the flight time of light to obtain the distance of the target. Its working principle is mainly as follows: a modulated laser signal is emitted through a laser transmitter. The modulated light is received by the laser detector after being reflected by the object being measured. The distance to the target can be calculated by measuring the phase difference between the emitted laser and the received laser. .
4.3. Baud rate used
The baud rate of A1 lidar is 115200, and the baud rate of S2 lidar is 1000000.
4.4. Differences in various lidar models
