Welcome to ROSMASTER A1 repository
1.Basic use of Lidar
Basic Use of Lidar
This lesson uses a Raspberry Pi 5 as an example.
This lesson uses the Raspberry Pi 5 as an example. For Raspberry Pi and Jetson Nano boards, you need to open a terminal on the host computer and enter the command to enter the Docker container. Once inside the Docker container, enter the commands mentioned in this lesson in the terminal. For instructions on entering the Docker container from the host computer, refer to [01. Robot Configuration and Operation Guide] -- [5.Enter Docker (For JETSON Nano and RPi 5)].
For Orin and RDK boards, simply open the terminal and enter the commands mentioned in this lesson.
1. Program Functionality
After running the program, it drives the Slamtem LiDAR or EAI LiDAR, enables Lidar scan data, and visualizes the LiDAR scan data in rviz.
2. Program Code Reference Path
The source code for this function is located at:
#C1 Lidar~/yahboomcar_ros2_ws/software/library_ws/src/sllidar_ros2/launch/sllidar_c1_launch.py#Timiniplus Lidar~/yahboomcar_ros2_ws/software/library_ws/src/ydlidar_ros2_driver-humble/launch/ydlidar_launch h.py#C1 Lidar visualization~/yahboomcar_ros2_ws/software/library_ws/src/sllidar_ros2/launch/view_sllidar_c1_launch.py#Timiniplus Lidar visualization~/yahboomcar_ros2_ws/software/library_ws/src/ydlidar_ros2_driver-humble/launch/ydlidar_launch_view.py3. Program Startup
For PI5/JETSON NANO controllers, you need to enter a Docker container first; for RDK X5 and Orin boards, this is not required.
Entering the Docker container (see the Docker course for steps: 4. Docker Startup Script).
All commands below must be executed within the same Docker container (see the Docker course for steps: 3. Docker Commit and Multi-Terminal Entry).
Run the corresponding program according to your Raspberry Pi model.
xxxxxxxxxx#Start the Tminiplus Lidarros2 launch ydlidar_ros2_driver ydlidar_launch.py#Start the Tminiplus Lidar and visualize data with rvizros2 launch ydlidar_ros2_driver ydlidar_launch_view.py#Start the C1 Lidarros2 launch sllidar_ros2 sllidar_c1_launch.py#Start the C1 Lidar and visualize data with rvizros2 launch sllidar_ros2 view_sllidar_c1_launch.pyLet's use the Tminiplus Lidar and visualization as an example:

You can print the Lidar scan data using the following command:
xxxxxxxxxxros2 topic echo /scan
