Bad map on rviz using gmapping
Hello,
I'm quite new with ROS and it's been a few weeks that I'm actually facing a problem I can't manage to solve. I'm trying to creta a map from a robot's sensors data and visualize it on rviz, so nothing especially exotic.
As it is for test purpose, I simulate the robot on my computer. The data seem correct as well as the tf tree. However, when I try to see the result on rviz I get something wrong. The test map is actually a simple straigth corridor and the robot is just moving forward until the end. What I get on rviz is not so far from the actual map but there are holes between the segment, just like if it creates the map only at each new square of the grid. I unfortunately can't post pictures for now (I need 5 points or something ?)
I've read tons of topics on the subjects but I did not find anything that helped me solving this problem. If feel rather desperate about it.
If anyone can see what goes wrong, you would help me a lot !
Thank you.
Is your map just a blank corridor? No doors or any obstacles? Such a map lacks enough features for good localisation and map building, which may explain what you're seeing. It's hard to tell without pictures or seeing your source. Can you post your launch files, map, etc.?. Use dropbox or something.
Thank you for answer. It is actually a blank corridor with nothing else than the walls and the ground. Here is a screenshot of rviz. https://drive.google.com/open?id=0B1c... As you can see, the odometry ans the display of the map seem correct but there are those "holes".
The map looks very odd. Can you post your source files so we can test it out?
Unfortunately, we use a locally developped simulator to simulate the robot so you won't be able to use most of the code. Here is a part of the ros related code, concerning the messages sent trough ros. https://drive.google.com/open?id=0B1c...
I think that if the error comes from the code, it can only comes from this part. The tf transform works and is correct (I can add it if you need) and the messages are sent to ros without any error. Also, concerning odometry, the simulator cannot simulate it yet so I just made it simply move forward.
I thought maybe the problem comes from odometry but it looks fine on rviz so I don't know wath goes wrong. I checked the values of my sensors and they seem correct (near 0 on the sides because of the walls and 1 in front and in the back)
Since you can't post the simulator, can you instead record a bag file of all topics and post that? Also, we need to see your full source, not extracts, so that people can try to replicate your problem.
Sorry for the delay. Here is the code https://drive.google.com/open?id=0B1c... and here is the bag file https://drive.google.com/open?id=0B1c...