I am setting up with two rovers (RC cars) and after solving a problem with the steerint tunning, I would like to configure the obstacle avoidance.
I have performed many tests and found that the vehicle back off from obstacles, I mean, if I put myself in front of it, it moved in reverse running away from me.
The thing is, today, it does work anymore and I cannot think of a reason.
I have noticed also that the vehicle does not brake, before, speed got reduced fast, I remember seeing the car stopping with a full brake at the last WP in a mission. Now, it just slow down gradually. Before today, the car almost stopped in every waypoint, now, it is not noticeable.
I can only think in two possibilities:
- I had a problem with the car not steering properly (see this post ), and as @rmackay9 suggested, updated the firmware from rover 4.1.3 to rover 4.2.0dev. Now, I have downgraded to 4.1.5 official but backing off from obstacle does not work with that version either.
- a change in some parameters affecting this functionality. I have performed a text comparision of the parameters today and several days ago, when I am sure it was working, the parameters from datasflash logs of different dates. the only differences I think could be related are: now the PRX_MIN and PRX_MAX are explicitely stored in the logs with a value of zero; before today, dataflash logs did not have these parameters. However, a zero value should not affect. All other changes are just PID values in the steering and a few non-related more. I cannot change them in MP, they are not listed, anyway. Another parameter I changed was the THR_MIN from 0% to 20% as I noticed that motor start rotating at 30% throttle and forgot to tune this parameter. I don’t believe that a
I have configured obstacle avoidance with PRX_TYPE=4 (rangefinder, a tfmini-plus facing forward) , OA_TYPE = 1 (bendy-ruler)
Another interesting thing: while in guided or auto mode, the car detect the obstacles an avoid them, is just the backing off from them when the rover is still.
Also, as it does not brake properly, it detects obstacles like a wall but does not stop in time (I can see the PIDdesired trying to slow down the car).
UPDATE: just after posting this, I thought it would be a good idea to try to set MOT_THR_MIN back to 0%, doing that, the car brake as before. I understand then that this parameter affect at the PWM values that AP send to the ESC to slow down. But backing off from obstacles does not work with this change, so there must be another reason.
So, I will be very grateful if you could help me with this issue.
My first question would be: is backing off from obstacles something you can disable or enable? how?
Thanks all in advance!
Parameters as of today (do not work): sd0 crash into a wall 00000051.BIN.param (15.4 KB)
A today’s dataflash log: Sign in to your account
Parameters from 11 days ago (it was working): 00000038.BIN.param (15.3 KB)