# Manually controlling thruster output

**URL:** <https://discuss.bluerobotics.com/t/manually-controlling-thruster-output/12867>\
**Category:** Blue Robotics Software\
**Created:** [September 5, 2022, 11:15am UTC](https://discuss.bluerobotics.com/t/manually-controlling-thruster-output/12867 "2022-09-05T11:15:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [September 5, 2022, 11:01pm UTC](https://discuss.bluerobotics.com/t/manually-controlling-thruster-output/12867/2 "2022-09-05T23:01:20Z")

</div>

Hi @cmarq,

> [@Pymavlink outputs PWM to the motor](https://discuss.bluerobotics.com/t/pymavlink-outputs-pwm-to-the-motor/11053/3):
>
> Control of individual thrusters with a single message isn’t possible with the current MAVLink specification, but there are some [workarounds for it discussed here](https://discuss.bluerobotics.com/t/how-to-control-thrusters-independently/9870/11) [(including an example implementation)] if you’re interested.
> 
> Is there a particular reason you want/need to control individual thrusters? Generally control is simpler when it’s abstracted to the motion directions you want to command (e.g. forwards, turn left, etc), so I’m curious what your use-case is.
> 
> I would note that if you’re wanting to make your own control algorithm instead of the ones that are already available in ArduSub, you’ll have much lower latency and more frequent sensor updates if you implement your algorithm(s) within ArduSub (e.g. as a custom/modified flight mode), rather than in Pymavlink. I understand Python is generally easier to get started with when testing things, but if your use-case requires high performance control then it makes the most sense to implement that in the flight controller board firmware 🙂

[This comment](https://discuss.bluerobotics.com/t/how-to-realize-control-allocation-with-bluerov/11283/6) may also be worth a read.

> [@cmarq](#):
>
> if I wanted to create my own flight mode, how could I call motors directly?

ArduSub’s flight modes are set up around a motion-direction abstraction, where they specify thrust components for forward, lateral, roll, etc, and the underlying motors code handles the conversion into individual motor outputs. Having looked at the relevant motors code, you would presumably need to override [`output_armed_stabilizing`](https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_Motors/AP_Motors6DOF.cpp#L290) (where the final thrust output for each motor is stored as a -1 to 1 float in the `_thrust_rpyt_out` array), but it may be quite involved to try to make that swappable via a flight mode, since that’s not how the other flight modes operate.

---

_[View the full topic](https://discuss.bluerobotics.com/t/manually-controlling-thruster-output/12867)._
