Skip to content

[Bug] Inverted Roll Stick Logic in Orbit Mode (FlightTaskOrbit) #26107

Description

@Lqs66

Describe the bug

The Roll stick control for orbit acceleration is inverted compared to the official documentation diagram. Currently, the code logic causes the vehicle to accelerate Clockwise when the stick is moved Left, which contradicts the standard definition (Right stick = CW acceleration).

Current Behavior:

  • Roll Left: Accelerates Clockwise (CW) (Velocity increases).
  • Roll Right: Accelerates Counter-Clockwise (CCW) (Velocity decreases/reverses).

Code:

velocity -= _sticks.getRollExpo() * _deltatime * _param_mpc_acc_hor.get();

Since PX4 defines positive velocity as Clockwise, a positive stick input (Right) should add to the velocity.

Proposed Fix: Change the operator from -= to +=:
velocity += _sticks.getRollExpo() * _deltatime * _param_mpc_acc_hor.get();

Doc:https://docs.px4.io/main/en/flight_modes_mc/orbit#orbit-multicopter

Image

To Reproduce

  1. Enter Orbit Mode.

  2. Input Roll Right command.

  3. Observe that the vehicle accelerates in the CCW direction (or decelerates if currently moving CW).

Expected behavior

  • Roll Left: Should accelerate Counter-Clockwise (CCW).
  • Roll Right: Should accelerate Clockwise (CW). (Consistent with the "Orbit Mode" diagram in the user guide).

Screenshot / Media

No response

Flight Log

Log: https://logs.px4.io/plot_app?log=50e611ef-f73f-483a-aed3-b59703442ee8

Software Version

V1.15.2->main

Flight controller

copter

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:staleInactive and may be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions