Adjusting Calculated Position to Match Real Position in Map

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adjusting Calculated Position to Match Real Position in Map

rob_slam
This post was updated on .
Hi everyone,

I'm using a system where I can localize myself on a map, but I've noticed an issue. Often, there's a red line drawn between my calculated position on the map and my actual real-world position (see attached images). The calculated position on the map is incorrect, but the red line always points accurately to the correct position. The red line is the "Global loop closure" (/mapOdomCache)

Is there a way to adjust my current calculated position to automatically align with the position indicated by the red line?

I’d appreciate any advice or suggestions on how to solve this issue. Thanks in advance for your help!

Best regards



Reply | Threaded
Open this post in threaded view
|

Re: Adjusting Calculated Position to Match Real Position in Map

matlabbe
Administrator
That red line would indicate a loop closure. The map->odom TF frame should be updated when it happens. Do you have more than one node publishing the same TF frame? Is the robot jumping back and forth between two locations? That could be symptoms of same TF frames published with differnt values. You can debug the tf tree with
#ros1:
rosrun tf2_tools view_frame.py

#ros2:
ros2 run tf2_tools view_frame

Also check if there are warnings/errors in terminal running rtabmap node. It could also happen that it waits for another re-localization before actually move the robot, but there should be a warning about that.