wil3 / gymfc

A universal flight control tuning framework
http://wfk.io/neuroflight/
MIT License
389 stars 99 forks source link

Motor output usage larger than simulation #94

Closed airopti closed 3 years ago

airopti commented 3 years ago

In the real flight test part of your thesis, the 4 motors output around 50% usage to track desired angular speed [0, 0, 0] rad/s at the first few seconds as shown in Figure 5.23. While in simulation as shown in Figure 5.19, the motor usage is around 0.1 to track [0, 0, 0] rad/s .

Why would this mismatch happen? In real flight test, the high motor usage to track [0, 0, 0] rad/s when no stick input will make the drone climb?

wil3 commented 3 years ago

Hi @airopti, the simulation environment does not have gravity thus less power is required. See Issue: #78 for more information.

During training the agent is penalized for too high control outputs (to prevent the aircraft from climbing). You can identify the control signal required to hover (overcome gravity) in a real flight test and then use this within the reward function.

In the beginning of development this was one of the biggest challenges: how to teach the quad when idle on the ground (setpoint of 0 deg/s) to minimize control signal output and not punch it (which happened alot....). I talk about this a bit in my thesis presentation.