Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 120

Good map with hector_mapping and with odometry-only - poor map with gmapping

$
0
0
Using an XV11 lidar and calibrated odometry, I am able to build a good quality map using both hector_mapping (using scan results only) and pure odometry (using odometry only). However, I am unable to get a good map using gmapping (which combines scan results and odometry). ***Odometry:*** My robot has odometry that passes the tests listed in the [navigation tuning guide](http://wiki.ros.org/navigation/Tutorials/Navigation%20Tuning%20Guide) - linear translation is perfect, rotation error seems to be reasonable as well. ***Lidar:*** Additionally, it is using an XV11 lidar as laser scanner, with the xv_11_laser_driver package. ***Bagfile:*** I've recorded a short bag file with /odom, /tf and /scan topics, using following command: ``rosbag record -O second_data /scan /tf /odom`` I then compressed the bagfile (``rosbag compress second_data.bag``), and put it available [here](https://github.com/KristofRobot/frobo/blob/master/bagfile/second_data.bag). ***Map results:*** If I transform this bag file into a map using **hector_mapping**, the result looks perfect: ![image description](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/hector.png) EDIT: Here are links to the hector_mapping generated [pgm](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/hector.pgm) and [yaml](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/hector.yaml) files. Moreover, if I simply display the laserscan results in **rviz in the /odom** frame, with an infinite decay time, I get a very nice map as well: ![image description](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/rviz_odom.png) Now, when I try to run this through **gmapping**, the map looks very poor: ![image description](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/gmapping.png) EDIT: Here are links to the gmapping generated [pgm](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/gmapping.pgm) and [yaml](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/gmapping.yaml) files. ***Commands:*** To generate the gmapping map, I used: rosparam set use_sim_time true rosparam set slam_gmapping/delta 0.1 #set resolution to 0.1 rosrun gmapping slam_gmapping scan:=scan rosbag play second_data.bag --clock rosrun map_server map_saver To generate the hector_mapping map, I used: rosparam set use_sim_time true roslaunch hector_mapping mapping_default.launch rosbag play second_data.bag --clock rosrun map_server map_saver Launch file is available [here](https://raw.githubusercontent.com/KristofRobot/frobo/master/bagfile/mapping_default.launch). PDF graph of tf tree is available [here](https://github.com/KristofRobot/frobo/raw/master/bagfile/frames.pdf). ***Question:*** How come gmapping gives such poor results, compared to the two other approaches? Any suggestions to improve the gmapping results would be much appreciated. Thank you, Kristof

Viewing all articles
Browse latest Browse all 120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>