Multirotor in SITL won't hold alt in loiter and other modes

First post, sorry for any toes I step on in this learning process.

First off, here is the base information. Please let me know if I can provide anything else.
Versions:
Mission Planner 1.3.31 build 1.1.5696.33420
APM: Copter V3.4-dev (bc26eaab)

The symptoms:
Take off and guided mode work great. As soon as I command a mode of “Loiter”, the vehicle starts losing altitude until it hits the ground. I have only been able to save it from crashing by putting it back into Guided mode.

The same symptoms also occur in AltHold and Circle. I’m aware that all three of these modes are highly related, so I’m assuming the same problem is effecting all of them.

The only thing I’ve found online that might fix this has to do with setting the Throttle Mid Position. The SITL defaults to 500, but the vehicle hovers at about 42% throttle. So, I set the mid point to 420, but that had no effect. In an attempt to test the limits, I then proceeded to set the mid throttle at it’s lowest value (300) in hopes that the vehicle would climb instead of drop. No luck, the vehicle continues to lose altitude.

Clues:
This same behavior appears when controlling with MavProxy.

Can anyone provide me some clues or keywords here? I’ve exhausted my google search terms, and need a point in the right direction.

Thank you so very much for any time you spend reading or replying to my post!

Side comments:
I attempted to record logs, but the tutorial here didn’t work, and the one linked to here on this forum comes up as 404. Everything else I’ve found is geared towards hardware. I’ll happily provide logs if someone can point me to a tutorial for the SITL.

2 Likes

Update: Still no luck, but here is what I’ve tried.

I changed the parameters of the orbit from 20 deg/s to 5 deg/s and from a 10 meters (1000cm) radius to a 100 meter radius. When commanding circle mode with these variables I am able to see the copter start flying the circle as described, but it loses altitude the whole time.

I tried changing the SITL frame type from “X” to “Plus” which had no effect.

1 Like

I don’t have data flash logs, but I now have Telemetry Logs!
Just prior to this I reset parameters to default, and turned off arm checks. If you playback the log you’ll see:
[ul]Takeoff in guided mode
Go into circle mode, lose altitude rapidly
Go into guided mode, stop losing altitude
Go into Alt Hold mode, lose altitude rapidly
Go into guided mode, stop losing altitude
Go into Loiter mode, lose altitude rapidly[/ul]

1 Like

Even if people don’t have a solution or helpful hints, if you know that the sim works on your own machine could you let me know?

Hi there,

I’m having exactly the same problem as the one you are describing. This guy here seems to have solved a similar problem: viewtopic.php?t=13464&p=36558 However I’m pretty new to this so I’m not sure exactly what he means by the failsafe.

Have you had any luck resolving it yet?

1 Like

Hey there,

If you’re still having problems I have found that to resolve this you can first enter the command in MAVProxy ‘rc 3 1500’ to simulate input from the pilot because in these modes the pilot controls the altitude. After this, there shouldn’t be any problems when changing to loiter, circle etc.

2 Likes

Earendil, I have got the same problem. I found the reason is that RC3 set to 1100. It can be solved in this way, after takeoff in guided mode, send ‘rc3 1500’ to set throttle to 1500, then change mode to loiter, the altitude will be hold.

3 Likes

I am having this same issue and wonder if there is a more complete resolution.

I have sent the command “rc 3 1500” and that seems to take care of the loss of altitude problem. I can now enter loiter and circle mode. However, the CIRCLE_RADIUS parameter seems to be ignored. I have tried multiple values for this parameter and the best I have been able to achieve is for the craft to hold altitude and spin in place.

Any additional info regarding how to implement a workable circle will be appreciated.