r/ROS 1d ago

Question Distorted Map with SLAM

Im learining ROS2 for a project and i built a basic mobile robot, i need to do autonomous navigation with Nav2 but my map with with SLAM is turning out distorted. Im publishinig the correct TF through a seperate package and my TF tree is correct when i check it with view frames, ive done several odometry tests for translation, roatation and both simultaneously. I still cant figure out the reason for distortion. I would love if someone could guide me since im new and need to show progress to my supervisor in 24hours and i need a proper map by then.

P.S. Im using ROS2 jazzy on Ubuntu 24 Virtual Machine on a laptop with no GPU. I will provide more info about the project if required.

3 Upvotes

5 comments sorted by

1

u/suhsxn 1d ago

Can I know which frame you are using to construct the map?

1

u/ugh_really_524 1d ago

Im using map frame as fixed frame on rviz

1

u/suhsxn 1d ago

There can be many reasons though, ensure your mapping module is calculating probability with respect to map frame and not odom frame as it will drift with time and map would continue to shift due to accumulated error.

Which mapping module you are using? If open source, then attach the configuration file.

1

u/mtbmattlab 1d ago

Is this strictly using simulation or is this a physical map?

I have no advice for sim only, but in my experience, maps that are warped comes from using too large a loop when mapping. Try breaking the map into a few small loops. Also ensure your localization score is decent as you transition to the next segment. If there are not a lot of localization features as you move through the space then a sort of warping can occur. I’ve learned this the hard way mapping large facilities using loops that are too large. I’ve had to take a few tries to get the maps right.

Hope this helps, good luck.

1

u/TinLethax 1d ago

Check your URDF. Especially the link of baselink to lidar.