Welcome to RDK X5 Board repository
3.Handheld LiDAR mapping
Handheld LiDAR mapping
This feature requires launching the program inside the slam_gmapping package, which is located in the yahboomcar_ws source package. The following instructions use the bundled virtual machine as an example. If you intend to run this on your own board, place yahboomcar_ws in the home directory and build it there.
1. Launch the LiDAR
Open a terminal and run:
ros2 launch ydlidar_ros2_driver ydlidar_launch.py2. Publish Static Odom Transform
Open a terminal and run:
xxxxxxxxxxros2 launch rf2o_laser_odometry rf2o_laser_odometry.launch.py3. Start GMMapping
Open a terminal and run:
xxxxxxxxxxros2 launch slam_gmapping slam_gmapping.launch.py

The RViz display should appear as shown in the screenshot.
If no map is displayed, open the RViz map configuration manually by clicking: File → Open Config → sunrise → yahboomcar_ws → src → slam_gmapping → rviz → map_view.rviz

4. View the TF Tree
Open a terminal and run:
xxxxxxxxxxros2 run tf2_tools view_frames

This will generate a frames.pdf file in the directory where the command was executed. That file contains the generated TF tree.
