Skip to content

Commit

Permalink
feat(pid_longitudinal_controller): update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Berkay Karaman <[email protected]>
  • Loading branch information
brkay54 committed Nov 10, 2023
1 parent 6d7d48c commit 15a8b27
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 312 deletions.
38 changes: 13 additions & 25 deletions control/pid_longitudinal_controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,22 @@ For reliable stopping, the target acceleration calculated by the FeedForward sys

Based on the slope information, a compensation term is added to the target acceleration.

There are two sources of the slope information, which can be switched by a parameter.
There are two sources of the slope information, both sources are used in controller with respect to state of the node.

- Pitch of the estimated ego-pose (default)
- Pitch of the estimated ego-pose
- Only used when `enable_adaptive_trajectory` is false.
- Calculates the current slope from the pitch angle of the estimated ego-pose
- It is used only for vehicle in stopped state because of delay compensation.
- Pros: Easily available
- Cons: Cannot extract accurate slope information due to the influence of vehicle vibration.
- Z coordinate on the trajectory
- Calculates the road slope from the difference of z-coordinates between the front and rear wheel positions in the target trajectory
- Pros: More accurate than pitch information, if the z-coordinates of the route are properly maintained
- Pros: Can be used in combination with delay compensation (not yet implemented)
- Only used when `enable_adaptive_trajectory` is true.
- Calculates the road slope from the difference of z-coordinates between the front and rear wheel positions in the target trajectory.
- It is used when the vehicle's velocity is higher than `adaptive_trajectory_velocity_th` otherwise pitch of the estimated ego-pose is used for slope value.
- Pros: More accurate than pitch information, if the z-coordinates of the route are properly maintained.
- Pros: Can be used in combination with delay compensation.
- Cons: z-coordinates of high-precision map is needed.
- Cons: Does not support free space planning (for now)
- Cons: Does not support free space planning (for now).

**Notation:** This function works correctly only in a vehicle system that does not have acceleration feedback in the low-level control system.

Expand Down Expand Up @@ -103,23 +107,6 @@ Depending on the actuating principle of the vehicle, the mechanism that physical

In this controller, the predicted ego-velocity and the target velocity after the delay time are calculated and used for the feedback to address the time delay problem.

### Slope compensation

Based on the slope information, a compensation term is added to the target acceleration.

There are two sources of the slope information, which can be switched by a parameter.

- Pitch of the estimated ego-pose (default)
- Calculates the current slope from the pitch angle of the estimated ego-pose
- Pros: Easily available
- Cons: Cannot extract accurate slope information due to the influence of vehicle vibration.
- Z coordinate on the trajectory
- Calculates the road slope from the difference of z-coordinates between the front and rear wheel positions in the target trajectory
- Pros: More accurate than pitch information, if the z-coordinates of the route are properly maintained
- Pros: Can be used in combination with delay compensation (not yet implemented)
- Cons: z-coordinates of high-precision map is needed.
- Cons: Does not support free space planning (for now)

## Assumptions / Known limits

1. Smoothed target velocity and its acceleration shall be set in the trajectory
Expand Down Expand Up @@ -161,7 +148,7 @@ The default parameters defined in `param/lateral_controller_defaults.param.yaml`
AutonomouStuff Lexus RX 450h for under 40 km/h driving.

| Name | Type | Description | Default value |
| :------------------------------------------ | :----- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
|:--------------------------------------------| :----- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|
| delay_compensation_time | double | delay for longitudinal control [s] | 0.17 |
| enable_smooth_stop | bool | flag to enable transition to STOPPING | true |
| enable_overshoot_emergency | bool | flag to enable transition to EMERGENCY when the ego is over the stop line with a certain distance. See `emergency_state_overshoot_stop_dist`. | true |
Expand All @@ -173,7 +160,8 @@ AutonomouStuff Lexus RX 450h for under 40 km/h driving.
| min_acc | double | min value of output acceleration [m/s^2] | -5.0 |
| max_jerk | double | max value of jerk of output acceleration [m/s^3] | 2.0 |
| min_jerk | double | min value of jerk of output acceleration [m/s^3] | -5.0 |
| use_trajectory_for_pitch_calculation | bool | If true, the slope is estimated from trajectory z-level. Otherwise the pitch angle of the ego pose is used. | false |
| enable_adaptive_trajectory | bool | If true, the slope is estimated from trajectory z-level when velocity is higher than `adaptive_trajectory_velocity_th`. Otherwise the pitch angle of the ego pose is used. | true |
| adaptive_trajectory_velocity_th | double | value for state transition of slope sources. Only usable when `enable_adaptive_trajectory` is true. [m/s] | 1.0 |
| lpf_pitch_gain | double | gain of low-pass filter for pitch estimation | 0.95 |
| max_pitch_rad | double | max value of estimated pitch [rad] | 0.1 |
| min_pitch_rad | double | min value of estimated pitch [rad] | -0.1 |
Expand Down
Loading

0 comments on commit 15a8b27

Please sign in to comment.