(ros/navigation) How to build a map using logged data to create maps with records

Source: Internet
Author: User

1 How to build a map using logged data create maps with recorded

Description: How to create a two-dimensional map with recorded transformations and laser scanning data.

Create a map

1. If as the source check (relative to the binary installation), build the gmapping:

  Rosmake gmapping

2. Get a package. There are two options:

1 Creating a package with a robot

2 Download an existing package to do the test

Either way, you will get a package.

3. Start the core

  



4. Ensure that Use_sim_time is set to true before other nodes are started

<pre name= "Code" class= "JavaScript" >     rosparam Set use_sim_time True

5. Start Slam_gmapping, it will receive a laser scan (in this case, on the Base_scan topic), and create a map:

    

Note: On PR2, the Odom coordinate system is called odom_combined. Use this command:


6. At a new terminal, start playing back the bag file, Levy slam_gmapping provides data:

      

Wait for Rosbag to complete and exit.

7. Save the new map to disk using the Map_saver of the Map_server package:

   

Now you have a map, which is saved locally as MAP.PGM. Can be viewed with any image browser (gimp,eog,gthumb, etc.);

Download a test Package

Use the wget command to download the test package,

wget http://pr.willowgarage.com/data/gmapping/basic_localization_stage.bag

Create your own package

1 Start the robot, release laser scanning and conversion data, joystick manipulation enabled (different robot details are different);

2 start recording scanning and conversion (note that the scan topic may vary depending on the robot):


The file will be written in the current directory with the name ' Mylaserdata_<date>-topic.bag '

3 Drive the robot one turn. Common recommendations:

? Try to limit the speed of rotation because they are the hardest to scan for matches. It is useful to reduce the maximum allowable speed of the joystick.

? "See" With the LiDAR visualization machine, and if the laser is not visible, it will not be on the map.

? Humans usually don't have problems moving around unless he walks with the robot in the laser field.

? Loop closure is the hardest part. When closing the loop, make sure to drive more than 5-10 meters to get a large overlap between the start and end of the loop.

4 Kill the Rosbag instance, and note the name of the file that was created.

Change: View the progress of creating a map

If you don't mind waiting until the results are recorded and the map process is complete, you can see the progress in Rviz again:


Add map display, set topic/map

Author:wsh
Email: [Email protected]

(ros/navigation) How to build a map using logged data to create maps with records

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.