Skip to content

Commit

Permalink
mc_trajectory_tuning: bring up to date with acceleration based stick …
Browse files Browse the repository at this point in the history
…mapping

To safe users from confusion e.g.
PX4/PX4-Autopilot#19101
  • Loading branch information
MaEtUgR committed Feb 25, 2022
1 parent d3c0796 commit 078245c
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions en/config_mc/mc_trajectory_tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,40 @@ Poorly tuned *setpoint values* cannot result in instability, but may result in e

[Mission mode](../flight_modes/mission.md) used the [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md) trajectory all the time.

[Position mode](../flight_modes/position_mc.md) supports all the [trajectory types](#trajectory-implementations) listed below.
It uses the [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md) trajectory by default; other types can be set using [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE).
[Position mode](../flight_modes/position_mc.md) supports the [implementations](#position-mode-implementations) listed below.
It uses the acceleration based mapping by default; other types can be set using [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE).

[Altitude mode](../flight_modes/altitude_mc.md) similarly uses the [trajectory types](#trajectory-implementations) selected by [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE), but *only* for smoothing the vertical component (i.e. when controlling the altitude).
[Altitude mode](../flight_modes/altitude_mc.md) similarly supports the [implementations](#altitude-mode-implementations) selected by [MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE), but *only* for smoothing the vertical component (i.e. when controlling the altitude).

No other modes support trajectory tuning.

## Trajectory Implementations
## Position Mode Implementations

The following list provides an *overview* of the different trajectory implementations:
The following list provides an *overview* of the different implementations of how the stick input is interpreted and turned into trajectory setpoints:

- [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md) (Default)
- Acceleration based (Default)
- Horizontal stick input mapped to acceleration setpoints.
- Intuitive stick feel because it's like pushing the vehicle around.
- No unexpected tilt changes upon reaching travel speed velocity.
- Vertical stick input mapped with jerk-limited trajectory.
- Set in position mode using `MPC_POS_MODE=4`.
- [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md)
- Used when smooth motion is required (e.g.: filming, mapping, cargo).
- Generates symmetric smooth S-curves where the jerk and acceleration limits are always guaranteed.
- May not be suitable for vehicles/use-cases that require a faster response - e.g. racer quads.
- May not be suitable for vehicles/use-cases that require a faster response - e.g. race quads.
- Set in position mode using `MPC_POS_MODE=3`.
- **Simple position control**
- Sticks map directly to velocity setpoints without smoothing.
- Useful for velocity control tuning.
- Set in position mode using `MPC_POS_MODE=0`.

## Altitude Mode Implementations

Analogously to [position mode implementations](#position-mode-implementations) these are the implementations for interpreting vertical stick input:

- [Jerk-limited](../config_mc/mc_jerk_limited_type_trajectory.md)
- Smoothed vertical input.
- Set in altitude mode with `MPC_POS_MODE` 3 or 4.
- **Simple altitude control**
- Unsmoothed vertical input.
- Set in altitude mode only when using `MPC_POS_MODE=0`.

0 comments on commit 078245c

Please sign in to comment.