Welcome to ROSMASTER A1 PRO repository
1.Lidar Introduction and Use
📡 Lidar Introduction and Use
1. Course Content
Learn about the hardware specifications of the lidar sensor equipped on the A1 Pro.
Launch the lidar driver and view real-time lidar scan point cloud in RViz2.
Use ROS2 command-line tools to check the radar data format of the
/scantopic.
2. Lidar Parameters Overview
The A1 Pro robot supports T-mini Plus and Slam C1 lidars:
2.1 T-mini Plus Lidar Parameters
| Attribute | Value | Unit |
|---|---|---|
| Ranging Frequency | 4000 | Hz |
| Scan Frequency | 6 (6~12) | Hz |
| Ranging Range | 0.05 ~ 12 | m |
| Scan Angle | 0 ~ 240 | Deg |
| Ranging Accuracy | 20 | mm |
| Angle Resolution | 0.54 | Deg |
2.2 Slam C1
| Attribute | Value | Unit |
|---|---|---|
| Ranging Frequency | 5000 | Hz |
| Scan Frequency | 8 (8-12) | Hz |
| Ranging Range | 0.05-12 | m |
| Scan Angle | 0-240 | Deg |
| Ranging Accuracy | 30 | mm |
| Angle Resolution | 0.72 | Deg |
3. Demo Examples
3.1 Launch Lidar Driver and RViz Visualization
Run in terminal:
# Launch TminiPlus lidar and open RViz visualizationros2 launch ydyardar_ros2_driver ydlidar_launch_view.py# Launch C1 lidar and open RViz visualization dataros2 launch sllidar_ros2 view_sllidar_c1_launch.py
In RViz2, the red point cloud represents the lidar's real-time scan of the surrounding environment. In the LaserScan plugin panel on the left side of RViz, you can adjust the point cloud display size (Size), color style (Color Transformer), and decay time (Decay Time).
Tip
If you only need to start the lidar node in the background (without automatically opening RViz), run:
xxxxxxxxxx# Start Tminiplus lidarros2 launch ydlidar_ros2_driver ydlidar_launch.py# Start C1 lidarros2 launch sllidar_ros2 sllidar_c1_launch.py
4. Viewing Lidar Data
Run ROS2 CLI command in a new terminal to view raw lidar data:
xxxxxxxxxxros2 topic echo /scan
4.1 Core Data Field Parsing
header.frame_id: Lidar coordinate frame name (usuallylaserorlaser_frame).angle_min/angle_max: Starting and ending radians of lidar scan (0° ~ 360° corresponds to0to2π).angle_increment: Angular resolution increment between adjacent points (radians).range_min/range_max: Shortest and longest valid ranging distances of the lidar (meters).ranges: Array of measured distances at each angle within the current scan frame (meters).