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
To Reproduce
-
Enter Orbit Mode.
-
Input Roll Right command.
-
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
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:
Code:
PX4-Autopilot/src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp
Line 306 in 5fe82aa
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
To Reproduce
Enter Orbit Mode.
Input Roll Right command.
Observe that the vehicle accelerates in the CCW direction (or decelerates if currently moving CW).
Expected behavior
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