Problem creating a map with gmapping
I added a laser scanner to a custom robot model, but when I ran the the gmap node. The robot was not mapping the environment.
The warnings I got when I ran my launch file are :
Timed out waiting for transform from basefootprint to map to become available before running costmap, tf error: Could not find a connection between 'map' and 'basefootprint' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 98.215 timeout was 0.1.
The origin for the sensor at (71.50, -50.00) is out of map bounds. So, the costmap cannot raytrace for it.
Scan Matching Failed, using odometry. Likelihood=0 lp:71.5 -50 1.49224e-17 op:70.6211 -50.1456 0.000266226
The image of my TF tree is https://imgur.com/a/shzkIOB
Asked by the3kr on 2018-11-26 11:04:50 UTC
Answers
Please include an image of your TF tree. My guess is that you have a malformed TF tree of your robot making it impossible for the laser scan to be transformed into the appropriate frame set in your configuration file. There needs to be a direct chain between laser -> base {link, footprint depending} -> odom, and gmapping is broadcast its odom -> map.
You can visualize using rosrun rqt_tf_tree rqt_tf_tree
.
Asked by stevemacenski on 2018-11-26 14:11:11 UTC
Comments
The TF tree can be found here : https://imgur.com/a/shzkIOB
Asked by the3kr on 2018-11-26 18:46:57 UTC
Try upping your robot state publisher to 100 hz
Asked by stevemacenski on 2018-11-29 13:43:16 UTC
Comments
Did you managed to solve your issue? It seems like I'm having similar issues with "Scan Matching Failed" error messages and when that happens, my map in rViz is messed up.
Asked by ZeroSan on 2019-02-06 05:41:05 UTC