ROS Group
Product Service
Official website
Technological exchanges
ROS Tourials
Deep Learning
Computer Vision

xiaoqiang tutorial (16) large-scale lidar slam and real-time loop closure test

  • administrators

    Xiaoqiang Homepage

    Large-scale lidar slam and real-time loop closure test

    With Google’s Cartographer and slamtec’s lidar, we can try to create a floor plan for a large building. Take a look at our demo and click to watch the video.

    In this demo, Xiaoqiang actually operates in a 5,000-square-meter office building corridor. There are a large number of glass curtain walls on both sides of the corridor. There is a large area of open space in the center of the building. With rplidar’s range of only 6 meters, so the following figure The final result is still relatively good (only use lidar, IMU and platform odometer are not turned on, the large loop path is still closed successfully)


    The idea of this article: Because it is a large-scale mapping, wifi network coverage is a problem, so we use the Bluetooth handle to remotely control the platform movement. During the remote control, the lidar data was recorded through the rosbag. The handle remote control platform ran a circle within the construction area and finally rebuilt the bag for construction.

    Note: All the following operations are completed on Xiaoqiang host ubuntu


    1.Installing rplidar driver

    For users who purchased Xiaoqiang development platform after November 15, 2016, the rplidar driver has been configured. Rplidar driver installation please refer to this tutorial

    2.Install PS3 handle driver

    For users who purchased Xiaoqiang development platform after November 15, 2016, please skip this step. Please refer to this installation tutorial.

    3.Install platformtographer_ros

    Please refer to this installation tutorial:激光雷达slam算法platformtographer的安装及bag包demo测试


    1.Open a new window to start rplidar

    roslaunch rplidar_ros rplidar.launch

    2.Open two windows to start PS3 controller remote control program, press the handle connection key to connect the platform.

    First window

    sudo bash
    rosrun ps3joy

    The second window

    roslaunch turtlebot_teleop ps3fakexiaoqiang_teleop.launch

    3.Opens a new window to start the rosbag recording process and starts recording lidar data/scan

    rosbag record /scan

    4.Use the handle to remotely control the movement of the platform, circle around the building area, and it can also be used for multiple rotations.

    5.Bag recording is complete, close the above 1,2,3 window

    The newly recorded point bag file is in the home directory of Xiaoqiang, rename it to 1.bag

    6.Start platformtographer_ros start bag playback build

    roslaunch platformtographer_ros demo_xiaoqiang_rplidar_2d.launch bag_filename:=/home/xiaoqiang/1.bag


    7.If everything is normal, you can now see a similar effect in the picture below, waiting for the bag to be played.


    8.Save the map, this article ends

    rosservice call /finish_trajectory "stem: 'rplidar_test'"

    Xiaoqiang Homepage
    Back To Index