mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
Prettier, typos, minor wording
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# Rate Tuning
|
||||
|
||||
Rate tuning is required to use [Acro mode](../flight_modes_rover/manual.md#acro-mode) and all later modes.
|
||||
|
||||
::: warning
|
||||
The [basic setup](basic_setup.md) must've already been completed before this step!
|
||||
The [Basic Setup](basic_setup.md) must've already been completed before this step!
|
||||
:::
|
||||
|
||||
To tune the rate controller and unlock [Acro mode](../flight_modes_rover/manual.md#acro-mode) configure the following [parameters](../advanced_config/parameters.md) in QGroundControl:
|
||||
Configure the following [parameters](../advanced_config/parameters.md) in QGroundControl:
|
||||
|
||||
1. [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM): Maximum yaw rate you want to allow for your rover.
|
||||
|
||||
@@ -15,21 +17,21 @@ To tune the rate controller and unlock [Acro mode](../flight_modes_rover/manual.
|
||||
If this is the case:
|
||||
|
||||
1. In [Acro mode](../flight_modes_rover/manual.md#acro-mode), set [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM) to a small value, drive the rover at full throttle and steer all the way to the left or right.
|
||||
1. Increase [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM) until the wheels of the rover start to lift up.
|
||||
1. Set [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM) to the highest value that does not cause the rover to lift up.
|
||||
2. Increase [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM) until the wheels of the rover start to lift up.
|
||||
3. Set [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM) to the highest value that does not cause the rover to lift up.
|
||||
|
||||
If you see no need to limit the yaw rate, set this parameter to the maximum yaw rate the rover can achieve:
|
||||
|
||||
1. In [Manual mode](../flight_modes_rover/manual.md#manual-mode) drive the rover at full throttle and with the maximum steering angle.
|
||||
1. Plot the `measured_yaw_rate` from [RoverRateStatus](../msg_docs/RoverRateStatus.md) and enter the highest observed value for [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM).
|
||||
2. Plot the `measured_yaw_rate` from [RoverRateStatus](../msg_docs/RoverRateStatus.md) and enter the highest observed value for [RO_YAW_RATE_LIM](#RO_YAW_RATE_LIM).
|
||||
|
||||
:::
|
||||
|
||||
1. (Optional) [RO_YAW_RATE_CORR](#RO_YAW_RATE_CORR) [-]: Yaw rate correction factor.
|
||||
2. (Optional) [RO_YAW_RATE_CORR](#RO_YAW_RATE_CORR) [-]: Yaw rate correction factor.
|
||||
|
||||
This can be used to scale the mapping from the yaw rate setpoint to the steering effort if it is offset from the [idealized mapping](#kinematic-models) (This could be due to wheel misalignments, excessive friction etc.).
|
||||
|
||||
:::note
|
||||
::: info
|
||||
Skid/tank-steered and mecanum rovers will most likely require this adjustment.
|
||||
:::
|
||||
|
||||
@@ -38,11 +40,11 @@ To tune the rate controller and unlock [Acro mode](../flight_modes_rover/manual.
|
||||
This way the yaw rate is only controlled by the feed-forward term, which makes it easier to tune.
|
||||
Now put the rover in [Acro mode](../flight_modes_rover/manual.md#acro-mode) and then move the right-stick of your controller to the right and/or left and hold it at a few different levels for a couple of seconds each while driving with a constant throttle (for differential/mecanum rovers this can also be done while standing still).
|
||||
Disarm the rover and from the flight log plot the `adjusted_yaw_rate_setpoint` from [RoverRateStatus](../msg_docs/RoverRateStatus.md) and the `measured_yaw_rate` from [RoverRateStatus](../msg_docs/RoverRateStatus.md) over each other.
|
||||
If the actual yaw rate of the rover is higher than the yaw rate setpoint, decrease [RO_YAW_RATE_CORR](#RO_YAW_RATE_CORR) (between (0, 1]).
|
||||
If it is the other way around increase the parameter [1, inf) and repeat until you are satisfied with the setpoint tracking.
|
||||
If the actual yaw rate of the rover is higher than the yaw rate setpoint, decrease [RO_YAW_RATE_CORR](#RO_YAW_RATE_CORR) (between [0, 1]).
|
||||
If it is the other way around increase the parameter [1, inf] and repeat until you are satisfied with the setpoint tracking.
|
||||
:::
|
||||
|
||||
1. [RO_YAW_RATE_P](#RO_YAW_RATE_P) [-]: Proportional gain of the closed loop yaw rate controller.
|
||||
3. [RO_YAW_RATE_P](#RO_YAW_RATE_P) [-]: Proportional gain of the closed loop yaw rate controller.
|
||||
The closed loop acceleration control will compare the yaw rate setpoint with the measured yaw rate and adapt the motor commands based on the error between them.
|
||||
The proportional gain is multiplied with this error and that value is added to the motor command.
|
||||
This compensates for disturbances such as uneven ground and external forces.
|
||||
@@ -56,19 +58,19 @@ To tune the rate controller and unlock [Acro mode](../flight_modes_rover/manual.
|
||||
1. Repeat until you are satisfied with the behaviour.
|
||||
:::
|
||||
|
||||
1. [RO_YAW_RATE_I](#RO_YAW_RATE_I) [-]: Integral gain of the closed loop yaw rate controller.
|
||||
4. [RO_YAW_RATE_I](#RO_YAW_RATE_I) [-]: Integral gain of the closed loop yaw rate controller.
|
||||
The integral gain accumulates the error between the desired and actual yaw rate scaled by the integral gain over time and that value is added to the motor command.
|
||||
|
||||
::: tip
|
||||
An integrator might not be necessary at this stage, but it will become important for subsequent modes.
|
||||
:::
|
||||
|
||||
1. (Optional) [RO_YAW_ACCEL_LIM](#RO_YAW_ACCEL_LIM)/[RO_YAW_DECEL_LIM](#RO_YAW_DECEL_LIM) [deg/s^2]: Used to limit the yaw acceleration/deceleration.
|
||||
5. (Optional) [RO_YAW_ACCEL_LIM](#RO_YAW_ACCEL_LIM)/[RO_YAW_DECEL_LIM](#RO_YAW_DECEL_LIM) [deg/s^2]: Used to limit the yaw acceleration/deceleration.
|
||||
This can be used to smoothen the yaw rate setpoint trajectory.
|
||||
|
||||
1. (Optional) [RO_YAW_STICK_DZ](#RO_YAW_STICK_DZ) [-]: Percentage of yaw stick input range that will be interpreted as zero around the stick centered value.
|
||||
6. (Optional) [RO_YAW_STICK_DZ](#RO_YAW_STICK_DZ) [-]: Percentage of yaw stick input range that will be interpreted as zero around the stick centered value.
|
||||
|
||||
1. (Advanced) [RO_YAW_RATE_TH](#RO_YAW_RATE_TH) [deg/s]: The minimum threshold for the yaw rate measurement not to be interpreted as zero.
|
||||
7. (Advanced) [RO_YAW_RATE_TH](#RO_YAW_RATE_TH) [deg/s]: The minimum threshold for the yaw rate measurement not to be interpreted as zero.
|
||||
This can be used to cut off measurement noise when the rover is standing still.
|
||||
|
||||
The rover is now ready to drive in [Acro mode](../flight_modes_rover/manual.md#acro-mode) and the configuration can be continued with [attitude tuning](attitude_tuning.md).
|
||||
@@ -92,6 +94,7 @@ The feed forward mapping is done using the kinematic model of the rover to trans
|
||||
### Kinematic Models
|
||||
|
||||
#### Ackermann
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
$$ \delta = \arctan(\frac{w_b \cdot \dot{\psi}}{v}) $$
|
||||
|
||||
@@ -121,7 +124,7 @@ with
|
||||
|
||||
The steering setpoint is equal to $v_{diff}$ interpolated from [-[RO_MAX_THR_SPEED](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED), [RO_MAX_THR_SPEED](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED)] to [-1, 1].
|
||||
|
||||
These mappings based on the idealized kinematic models can be adjusted with the multiplicative factor [RO_YAW_RATE_CORR](../advanced_config/parameter_reference.md#RO_YAW_RATE_CORR) to tune the feed forward part of the yaw rate controller to account for wheel misalignemnts, high friction etc.
|
||||
These mappings based on the idealized kinematic models can be adjusted with the multiplicative factor [RO_YAW_RATE_CORR](../advanced_config/parameter_reference.md#RO_YAW_RATE_CORR) to tune the feed forward part of the yaw rate controller to account for wheel misalignments, high friction etc.
|
||||
|
||||
## Parameter Overview
|
||||
|
||||
|
||||
Reference in New Issue
Block a user