RTL and AUTO mode working in strange mode

RTL and AUTO mode not working.

Yesterday I did more tests with the 4.4 dev, but it didn’t go well. In particular trying to do a mission between two waypoints, the copter seems to do it, but it gains altitude without any input from the pilot, turning yaw as if looking for something, even though the front sonar and bottom lidar sensors have been deactivated with aux switches. Furthermore, the copter does not respond to the RTL command, simply hovering where it is at the time of the RTL command. I attach a small video where you can see how she gets up and turns yaw and the flight log. There are more details in this thread.
Surely I will test with the new FW beta but I would like to know if I made a mistake or there are some problems with the code.

Hi @Alberto_Ds,

Thanks for testing and providing feedback.

I think the issue is that bendy ruler has been enabled as “Vertical search” (see OA_BR_TYPE = 2). Could you disable bendy ruler and see if this resolves the problem?

It looks like Rangefinder 2 is pointing forward and it is showing obstacles ahead of the vehicle so this must be the cause.

By the way it seems that almost all arming checks have been disabled with ARMING_CHECK = 64. In general leaving the arming checks on is a good idea because it will alert you to any safety issues before takeoff. If you’re sure that there is a false-positive then just disabling that one check is a better idea. I know arming checks can be annoying but each one was added for a reason and normally in response to something going wrong for a user.

FYI @rishabsingh3003

2 Likes

Hi @rmackay9 and thanks for the feedback!
My aim was just to test the vertical bendyruler exactly as seen in Risha’s video. The terrain where I carried out the test had no obstacles and the front sonar has a range of a few metres, I don’t think it can see obstacles. Could it be a front sonar malfunction? Yet the simple stop works, as seen in this video. I will still try disabling the bendyruler. Could all of this explain why RTL doesn’t work? Meanwhile I updated the fw to 4.5 dev

Hi @Alberto_Ds,

I think the sonar is seeing some noise. It is probably no persistent enough to cause problems with stopping behaviour but bendy ruler might be trying to avoid the noise.

Maybe try some of these settings:

  • set OA_DB_DIST_MAX to 5m so nothing farther than 5m away is ever avoided
  • set OA_MARGIN_MAX to 2m
  • set OA_BR_LOOKAHEAD to 5m so bendy-ruler avoidance doesn’t try to look too far ahead of the vehicle
1 Like

Thank you
I will try with 4.5 and these parameters. I’ll update the post with the results :slight_smile:

1 Like

Hi @rmackay9 FYI @rishabsingh3003

I tried a small flight with a mission with 2 WP (also obtained in the field), with the parameters indicated in this same thread, but unfortunately nothing seems to have changed. The copter in auto mode (bendyruler veritical) increases in flight altitude uncontrollably and I have to regain control in loiter (which works fine). I attach log bin. Thanks for any advice!

Hi Randy @rmackay9 ,

yesterday i flew disabling the front sonar (prx1,0) and in auto mode it works fine. It must be a problem related to the bendy ruler, but I don’t understand how to fix it :frowning:

note: I only left the point down lidar active and, although the sonarrange was correctly updated in mission planner and in flight via yaapu script, the copter seemed not to use it (simple stop slide set). Could it be some wrong setting on prx/rngfnd?

1 Like

Hi @Alberto_Ds,

Txs for the report. I’ve added it to our 4.4 issues list so we won’t forget about it.

1 Like