wil3 / gymfc

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

How does neuroflight deal with gravity? #89

Closed FDU-curry closed 3 years ago

FDU-curry commented 4 years ago

Dear author, In the simulation environment of gymfc-v2, the gravity of quadrotor is not considered, but there is gravity in neurolight in actual flight. How do you deal with the gravity problem.

   The output of the neural network in gymfc is the throttle percentage u, while the input of the actual four rotor motor in neurolight is the PWM value. What is the conversion relationship between them?
wil3 commented 3 years ago

You are correct, gravity is not considered and therefore not dealt with. If you search 'gravity' in my thesis I explain the reasons but in summary if you introduce gravity into the simulation, the orientation of the aircraft matters more and increases the complexity of the RL simulation. As long as the multicopter is well balanced (such as the NF1 I built for the neuroflight work) the affects will probably not be a prominent when transferring to the real-world. Given the motor models are quite accurate, the neuro-controller is still learning the mapping between the input and output.

Not sure what the context of the code block you provide is though.