I'm trying to use Flightmare(home) simulator to create a control model using reinforcement learning.

The simulator is great, but its environment accepts step command with four values of rotor thrusts in the range [-1:1].

env.step(float t1, float t2, float t3, float t4)

And the RL model output them too.

The problem is, that I can't find the way to "convert" those thrusts values to Yaw/Pitch/Roll/Throttle commands so I can send them with SBUS to Quadrotor flight controller.

I've googled for a solution for two days already and getting desperate.

I there a way/code/lib to do it? Could you point me in the right direction?

  • $\begingroup$ I'd look into multirotor "mixers". I don't have any good resources to link for reference, which is why I'm not writing an answer, but there are good examples buried within the Betaflight/CF/iNav/etc. FC firmware codebases. These mixers convert r/p/y commands to thrusts, so you should be able to invert that process to go the other way. $\endgroup$
    – ifconfig
    Commented Feb 23 at 2:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.