# Localization when using move\_base

**URL:** <https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010>\
**Category:** General Questions\
**Created:** [August 31, 2022, 9:14am UTC](https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010 "2022-08-31T09:14:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanay13](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Tanay13](https://forum.ubiquityrobotics.com/u/Tanay13)\
**Post date:** [August 31, 2022, 9:14am UTC](https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010/1 "2022-08-31T09:14:11Z")

</div>

Hi everyone, I’ve been trying to use the move\_base function with a pre-loaded map to set goals and test the Magni’s ability to navigate around obstacles to reach the goal specified.

The map was created using Gmapping with the move\_basic node and driving around using a joystick, then localized using amcl\_diff.launch and applying 2D estimates in Rviz.

However, when running the amcl node with the move\_base, the map keeps flipping yet when running just move\_base the robot cannot figure out where it is.

I am using the Magni with Ubuntu 20.04 and ROS Noetic so the packages and files in magni\_lidar as specified in the documentation arent really useful. Any ideas for what I’m missing out on? And my apologies for any missing information in the questions.

---

<div class="post-metadata">

**Author:** ![MoffKalast](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/moffkalast/32/214_2.png) [@MoffKalast](https://forum.ubiquityrobotics.com/u/MoffKalast)\
**Post date:** [August 31, 2022, 1:43pm UTC](https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010/2 "2022-08-31T13:43:32Z")

</div>

Hmm, not sure what’s wrong there, but move\_base and its stock localization stack is notoriously difficult to configure properly so it could be any number of things.

I would suggest re-checking if all topics are linked/remapped correctly, if the robot shape is set up correctly, etc.

---

<div class="post-metadata">

**Author:** ![Tanay13](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Tanay13](https://forum.ubiquityrobotics.com/u/Tanay13)\
**Post date:** [September 1, 2022, 2:12am UTC](https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010/3 "2022-09-01T02:12:23Z")

</div>

Thanks for the advice, I’ll check the TF trees and see if there anything that’s not matching.

---

<div class="post-metadata">

**Author:** ![Tanay13](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Tanay13](https://forum.ubiquityrobotics.com/u/Tanay13)\
**Post date:** [September 1, 2022, 6:42am UTC](https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010/4 "2022-09-01T06:42:45Z")

</div>

![Screencap](https://frm.ubiquityrobotics.com/uploads/default/original/1X/3bf9d2ba41213a2e1398bd7f8f62b0b45518d4a9.png)

When analysing the move\_base launch file, it seems to still be using the tf node, which I believe is deprecated in favour of tf2, would switching to that solve the issue? I’m not completely sure about the type and name in that case but it would be a starting point to fix the issue.

---

<div class="post-metadata">

**Author:** ![anfederman](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/anfederman/32/141_2.png) [@anfederman](https://forum.ubiquityrobotics.com/u/anfederman)\
**Post date:** [September 4, 2022, 3:47pm UTC](https://forum.ubiquityrobotics.com/t/localization-when-using-move-base/1010/5 "2022-09-04T15:47:22Z")

</div>

I am unsure if the map from lidar, sonar and the camera are being integrated correctly, so while in Rviz, check to see what happens when you switch from odom, map, and base\_link as default frame.
