Help Object Avoidance TF02


I installed TF02 to my pixhawk cube and works perfect, the sonar value is correct and the proximity window shows correctly how the objects come to the rover.

I followed the manual
but the rover did not avoid any object from the path (auto or guided)

If anyone could help me, I really appreciate

Log link:



Hi Eduard,

This is the object avoidance wiki page for Rover.

In Auto and Guided modes the “Dodge” method will be used and I’m afraid it doesn’t actually work that well in practice because it’s a very simple algorithm. It was designed for the Sparkfun AVC so it can perhaps be made to work so the vehicle steers around barrels (or other similar obstacle) while travelling at a specific speed but it’s not a general purpose solution.

In any case the parameters that control this behaviour are on the rover-object-avoidance wiki page. The key ones to adjust are RNGFND_TRIGGR_CM, RNGFND_TURN_ANGL (which is not really a turn angle) and RNGFND_TURN_TIME.

We are working on object avoidance though, the ROS based solution described here is the most impressive but it is still a work-in-progress.

Hi @rmackay9

Thank you for your answer, today I setup the vehicle following the wiki guideline.

The rover moved when see an obstacle, but the problem was the square was not enough big and waving appears passing the waypoints. And sometimes the rover did not recognize the obstacle and hit me.

Is this configuration correct?



Now I received an RTK here+ and maybe improves the waves, no?




Those parameters generally look OK although perhaps RNGFND_TURN_ANGL is too low.

I’ll need to see a log I think to understand the cause of the wave/wobble. Really though, the dodge method doesn’t work too well… at the risk of appearing to “pass the buck”, I’ve spent a couple of days in the past few months trying to make it work (mostly in the simulator) and I’ve come to the conclusion that it’s not really going to work well… so I’m afraid I can’t spend a lot of time trying to help make it work because I think a better use of my time is to try and replace it with something better.

Hi @rmackay9

Sorry about the delay, but I did not have time to test outside.

I installed an RTK gps unit and I setup the base with 2mtr, and still waving. As you commented I attached the log file (via dropbox)

Thank’s for your help again



It looks like the steering rate controller hasn’t been tuned (still using default values). There’s a wiki page here which describes how to do it.

In particular I think the ATC_STR_RAT_FF is too low at the default of 0.2. I suspect it should be mroe like 0.6 or 0.8.

Hi @rmackay9

I adjusted as wiki describes and now the angles are Perfect :wink:

Unfortunately, TF02 object avoidance still not working, and I don’t know why

thank’s for your help

1 Like


Great that it’s getting better though. If you have another log I can peek at it regarding the object avoidance…

Hi @rmackay9

Thank’s for your help…again…I tried to put some rocks infront of the Rover but did not avoid them, as a crawler the rover pass…over hahahaha!!!

I configured to avoid the obstacle, not to stop in front of it…

See attached the link to dowload the logs…and let’s see if you look something wrong. I’m using TF02, but I have a Lidar A2 too thet if you think is better I could install it instead of tf02

Thank’s again



From the logs it looks like the “Dodge” method is reacting to objects. Like I mentioned above, I’m afraid that it doesn’t work particularly well and I can’t spend too much time trying to fix (I’ll instead spend time replacing it in a future version)… Still, it may help to increase the RNGFND_TURN_ANGL from 45 to 450 (or something inbetween).


After several days in the hospital, today I tested the object avoidance and now it works. I setup the value to 100 and now turns more aggresive

Thaaaank you very much for you help and patience


1 Like

I can’t find RNGFND_TURN_ANGL now

I have problems with simple setup. I can’t change settings while lidar is working and shows distance correctly.

How do I allow avoidance setup?