-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9cb2369
commit 575825b
Showing
17 changed files
with
341 additions
and
138 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file modified
BIN
+23.8 KB
(210%)
assets/airframes/rover/flight_modes/pure_pursuit_algorithm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+466 KB
(8500%)
assets/airframes/rover/rover_ackermann/geometric_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+464 KB
assets/airframes/rover/rover_differential/differential_slow_down_effect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+439 KB
(2700%)
assets/airframes/rover/rover_differential/differential_state_machine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Auto Modes (Rover) | ||
|
||
In auto modes the autopilot takes over control of the vehicle to perform autonomous navigation tasks. | ||
|
||
## Mission Mode | ||
|
||
_Mission mode_ is an automatic mode that causes the vehicle to execute a predefined autonomous [mission](../flying/missions.md) plan that has been uploaded to the flight controller. | ||
The mission is typically created and uploaded with a Ground Control Station (GCS) application, such as [QGroundControl](https://docs.qgroundcontrol.com/master/en/). | ||
|
||
### Mission commands | ||
|
||
Following is the list of currently implemented and tested mission related commands: | ||
|
||
| QGC mission item | Command | Description | | ||
| ------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | ||
| Mission start | [MAV_CMD_MISSION_START](https://mavlink.io/en/messages/common.html#MAV_CMD_MISSION_START) | Starts the mission. | | ||
| Waypoint | [MAV_CMD_NAV_WAYPOINT](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_WAYPOINT) | Navigate to waypoint. | | ||
| Return to launch | [MAV_CMD_NAV_RETURN_TO_LAUNCH](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_RETURN_TO_LAUNCH) | Return to the launch location. | | ||
| Delay until | [MAV_CMD_NAV_DELAY](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_DELAY) | The rover will stop for a specified amount of time. | | ||
| Change speed | [MAV_CMD_DO_CHANGE_SPEED](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_CHANGE_SPEED) | Change the speed setpoint | | ||
| Set launch location | [MAV_CMD_DO_SET_HOME](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_HOME) | Changes launch location to specified coordinates. | | ||
| Jump to item | [MAV_CMD_DO_JUMP](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_JUMP) (and other jump commands) | Jump to specified mission item. | | ||
| Loiter (all) | [MAV_CMD_NAV_LOITER_UNLIM](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_LOITER_UNLIM) (and other loiter commands) | This will simply stop the rover. | | ||
|
||
### Pure Pursuit Guidance Logic | ||
|
||
The desired yaw setpoints are generated using a pure pursuit algorithm: | ||
The controller takes the intersection point between a circle around the vehicle and a line segment. In mission mode this line is usually constructed by connecting the previous and current waypoint: | ||
|
||
![Pure Pursuit Algorithm](../../assets/airframes/rover/flight_modes/pure_pursuit_algorithm.png) | ||
|
||
The radius of the circle around the vehicle is used to tune the controller and is often referred to as look-ahead distance. | ||
|
||
The look ahead distance sets how aggressive the controller behaves and is defined as $l_d = v \cdot k$. | ||
It depends on the velocity $v$ of the rover and a tuning parameter $k$ that can be set with the parameter [PP_LOOKAHD_GAIN](#PP_LOOKAHD_GAIN). | ||
|
||
::: info | ||
A lower value of [PP_LOOKAHD_GAIN](#PP_LOOKAHD_GAIN) makes the controller more aggressive but can lead to oscillations! | ||
::: | ||
|
||
The lookahead is constrained between [PP_LOOKAHD_MAX](#PP_LOOKAHD_MAX) and [PP_LOOKAHD_MIN](#PP_LOOKAHD_MIN). | ||
|
||
If the distance from the path to the rover is bigger than the lookahead distance, the rover will target the point on the path that is closest to the rover. | ||
|
||
To summarize, the following parameters can be used to tune the controller: | ||
|
||
| Parameter | Description | Unit | | ||
| -------------------------------------------------------------------------------------------------------- | --------------------------------------- | ---- | | ||
| <a id="PP_LOOKAHD_GAIN"></a>[PP_LOOKAHD_GAIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_GAIN) | Main tuning parameter | - | | ||
| <a id="PP_LOOKAHD_MAX"></a>[PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Maximum value for the look ahead radius | m | | ||
| <a id="PP_LOOKAHD_MIN"></a>[PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Minimum value for the look ahead radius | m | | ||
|
||
::: note | ||
Both [Ackermann](../frames_rover/ackermann_rover.md#mission-parameters) and [differential](../frames_rover/differential_rover.md#tuning-mission) rovers have further tuning parameters that are specific to the respective modules. | ||
::: | ||
|
||
# Return Mode | ||
|
||
This mode uses the [pure pursuit guidance logic](#pure-pursuit-guidance-logic) with the launch position as goal. | ||
Return mode can be activated through the respective [mission command](#mission-commands) or through the ground station UI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Manual Modes (Rover) | ||
|
||
Manual modes require stick inputs from the user to drive the vehicle. | ||
|
||
![Manual Controls](../../assets/airframes/rover/flight_modes/rover_manual_controls.png) | ||
|
||
The different manual modes provide increasing levels of autopilot support: | ||
|
||
| Mode | Features | | ||
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------ | | ||
| [Manual Mode](#manual-mode) | Directly map stick inputs to motor commands, no closed loop control. | | ||
| [Acro Mode](#acro-mode) | Closed loop yaw rate control. | | ||
| [Stabilized Mode](#stabilized-mode) | Closed loop yaw rate and yaw control. | | ||
| [Position Mode](#position-mode) | Closed loop yaw rate, yaw and speed control and usage of GPS coordinates for improved straight line driving. | | ||
|
||
## 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. | ||
|
||
[**Differential Rover**](../frames_rover/differential_rover.md): Moving the left stick up/down controls the _forward speed_ and moving the right stick left/right controls the _yaw rate_ of the vehicle. | ||
|
||
[**Ackermann Rover**](../frames_rover/ackermann_rover.md): Moving the left stick up/down controls the _forward speed_ and moving the right stick left/right controls the _steering angle_ of the vehicle. | ||
|
||
::: note | ||
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. | ||
::: | ||
|
||
## Acro Mode | ||
|
||
::: info | ||
Acro mode is only supported for differential rovers. | ||
::: | ||
|
||
::: note | ||
This mode requires a yaw rate estimate. | ||
::: | ||
|
||
Acro Mode is similar to [Manual mode](#manual-mode), but with closed-loop yaw rate control. | ||
In this mode, the left stick input remains open-loop for forward speed control, while the right stick input commands a desired yaw rate setpoint, which is then maintained by the rover's closed-loop control system. | ||
|
||
See [Tuning(basic)](../frames_rover/differential_rover.md#tuning-basic) to go through the necessary setup to use acro mode for differential rovers. | ||
|
||
## Stabilized Mode | ||
|
||
::: info | ||
Stabilized mode is only supported for differential rovers. | ||
::: | ||
|
||
::: note | ||
This mode requires a yaw rate and yaw estimate. | ||
::: | ||
|
||
Just like [Acro mode](../flight_modes_rover/acro.md), the left stick input remains open-loop for forward speed control, while the right stick input commands a desired yaw rate setpoint, which is then maintained by the rover's closed-loop control system. | ||
But in addition to that, the rover will do closed loop yaw (or heading) control when the right stick is centered or in other words if the yaw rate setpoint is zero. | ||
This means that the rover will maintain the current heading if the user only gives throttle input, but no yaw rate input. | ||
Compared to [Acro mode](../flight_modes_rover/acro.md), this mode is much better at driving in a straight line as it can more effectively reject disturbances. | ||
|
||
See the tuning for [acro mode](../frames_rover/differential_rover.md#acro) section to go through the necessary setup to use acro mode for differential rovers. | ||
|
||
## Position Mode | ||
|
||
::: info | ||
Stabilized mode is only supported for differential rovers. | ||
::: | ||
|
||
::: note | ||
This mode requires a yaw rate, yaw, speed and position estimate. | ||
::: | ||
|
||
This is the most advanced manual mode. It uses _closed loop yaw rate control_, _closed loop speed control_ and a special logic for driving a straight line when there is no yaw rate input. | ||
In this mode, moving the left stick up/down commands a desired speed setpoint and moving the right stick left and right commands a desired yaw rate setpoint which are both close-loop controlled by the autopilot. | ||
If there is no yaw rate input, the controller will remember the gps coordiantes and yaw (or heading) of the vehicle and use those to construct a line that the rover will then follow using the [pure pursuit](../flight_modes_rover/auto.md#pure-pursuit-guidance-logic) algorithm (same path following algorithm as in auto modes). | ||
This way the rover is even better than the [stabilized mode](#stabilized-mode) at rejecting disturbances when driving a straight line. |
Oops, something went wrong.