Low level quadcopter control on companion computer

Hi,
I want to control a quadcopter by directly controlling the motor speed with a companion computer.
Is it possible to use IO_pass.main.mix mixer and RC_CHANNELS_OVERRIDE mavlink message?
Is there other possible solution?

Hi @JonathanPlasse ,

Using the passthrough mixer as you said might work.

However, there is no dedicated interface for such application mainly because (I’m sorry to say that) it’s not something you should do.
The reason is that the delay, update frequency and stability of the companion link is critical and known to be not that reliable. Even if the link is good, it might be difficult to stabilize properly the drone and if the link breaks, you can end up with the motors at a random speed that could lead to a dangerous crash.
I would suggest to use the companion computer to provide higher level inputs and keep the attitude and rate controllers onboard (ot at least the rate controller).

See here for details ont roll/pitch/yawrate/thrust offboard control: https://github.com/PX4/Firmware/pull/12061

Again, you will end up really frustrated if you try to control the motors of the drone from an offboard computer :expressionless:

Good luck!

1 Like

Hi.
I am going through the forums looking if anyone has similar project/goal as I do, and this is a first time I see someone talk about manual drone control.
My aim is to control a quadcopter from a off-board computer based on information received from overhead camera and some visual recognition algorithm. Would it be ok, to imitate the RC command bay using MANUAL_CONTROL command for x,y in simplified setup in 2D plane, if I presume I can determine quadcopter x,y in the camera image, or there a better way?
For now I have not found a reasonable way, to setup a local coordinate system to use SET_POSITION_TARGET_LOCAL_NED and the SET_ATTITUDE_TARGET commands and let the flight control do the actual flying. Maybe you can point me to some relevant documentation?

Thanks in advance.

@Themaksiest You can use this implementation as reference if you plan to use bodyrate commands in offboard mode: https://github.com/Jaeyoung-Lim/mavros_controllers