# Fiducial Follow

**URL:** <https://forum.ubiquityrobotics.com/t/fiducial-follow/115>\
**Category:** General Questions\
**Created:** [August 21, 2018, 4:52pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115 "2018-08-21T16:52:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 21, 2018, 4:52pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/1 "2018-08-21T16:52:04Z")

</div>

I was able to test the fiducial follow and it works fine but i have a question about it!

When i operate the robot in “fiducial follow mode” there is a way to the robot avoid the obstacles? Because on my tests the robot just try to follow and didnt avoid the objects! Its that normal?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 21, 2018, 9:12pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/2 "2018-08-21T21:12:21Z")

</div>

Yes the robot in fiducial follow will go wherever you tell it to go without regard for obstacle avoidance. This is the same with all the manual modes of operation.

If obstacle avoidance is something you want then it is relatively easy to implement. In source code you could for example subscribe to a sonar topic and stop when the distance to a detectable object drops below a certain level.

To see the fiducial follow source code take a look at.

> **[demos/fiducial\_follow at master · UbiquityRobotics/demos](https://github.com/UbiquityRobotics/demos/tree/master/fiducial_follow)**
>
> Robot demos. Contribute to UbiquityRobotics/demos development by creating an account on GitHub.

Also take a look at the accompanying documentation.

[https://learn.ubiquityrobotics.com/fiducial\_follow\_app](https://learn.ubiquityrobotics.com/fiducial_follow_app)

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 27, 2018, 11:53am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/3 "2018-08-27T11:53:28Z")

</div>

@davecrawley @rohbotics

i have installed the sonars and renamed the file from ubiquity\_sonar to pi\_sonar as described on the fix but the sonars seems to not be working! I´ve succesuflly run them and receive the message that the sonars are ready but the robot still dont avoid obstacles! let me attach a picture in order to you see if the error that appears mean something to you! thanks for all!!

 ![sonar_error](https://frm.ubiquityrobotics.com/uploads/default/original/1X/208b22412f309cce1df6fbdd20d9a993ab03a505.png)

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 27, 2018, 8:48pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/4 "2018-08-27T20:48:13Z")

</div>

I’ve solved the issue by editing the robot.yaml file as described in the tutorial… Thanks

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 27, 2018, 10:35pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/5 "2018-08-27T22:35:39Z")

</div>

@rohbotics @davecrawley  
Now that i have the sonars working do you think that its possible to buy more to put on the back of the robot, kinda like LOKI? because sometimes te robots makes the movements moving backwards and that can be dangerous!

Another question! Where can i adjust the sonar radius of avoidance?

Thanks

---

<div class="post-metadata">

**Author:** ![rohbotics](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/rohbotics/32/222_2.png) [@rohbotics](https://forum.ubiquityrobotics.com/u/rohbotics)\
**Post date:** [August 28, 2018, 1:43am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/6 "2018-08-28T01:43:19Z")

</div>

Could you clarify what you mean by ‘sonar radius of avoidance?’

Thanks

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 28, 2018, 2:03am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/7 "2018-08-28T02:03:20Z")

</div>

The minimum range for the sonars in cm wich the robot should stop, by default it seems 3/4cm!

Im trying to make myself clear 🙂 sorry for my lack of knowledge on the right terms!

---

<div class="post-metadata">

**Author:** ![jimv](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/j/67e7ee/32.png) [@jimv](https://forum.ubiquityrobotics.com/u/jimv)\
**Post date:** [August 28, 2018, 5:32am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/8 "2018-08-28T05:32:28Z")

</div>

_move\_basic_ will stop if an obstacle is detected in the distance that it moves in one second. If this is something that you want to adjust, we could make it configurable parameter in a future release.

---

<div class="post-metadata">

**Author:** ![brunolfm](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/brunolfm/32/42_2.png) [@brunolfm](https://forum.ubiquityrobotics.com/u/brunolfm)\
**Post date:** [August 28, 2018, 5:31pm UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/9 "2018-08-28T17:31:07Z")

</div>

Thanks for your answer, i just think it needs to react quicker to stop the robot! Because sometimes the robot hits the wall in some ocasions even that is at low speed, because it detects too late! Maybe the sonar needs to be more sensitive to objects!

---

<div class="post-metadata">

**Author:** ![stephenclark](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@stephenclark](https://forum.ubiquityrobotics.com/u/stephenclark)\
**Post date:** [August 29, 2018, 12:13am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/10 "2018-08-29T00:13:22Z")

</div>

can we get an update to the robot commander app to set magni into “follow” mode?

---

<div class="post-metadata">

**Author:** ![davecrawley](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/davecrawley/32/24_2.png) [@davecrawley](https://forum.ubiquityrobotics.com/u/davecrawley)\
**Post date:** [August 29, 2018, 2:15am UTC](https://forum.ubiquityrobotics.com/t/fiducial-follow/115/11 "2018-08-29T02:15:52Z")

</div>

Well its all open source - that’s the beauty of it. If you have an itch that you want to scratch take a look at the source code and make a pull request!

Just be aware that follow uses a fast low resolution camera mode while localization uses a slow high resolution one - so you’ll likely compromise performance of one or the other if you do this.

There is a work around to this that I can describe in more detail but needs some extra implementation steps.
