# Controlling a vehicle motion axis with controller triggers

**URL:** <https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096>\
**Category:** Cockpit\
**Created:** [July 27, 2025, 7:46pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096 "2025-07-27T19:46:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [July 27, 2025, 7:46pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/1 "2025-07-27T19:46:21Z")

</div>

As Cockpit recognises LT & RT axis on the X-box controller. Is there a way to use these as axis for controllable tilt/pitch, as opposed to using them as a tilt/pitch set point?

---

<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:** [July 29, 2025, 1:22am UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/2 "2025-07-29T01:22:38Z")

</div>

Hi @3dMB,

That’s not currently feasible, but should be once [this change](https://github.com/bluerobotics/cockpit/issues/1759) has been implemented.

There’s [an underlying requirement](https://github.com/bluerobotics/cockpit/issues/1640) for that which is in our current quarter goals, but the full feature may not get implemented until later in the year.

That said, once that requirement is implemented it should technically be possible to set up through a workaround, if you’re willing to not use the built-in [`MANUAL_CONTROL`](https://mavlink.io/en/message/common.html#MANUAL_CONTROL) pipeline, and instead implement joystick outputs entirely through data-lake variables and one or more custom Actions.

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [August 3, 2025, 7:42pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/3 "2025-08-03T19:42:00Z")

</div>

you lost me on the third paragraph….ill take it as a ‘not yet’ 👍

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [March 22, 2026, 7:39pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/4 "2026-03-22T19:39:00Z")

</div>

I have seen similar themed posts, however they do not completely fit the bill.

I use Mode2 layout on the Xbox controller, and would like to modify the controls slightly.

I wish to:

Change Ascend/descend from left stick, to LT/RT axis

Change left stick forward/back (currently ascend/descend) to pitch up/down.

The above will allow me to have pitch and yaw on left stick, and ascend/descend not have the potential of accidental yaw.

This is with Cockpit, so the LT/RT will work (unlike QGC).

I am aware of the Trim Pitch control parameter, is there a different control parameter that could be used on the stick axis?

---

<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:** [March 22, 2026, 11:19pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/5 "2026-03-22T23:19:07Z")

</div>

Hi @3dMB,

> [@3dMB](#):
>
> This is with Cockpit, so the LT/RT will work

There’s actually a small factor that’s blocking this from working at the moment - I recently [implemented a fix](https://github.com/bluerobotics/cockpit/pull/2476) for it, but it needs to be reviewed before it can be included in a release. I’ve just marked that for fast-tracking, since there have been multiple requests for this kind of thing lately.

You’re welcome to test the pull request by [downloading a relevant artifact](https://github.com/bluerobotics/cockpit/actions/runs/22804528437) (requires being logged in to GitHub), but otherwise I’m hopeful it will be available in a beta release some time this week or next 🙂

> [@3dMB](#):
>
> is there a different control parameter that could be used on the stick axis?

`Axis T` controls pitch. I’m also working on [making that clearer](https://github.com/bluerobotics/cockpit/issues/2074), but it requires some infrastructure improvements that need to be well considered so we can maintain them effectively - apologies for the ambiguity/confusion in the meantime.

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [March 23, 2026, 9:16pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/6 "2026-03-23T21:16:29Z")

</div>

Thanks @EliotBR

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [April 23, 2026, 6:38pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/7 "2026-04-23T18:38:32Z")

</div>

Was there any progress on this in a beta release, please @EliotBR ?

---

<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:** [April 23, 2026, 9:12pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/8 "2026-04-23T21:12:21Z")

</div>

[Per the pull request thread](https://github.com/bluerobotics/cockpit/pull/2476#issuecomment-4201785115):

> [@rafaellehmkuhl](#):
>
> We discussed internally and decided to leave this PR to be merged only after the 1.18 release, as despite being a simple change, it deals with a critical pipeline (joystick controls), and we want to invest a lot on testing before we put it on a stable release.

It will be one of the first changes included in a 1.19 beta, which should be released just after the 1.18.0 stable (expected in the coming weeks). Sorry for the delay on my initial expectation!

If you’d like to test it sooner you’re welcome to do so via the Artifacts 🙂

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [June 1, 2026, 6:05pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/9 "2026-06-01T18:05:22Z")

</div>

Hi @EliotBR - now 1.18.x is released, is the beta for this still on the cards?

---

<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:** [June 1, 2026, 9:04pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/10 "2026-06-01T21:04:27Z")

</div>

Still on the cards, but I’m on break at the moment.

IIRC the feature is partially held up from a desire to avoid requiring a migration later for some more advanced functionality that I was hoping to roll in with it (frontend all-vehicle gain and reversing), but if those seem low priority to you we can potentially merge and release just the base axis transfer and then do the extra migration work after I get back. Do you have a preference?

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [June 2, 2026, 7:20am UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/11 "2026-06-02T07:20:49Z")

</div>

Enjoy your holiday @EliotBR - lets pick this up when you are back 👍

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [September 26, 2026, 9:24am UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/12 "2026-09-26T09:24:02Z")

</div>

@EliotBR I appreciate that you finished with a question, to which I didn’t respond to. Has the development of this progressed at all?

---

<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 26, 2026, 10:25pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/13 "2026-09-26T22:25:37Z")

</div>

We ended up merging in the axis data-lake transition (available in recent 1.19 betas), so (per the pull request description):

> [@Cockpit PR #2476 description](#):
>
> It’s possible to define numerical data-lake variables for Axis Z+ (`inputs/mavlink/axis-z-plus`) and Axis Z-, (`inputs/mavlink/axis-z-minus`) that then get assigned to the joystick shoulder triggers, with the values scaled and summed in the `Axis Z Output` compound variable (`500 * ({{ inputs/mavlink/axis-z-plus }} - {{ inputs/mavlink/axis-z-minus }} + 1)`) to provide up/down control for an ArduSub vehicle

You could do similarly for pitch (Axis T) or another axis, but they use the -1000 to +1000 range, so the compound variable definition would be `1000 * ({{ inputs/mavlink/axis-t-plus }} - {{ inputs/mavlink/axis-t-minus }})` instead.

* * *

The gain/reverse functionality is waiting on the ability to (easily) trigger notifications to share the new state, so we decided to push ahead without it, and will implement it with a relevant migration step later 🙂

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [September 30, 2026, 12:12pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/14 "2026-09-30T12:12:48Z")

</div>

@EliotBR I am looking at the Datalake variables trying to translate your previous description into layman’s terms.

 ![Screenshot 2026-09-30 130045](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/3X/5/2/5267b0dfc10025f0277adfad51c2f7ad5ad165fd.png)

My datalake shows ‘Axis Z output’ and ‘Axis Z’. I do not have the ‘Axis Z+’ or ‘Axis Z-’ as said in the first part of the description. Do I need to ‘add variable’ for each of these, then paste the bracketed “inputs…” into the actions/expression? Then paste the “500 \* ({{ inputs…” into the ‘Axis Z Output’ actions/expression?

For the ‘Axis T’, I have similar:

 ![Screenshot 2026-09-30 131043](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/3X/c/4/c4fb6cea12352177a2469d49f11f6ac5750e057f.png)

For this would I then just paste the “1000 \* ({{ inputs…” into ‘Axis T Output’ actions/expression?

---

<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 30, 2026, 12:48pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/15 "2026-09-30T12:48:17Z")

</div>

> [@3dMB](#):
>
> Do I need to ‘add variable’ for each of these, then paste the bracketed “inputs…” into the actions/expression?

Exactly. The `inputs/…` I included as example IDs that will help them match the existing datalake variables with related functionality, but you can adjust both the names and IDs of variables you create as you see fit (e.g. you may wish to call the Axis Z +/- variables “Up” and “Down” instead).

> [@3dMB](#):
>
> Then paste the “500 \* ({{ inputs…” into the ‘Axis Z Output’ actions/expression?

Yep! Replace the existing definition with the new split-axis one, so your controller isn’t trying to use both the triggers and a joystick at the same time for controlling a single axis.

> [@3dMB](#):
>
> … would I then just paste the “1000 \* ({{ inputs…” into ‘Axis T Output’ actions/expression?

Indeed - you’ll need to create new variables and change the output definition for any axis you want split.

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [September 30, 2026, 2:54pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/18 "2026-09-30T14:54:30Z")

</div>

Right…I think I have it. According to my thruster directions, Axis T is Roll, not Pitch. Axis S shows as pitch.

IF I set the following (but with 'axis-s-plus, etc), AND use -1000 to 1000 on the joystick variables, the thrusters go mad.

> [@EliotBR](#):
>
> 1000 \* ({{ inputs/mavlink/axis-t-plus }} - {{ inputs/mavlink/axis-t-minus }})

IF I remove the “1000\*” from the above text and set the joystick to -75 to 75, it seems to be much more realistic.

I will do a wet test over the next couple pf days.

---

<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 30, 2026, 4:40pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/19 "2026-09-30T16:40:33Z")

</div>

> [@3dMB](#):
>
> According to my thruster directions, Axis T is Roll, not Pitch. Axis S shows as pitch.

I’ve just checked [in the code](https://github.com/ArduPilot/ardupilot/blob/ArduPilot-4.7/ArduSub/joystick.cpp#L119-L120) and that is in fact correct. It seems I got the pitch/roll ordering the wrong way around in my axis naming Issue in Cockpit, and I’ve presumably carried that mistake around since then when referring back to it - sorry!!

> [@3dMB](#):
>
> IF I remove the “1000\*” from the above text and set the joystick to -75 to 75, it seems to be much more realistic.

If you’re trying to split `Axis S` then the `Axis S Output` compound variable definition shouldn’t be referring to the original `inputs/mavlink/axis-s` variable anymore - it should only be using the new `-plus` and `-minus` ones (in which case the “Axis S” variable you may have assigned to a joystick input will no longer have any effect, including its range).

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [September 30, 2026, 5:07pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/20 "2026-09-30T17:07:06Z")

</div>

> [@EliotBR](#):
>
> If you’re trying to split `Axis S` then the `Axis S Output` compound variable definition shouldn’t be referring to the original `inputs/mavlink/axis-s` variable anymore - it should only be using the new `-plus` and `-minus` ones (in which case the “Axis S” variable you may have assigned to a joystick input will no longer have any effect, including its range).

When you say “split Axis S”, do you mean psplitting pos & neg on different control buttons, as with the Z-axis, or is “split” uses in a different way? I seem to have found a way that works on the bench, Ill double check exactly what I have done tomorrow and report back.

---

<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 30, 2026, 5:09pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/21 "2026-09-30T17:09:15Z")

</div>

> [@3dMB](#):
>
> When you say “split Axis S”, do you mean psplitting pos & neg on different control buttons, as with the Z-axis

Yes, if that’s what you’re trying to do.

> [@3dMB](#):
>
> IF I remove the “1000\*” from the above text and set the joystick to -75 to 75, it seems to be much more realistic.

Following up on this, I’ve just found that the s and t inputs [aren’t being scaled properly in the firmware](https://github.com/ArduPilot/ardupilot/pull/34551), and aren’t respecting the pilot gain, so for now it makes sense that you’ll want a smaller multiplier there 😅

400 instead of 1000 would be equivalent to 100% gain (with any higher scales saturating partway through the range of the input), and 75 would just be equivalent to a lower gain.

---

<div class="post-metadata">

**Author:** ![3dMB](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/3dmb/32/13905_2.png) [@3dMB](https://discuss.bluerobotics.com/u/3dMB)\
**Post date:** [September 30, 2026, 5:17pm UTC](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096/22 "2026-09-30T17:17:28Z")

</div>

> [@EliotBR](#):
>
> Yes, if that’s what you’re trying to do.

ok - as that is what I had assumed, and as the thumbsticks are not split, I had assumed that the split was not necessary, but that lead to the Datalake registering the stick movement, but that did not do anything to the thrusters (that’s the reason for the deleted posts). IIRC I did do a split, but bound the stick to only Axis S - variable, but will confirm tomorrow

[Next page](https://discuss.bluerobotics.com/t/controlling-a-vehicle-motion-axis-with-controller-triggers/21096.md?page=2)
