Ardupilot: Direct control of drone motor speed through mavlink

Created on 22 Jul 2019  路  9Comments  路  Source: ArduPilot/ardupilot

Feature request

I want to be able to control directly the speed of each individual motor from the companion computer of the drone.

Could it be done by creating a new mavlink message?

Platform

  • [ ] All
  • [ ] AntennaTracker
  • [x] Copter
  • [ ] Plane
  • [ ] Rover
  • [ ] Submarine

Most helpful comment

The suggestion to use rc passthrough (i.e. set SERVOx_FUNCTION = RCIN1) is OK although this would mean the transmitter couldn't be used because it would be overwritten by the RC_OVERRIDE input from the companion computer. Also the regular AP flight code couldn't control the vehicle because it would be looking for SERVOx_FUNCTION = motor1,2,3,etc).

I think strategically the best way would be to create a new message (if we can't find one) and then add a new sub-mode to Guided mode so that if we are receiving these messages (and we're in guided) we accept these messages and pass them straight through.

All 9 comments

Can you describe the application?

@JonathanPlasse, it's possible using the motor test feature although only for a few seconds..

On Mon, 22 Jul 2019, Randy Mackay wrote:

@JonathanPlasse, it's possible using the motor test feature although only
for a few seconds..

I think notionally you could use pass-through using RC channel options.

Note that this is typically a terrible, terrible idea as the latencies
(and jitter!) will give you terrible control.

The suggestion to use rc passthrough (i.e. set SERVOx_FUNCTION = RCIN1) is OK although this would mean the transmitter couldn't be used because it would be overwritten by the RC_OVERRIDE input from the companion computer. Also the regular AP flight code couldn't control the vehicle because it would be looking for SERVOx_FUNCTION = motor1,2,3,etc).

I think strategically the best way would be to create a new message (if we can't find one) and then add a new sub-mode to Guided mode so that if we are receiving these messages (and we're in guided) we accept these messages and pass them straight through.

Can you describe the application?

@magicrub, It is to test low level control algorithms as MPC on the companion board.

Well then just map an input to an output instead of to a motor. ServoX_function=RCinYpassthrough.

And to control with the companion computer, can I use RC_CHANNELS_OVERRIDE?

@JonathanPlasse yes

Thanks a lot

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hyacinthchou picture Hyacinthchou  路  4Comments

machenxiang picture machenxiang  路  8Comments

robustini picture robustini  路  5Comments

yanivasy picture yanivasy  路  7Comments

bosskwei picture bosskwei  路  3Comments