autoware.universe icon indicating copy to clipboard operation
autoware.universe copied to clipboard

feat(motion_velocity_smoother): add steering rate limit while planning velocity

Open brkay54 opened this issue 2 years ago • 2 comments

Description

Closes #1023 Discussion Related #567

Autoware do not depend the steering angle rate. In lateral controller, we can set steering_rate_limit (here). However, when lower steering_rate_limit is set, the states that are calculated by lateral_controller are seem good. But longitudinal controller can not handle, It should slow down the vehicle because of low steering_angle_rate but it is not. And vehicle could not turn over the high curvature paths.

To solve this problem, I added new function into motion_velocity_smoother in smoother_base called applySteeringRateLimit. This function runs in following order:

  • Resample trajectory
  • Calculate the desired steering tire angles with following equation: desired_steering_angle_eq
  • Calculate the desired velocities with respect to current velocity and desired steering angle

Related links

Tests performed

Notes for reviewers

You can change the steering tire rate limit with the param in lateral controller. Also, you should check the parameters in motion_velocity_smoother.param.yaml. Please consider the min_curve_velocity parameter, if vehicle can not turn in the curves.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • [ ] The PR follows the pull request guidelines.
  • [ ] The PR has been properly tested.
  • [ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • [ ] There are no open discussions or they are tracked via tickets.
  • [ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

brkay54 avatar Jun 09 '22 14:06 brkay54

Codecov Report

Merging #1071 (cf17866) into main (c211845) will decrease coverage by 0.03%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1071      +/-   ##
==========================================
- Coverage   10.41%   10.37%   -0.04%     
==========================================
  Files        1218     1218              
  Lines       87494    87785     +291     
  Branches    20485    20528      +43     
==========================================
  Hits         9109     9109              
- Misses      68925    69216     +291     
  Partials     9460     9460              
Flag Coverage Δ *Carryforward flag
differential 3.57% <0.00%> (?)
total 10.39% <0.00%> (ø) Carriedforward from c211845

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...ity_smoother/src/motion_velocity_smoother_node.cpp 0.00% <0.00%> (ø)
...n_velocity_smoother/src/smoother/smoother_base.cpp 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Jun 09 '22 14:06 codecov[bot]

We would like to have LeoDrive to test this PR on their vehicle before merging.

mitsudome-r avatar Aug 02 '22 08:08 mitsudome-r

Next week will be tested.

@TakaHoribe has concerns about the lateral acceleration calculation methods. It might have noise issues. It might be better to smooth out data.

xmfcx avatar Aug 09 '22 15:08 xmfcx

This is being tested on the ISUZU bus right now, the updates will be shared after testing.

xmfcx avatar Aug 16 '22 07:08 xmfcx

velocity profile of vehicle with 5.0 dps steering rate in sharp turn.

Screenshot from 2022-08-19 14-15-10

brkay54 avatar Aug 19 '22 11:08 brkay54

@brkay54 are there any updates on this PR?

xmfcx avatar Sep 06 '22 16:09 xmfcx

@brkay54 are there any updates on this PR?

It is waiting review.

brkay54 avatar Sep 06 '22 16:09 brkay54

I tested the PR both on the test field (Gebze Technical University) and with planning simulator. Gave an example of a car which has lower steer_rate_lim_dps to make the difference more obvious.


Before the PR

https://github.com/autowarefoundation/autoware.universe/blob/1379811cbfc59b1a3ff047f83099994e2d138d2a/launch/tier4_control_launch/config/trajectory_follower/lateral_controller.param.yaml#L48

steer_rate_lim_dps: 10

video


After the PR

https://github.com/autowarefoundation/autoware.universe/blob/1379811cbfc59b1a3ff047f83099994e2d138d2a/launch/tier4_control_launch/config/trajectory_follower/lateral_controller.param.yaml#L48

steer_rate_lim_dps: 10

https://github.com/brkay54/autoware.universe/blob/cf178660cb6640c10b72f51a7e38e1800ef24f88/launch/tier4_planning_launch/config/scenario_planning/common/motion_velocity_smoother/motion_velocity_smoother.param.yaml#L51

max_steering_angle_rate: 10

video

mehmetdogru avatar Sep 07 '22 11:09 mehmetdogru