# Magni Silver - Obstacle avoidance while navigating a map

**URL:** <https://forum.ubiquityrobotics.com/t/magni-silver-obstacle-avoidance-while-navigating-a-map/948>\
**Category:** Uncategorized\
**Created:** [April 4, 2022, 6:49pm UTC](https://forum.ubiquityrobotics.com/t/magni-silver-obstacle-avoidance-while-navigating-a-map/948 "2022-04-04T18:49:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Strider\_311](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@Strider\_311](https://forum.ubiquityrobotics.com/u/Strider_311)\
**Post date:** [April 4, 2022, 6:49pm UTC](https://forum.ubiquityrobotics.com/t/magni-silver-obstacle-avoidance-while-navigating-a-map/948/1 "2022-04-04T18:49:41Z")

</div>

Hello all,

So we are trying to implement a receptionist robot application using the magni silver base. We have installed the RPLidar A1 and created a map of the area. However when using move\_basic OR move\_base + sonar\_detector, we are getting very inconsistent results.

# Move\_Basic package

When using move\_basic and magni\_lidar\_maprunner\_amcl, the robot can avoid obstacles but it is very inconsistent, and tends to hit obstacles if they are towards the side. The robot will also go out of control randomly, instead of stopping at the spot marked on RVIZ, it will start bouncing around on the map losing its location and will ram full speed into walls/obstacles and keep driving.

# Move\_base + sonar\_detector

When using these 2 packages the robot refuses to move, sometimes it will respond to the move instruction, but most of the time it does not respond at all.

Please advise on how we can implement obstacle avoidance while running a map solution.

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [April 5, 2022, 7:25am UTC](https://forum.ubiquityrobotics.com/t/magni-silver-obstacle-avoidance-while-navigating-a-map/948/2 "2022-04-05T07:25:57Z")

</div>

Hello. I can comment on the 2nd configuration using sonar\_detector.  
Sonar\_detector is not meant to be used with move\_base. Move\_base is a much more powerful but also confusing nav stack that uses the concept of a ‘local cost map’ to force re-route planning.

sonar\_detector is a fairly simple node that is meant to add simple collision avoidance when users are driving the robot around with a joystick or other form of cmd\_vel messages that the motor\_node will act upon. sonar\_detector is not part of a full navigation stack, it is more a safety feature to stop the robot if you unintentionally drive it right into a wall or other object. sonar\_detector directly tells the motor node to stop or allow it to start again after something that is in front is finally removed.

sonar\_detector and move basic (not mentioned by you) together would be both thinking they are responsible for avoiding colliding with things so yes, it will be a very confused system.

As far as the first point for move\_basic package it is called ‘basic’ because it is a point to point sort of navigation that does not have object avoidance built in. move\_basic does from what i recall try to stop if something is put in front. In order for proper re-route planning to happen you need a full move\_base stack that includes the usage of what is called the ‘local cost map’. A local cost map is often created using data from the sonars.

I don’t think we have a full demo that shows fully move\_base combined with a local cost map generated from our sonar system. That is an advanced form of navigation that we have not fully shown how to implement to date.

Hopefully one of the more experienced navigation experts may chime in to add more information.

---

<div class="post-metadata">

**Author:** ![Strider\_311](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@Strider\_311](https://forum.ubiquityrobotics.com/u/Strider_311)\
**Post date:** [April 6, 2022, 3:45pm UTC](https://forum.ubiquityrobotics.com/t/magni-silver-obstacle-avoidance-while-navigating-a-map/948/3 "2022-04-06T15:45:16Z")

</div>

Hello,  
Thanks for your Quick response. so is there a method using move\_base that will allow for advanced navigation (Dynamically avoiding obstacles while running amcl) that will be useful in this application? As in do you suggest we proceed with the move\_base option and see where it gets us?

Im confused about move\_base in the fact that it does show the sonar readings, but it does not act on it at all. It will ram into obstacles full speed (we use cushioned stuff to prevent damage to the robot). Will it work as it is or will modifications be required?

Also for AMCL the robot gets ‘confused’ very quickly and is unable to properly find its surroundings at times, do you have suggestions to smoothen out the process here?

Thank you for your patience and support.

---

<div class="post-metadata">

**Author:** ![magni](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/m/eada6e/32.png) [@magni](https://forum.ubiquityrobotics.com/u/magni)\
**Post date:** [April 14, 2022, 12:11am UTC](https://forum.ubiquityrobotics.com/t/magni-silver-obstacle-avoidance-while-navigating-a-map/948/4 "2022-04-14T00:11:17Z")

</div>

Hi,

Any update on this? I’ve been struggling with the same error and the robot’s movement is very random, please let me know if you’ve been able to solve this issue.

Thanks
