Skip to content

Commit

Permalink
update ackermann flight modes
Browse files Browse the repository at this point in the history
  • Loading branch information
chfriedrich98 committed Oct 14, 2024
1 parent da9b081 commit 9e522e5
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 12 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 57 additions & 9 deletions en/flight_modes_rover/ackermann.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,74 @@ Selecting any other mode than those listed below will either stop the rover or c

Manual modes require stick inputs from the user to drive the vehicle.

![Manual Controls](../../assets/airframes/rover/flight_modes/rover_manual_controls.png)
![Manual Controls](../../assets/airframes/rover/flight_modes/manual_controls_ackermann_rover.png)

The manual modes listed below provide increasing levels of autopilot support:

| Mode | Features |
| ---------------------- | -------------------------------------------------------------------- |
| [Manual](#manual-mode) | Directly map stick inputs to motor commands, no closed loop control. |
| Mode | Forward speed | Steering angle/lateral acceleration | Required measurements |
| -------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [Manual](#manual-mode) | Directly map stick input to motor command. | Directly map stick input to steering angle. | None. |
| [Acro](#acro-mode) | Directly map stick input to motor command. | Stick input creates a lateral acceleration setpoint for the control system to regulate. | Lateral acceleration. |
| [Position](#position-mode) | Stick input creates a speed setpoint for the control system to regulate. | Stick input creates a lateral acceleration setpoint for the control system to regulate. If this setpoint is zero (stick is centered) the control system will keep the rover driving in a straight line. | Lateral acceleration, yaw, speed and global position (GPS). |

### Manual Mode

The _Manual_ mode stops the rover when the RC control sticks are centred.
To manually move/drive the vehicle you move the sticks outside of the centre.
In this mode the stick inputs are directly mapped to motor commands. The rover does not attempt to maintain a specific orientation or compensate for external factors like slopes or uneven terrain!
The user is responsible for making the necessary adjustments to the stick inputs to keep the rover on the desired course.

| Stick | Effect |
| ---------------------- | ------------------------------------------ |
| Left stick up/down | Drive the rover forwards/backwards. |
| Left stick centered | Zero forward speed input. |
| Right stick left/right | Move the steering angle to the left/right. |
| Right stick centered | Set the steering angle to zero. |

For the configuration/tuning of this mode see [Manual mode](../config_rover/ackermann.md#manual-mode).

Moving the left-stick up/down controls the _forward speed_ and moving the right-stick left/right controls the _steering angle_ of the vehicle.
### Acro Mode

::: info
The rover does not attempt to maintain a specific orientation or compensate for external factors like slopes or uneven terrain!
The user is responsible for making the necessary adjustments to the stick inputs to keep the rover on the desired course.
This mode requires a lateral acceleration measurement.
:::

In this mode the vehicle regulates its lateral acceleration to a setpoint (but does not stabilize heading or regulate speed).

| Stick | Effect |
| ---------------------- | ------------------------------------------------------------------------------------------------------- |
| Left stick up/down | Drive the rover forwards/backwards. |
| Left stick centered | Zero forward speed input. |
| Right stick left/right | Create a lateral acceleration setpoint for the control system to regulate. |
| Right stick centered | The control system will attempt to maintain a zero lateral acceleration (minimal disturbance rejection) |

Lateral acceleration can be directly mapped to a steering input based on the forward speed of the rover:

<!-- prettier-ignore -->
$$ \theta = \arctan(\frac{w_b \cdot a_{lat}}{ v^2}) $$

with $w_b:$ Wheel base, $\theta:$ Steering angle and $v:$ Forward speed.
For driving this means that the same right hand stick input will cause a different steering angle based on how fast you are driving. By limiting the maximum lateral acceleration, we can restrict the steering angle based on the speed which can prevent the rover from rolling over.
This mode will feel more like "driving a car" than [Manual](#manual-mode).

For the configuration/tuning of this mode see [Acro mode](../config_rover/ackermann.md#acro-mode).

### Position Mode

::: info
This mode requires a lateral acceleration, yaw, speed and global position estimate.
:::

This is the manual mode with the most autopilot support. The vehicle regulates its lateral acceleration and speed to a setpoint. If the lateral acceleration setpoint is zero, the controller will remember the gps coordinates and yaw (heading) of the vehicle and use those to construct a line that the rover will then follow (course control).
This offers the highest amount of disturbance rejection, which leads to the best straight line driving behavior.

| Stick | Effect |
| ---------------------- | -------------------------------------------------------------------------- |
| Left stick up/down | Create a speed setpoint for the control system to regulate. |
| Left stick centered | Zero forward speed input. |
| Right stick left/right | Create a lateral acceleration setpoint for the control system to regulate. |
| Right stick centered | The control system will maintain the course of the rover. |

For the configuration/tuning of this mode see [Position mode](../config_rover/differential.md#position-mode).

## Auto Modes

In auto modes the autopilot takes over control of the vehicle to run missions, return to launch, or perform other autonomous navigation tasks.
Expand Down
2 changes: 1 addition & 1 deletion en/flight_modes_rover/differential.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ For the configuration/tuning of this mode see [Stabilized mode](../config_rover/
This mode requires a yaw rate, yaw, speed and global position estimate.
:::

This is the mode with the most autopilot support. The vehicle regulates its yaw rate and speed to a setpoint. If the yaw rate setpoint is zero, the controller will remember the gps coordinates and yaw (heading) of the vehicle and use those to construct a line that the rover will then follow (course control).
This is the manual mode with the most autopilot support. The vehicle regulates its yaw rate and speed to a setpoint. If the yaw rate setpoint is zero, the controller will remember the gps coordinates and yaw (heading) of the vehicle and use those to construct a line that the rover will then follow (course control).
This offers the highest amount of disturbance rejection, which leads to the best straight line driving behavior.

| Stick | Effect |
Expand Down
2 changes: 1 addition & 1 deletion en/frames_rover/ackermann.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ PX4 does not require that the vehicle uses the Ackermann geometry and will work

![Axial Trail Honcho](../../assets/airframes/rover/rover_ackermann/axial_trail_honcho.png)

See [Configuration/Tuning](../config_rover/ackermann.md) to set up your rover and [Drive Modes (RA)](../flight_modes_rover/ackermann.md) for the supported flight (aka drive) modes.
See [Configuration/Tuning](../config_rover/ackermann.md) to set up your rover and [Drive Modes](../flight_modes_rover/ackermann.md) for the supported flight (aka drive) modes.
2 changes: 1 addition & 1 deletion en/frames_rover/differential.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Rotation is achieved by driving the wheels at different speeds in opposite direc

![Aion R1](../../assets/airframes/rover/aion_r1/r1_rover_no_bg.png)

See [Configuration/Tuning](../config_rover/differential.md) to set up your rover and [Drive Modes (RD)](../flight_modes_rover/differential.md) for the supported flight (aka drive) modes.
See [Configuration/Tuning](../config_rover/differential.md) to set up your rover and [Drive Modes](../flight_modes_rover/differential.md) for the supported flight (aka drive) modes.

0 comments on commit 9e522e5

Please sign in to comment.