gmapping overrides map
Hey Guys, I need some help to create a map with gmapping. I use ROS Kinetic and a differential drive robot with a YDLidar X4. On the robot is a raspberry Pi 3 and a teensy for the motors. Gmapping is running on a laptop with ubuntu and also ROS kinetic. I used teleop to drive my robot and the results were shown in rviz and everytime i moved the robot just a bit, the map updates and I got a overlayed update to the previous map. So everything get really messy. I tried also to just slow down the robot, but that doesn´t seem to get better. Maybe it is something wrong with my tf-tree? The tree is map--> odom--> base_link--> laser_frame (I would provide the real tf-tree if I get enough points to upload files)
I have also a bag file, with scan and tf messages for debugging purpose. Maybe someone could tell me what is most likely the problem for that issue?
edit here the link to bagfile and tf frames "bagfile+tf"
kind regards Rex
Your TF tree is correct, but that doesn't mean the transforms are all correct.
I guess you have a PC you can use to run RVIZ or you wouldn't be able to describe what you did, so tell us how it looks in RVIZ. If you view the laser scan in RVIZ using ODOM as the frame for RVIZ, the laser scan should stay mostly stationary as the robot moves (it will dither a bit). See if it does.
If you have a transform setup incorrectly, you should be able to tell by watching RVIZ closely. In one case it took me several minutes to realize the laser scanner had left and right mixed up. The transform had it inverted along either X or Y.
Thank you for your quick answer. I did what you suggested. I replayed the bag file and set global fixed frame to odom and also axis to odom (to see that the robot is moving). The axis stay in place and the point cloud of the Lidar is moving according to the inputs I gave to the robot. (Hopefully this is understandable) But sometimes it seems the robot is "behind" a wall just through rotating. So this doesn´t make sense at all. I guess you are write with an inverted axe. Could you please tell me how do I fix this ? Also if I used base_link as fixed frame the robot seems to move right. No Jumps through walls or something similiar.
I upvoted your question. you should be able to now post a screen shot if needed.
I guess if one of your transforms was messed up it may appear in RVIZ that the robot passes through a wall when rotating. It may also be that the node that publishes ODOM has an issue and is rotating the robot about X or Y in the orientation part of pose..
thank you for your upvote. I figured out that my robot turn left/right were reversed so I changed it, but even that don´t made an difference. The builded map is still messy. It is really fascinating.