-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ekf_localizer): add_delay_compensation_for_roll_and_pitch #8095
fix(ekf_localizer): add_delay_compensation_for_roll_and_pitch #8095
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
7f2b5ee
to
cbc2977
Compare
/review |
PR Reviewer Guide 🔍(Review updated until commit cff8ac9)
|
/improve --extended |
roll_rate_ = twist.twist.twist.angular.x; | ||
pitch_rate_ = twist.twist.twist.angular.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: To avoid potential issues with uninitialized variables, ensure that roll_rate_
and pitch_rate_
are initialized directly with the values from twist
. [possible issue, importance: 7]
roll_rate_ = twist.twist.twist.angular.x; | |
pitch_rate_ = twist.twist.twist.angular.y; | |
roll_rate_ = twist.twist.twist.angular.x != 0.0 ? twist.twist.twist.angular.x : roll_rate_; | |
pitch_rate_ = twist.twist.twist.angular.y != 0.0 ? twist.twist.twist.angular.y : pitch_rate_; |
c793a8f
to
e3ca5b4
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8095 +/- ##
===========================================
+ Coverage 15.09% 29.27% +14.18%
===========================================
Files 1967 1595 -372
Lines 135941 117487 -18454
Branches 42122 50609 +8487
===========================================
+ Hits 20520 34395 +13875
+ Misses 92700 73895 -18805
+ Partials 22721 9197 -13524
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
619d025
to
cff8ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@meliketanrikulu I am concerned about the case when the twist msg is interrupted during operation. |
Signed-off-by: Melike Tanrıkulu <[email protected]>
Hello @YamatoAndo . I tested without twist msg. |
He means that the Plus, I feel it is not appropriate to substitute
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meliketanrikulu
Sorry for leaving a comment after approving, but could you check these out too?
Signed-off-by: Melike Tanrıkulu <[email protected]>
Signed-off-by: Melike Tanrıkulu <[email protected]>
I understood your point and updated the code accordingly. |
e430b16
to
26f46c4
Compare
Signed-off-by: Melike Tanrıkulu <[email protected]>
Signed-off-by: Melike Tanrıkulu <[email protected]>
a8aafbc
to
622c076
Compare
I updated pose_with_delay header stamp with adding delay_time. |
Signed-off-by: Melike Tanrıkulu <[email protected]>
@TaikiYamada4 @YamatoAndo Could you review again. Its ready for the review. |
@meliketanrikulu I have two questions.
|
Hello @YamatoAndo . Thanks for your review and comments |
@meliketanrikulu Thank you for the response. |
1640c06
into
autowarefoundation:main
Thanks for the review and support @YamatoAndo . As it is, I have merged this PR and am closing the issue. Based on your suggestion, I will check the NDT covariance values. |
…refoundation#8095) * fix(ekf_localizer)add_delay_compensation_for_roll_and_pitch Signed-off-by: Melike Tanrıkulu <[email protected]> * rename compensate_pose_with_delay function Signed-off-by: Melike Tanrıkulu <[email protected]> * rename variables Signed-off-by: Melike Tanrıkulu <[email protected]> * update comment Signed-off-by: Melike Tanrıkulu <[email protected]> * rename compensated pose name Signed-off-by: Melike Tanrıkulu <[email protected]> * rename function name Signed-off-by: Melike Tanrıkulu <[email protected]> * style(pre-commit): autofix * calculate delta_orientation with orientation Signed-off-by: Melike Tanrıkulu <[email protected]> * rename - angular velocity vector Signed-off-by: Melike Tanrıkulu <[email protected]> * add z element delay compensation Signed-off-by: Melike Tanrıkulu <[email protected]> * fix typo Signed-off-by: Melike Tanrıkulu <[email protected]> * check twist msg for last_angular_velocity_ Signed-off-by: Melike Tanrıkulu <[email protected]> * use corrected pitch for delta_z calculation Signed-off-by: Melike Tanrıkulu <[email protected]> * update pose_with_delay header stamp Signed-off-by: Melike Tanrıkulu <[email protected]> * style(pre-commit): autofix * fix local variable naming Signed-off-by: Melike Tanrıkulu <[email protected]> --------- Signed-off-by: Melike Tanrıkulu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yamato Ando <[email protected]>
…refoundation#8095) * fix(ekf_localizer)add_delay_compensation_for_roll_and_pitch Signed-off-by: Melike Tanrıkulu <[email protected]> * rename compensate_pose_with_delay function Signed-off-by: Melike Tanrıkulu <[email protected]> * rename variables Signed-off-by: Melike Tanrıkulu <[email protected]> * update comment Signed-off-by: Melike Tanrıkulu <[email protected]> * rename compensated pose name Signed-off-by: Melike Tanrıkulu <[email protected]> * rename function name Signed-off-by: Melike Tanrıkulu <[email protected]> * style(pre-commit): autofix * calculate delta_orientation with orientation Signed-off-by: Melike Tanrıkulu <[email protected]> * rename - angular velocity vector Signed-off-by: Melike Tanrıkulu <[email protected]> * add z element delay compensation Signed-off-by: Melike Tanrıkulu <[email protected]> * fix typo Signed-off-by: Melike Tanrıkulu <[email protected]> * check twist msg for last_angular_velocity_ Signed-off-by: Melike Tanrıkulu <[email protected]> * use corrected pitch for delta_z calculation Signed-off-by: Melike Tanrıkulu <[email protected]> * update pose_with_delay header stamp Signed-off-by: Melike Tanrıkulu <[email protected]> * style(pre-commit): autofix * fix local variable naming Signed-off-by: Melike Tanrıkulu <[email protected]> --------- Signed-off-by: Melike Tanrıkulu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yamato Ando <[email protected]> Signed-off-by: xtk8532704 <[email protected]>
Description
We can see that there is a wobbling of ego vehicle points as the vehicle drives through speed bumps.I repeated the tests in the simulation environment and obtained similar results. When I tried to optimize parameters in its current EKF , I saw that I could not achieve good results in its current packet. You can find the tests I have previously done to solve this problem in the #6993 comments
Delay compensation has been added to improve roll and pitch estimation.
Related links
Parent Issue:
Related Issue: #6993
How was this PR tested?
1.) I tested this PR with rosbag file . Added delay compensation for roll and pitch estimation. This PR includes this changes.
2.) I updated 1D Filter params for pitch estimation.
Changed pitch_filter_proc_dev param as 0.5
3.) Enabled 3D Distortion Corrector (optionally)
Test Procedure
Installation
Prepare Autoware to test PR:
Launch Autoware
Run this for testing without 3D Distortion Corrector - Default-
Run this for testing with 3D Distortion Corrector. It can be improve the results. -Optional-
Test Results:
You can see changes Before/After this PR video is here
After this test I added 3D Distortion Corrector too . Final Test Video is here.
You can see below, the delay compensation effect on EKF output poses with roll and pitch delay compensation :
Comparison with Previous Works:
I have previously tried to solve the problem by simply changing parameters with the existing autoware, but I could not achieve successful results. You can find the tests I performed at this stage under the related issue.
Previous PR :
To solve this problem, I previously suggested and tested adding imu to EKF. The addition of IMU also contributed positively to the result. However, since changing Autoware's architecture was not our first choice, I worked on a new method. As a result, I saw that the problem could be solved by making delay compensation for roll and pitch in the ekf_localizer package and I created this PR. I aim to explain in the image below how close the PR I have worked on before is to the result we expected (NDT only localization) and how close this PR is to the result we expected not to happen (NDT only localization).
Below, you can review the images captured at the moments when the difference between the instantaneous point cloud and the map was maximized while passing through the speed bump. (Normally instant pc and map points are matching but they move away when passing through a speed bump. You can see here the maximum distances (errors)):
Note : Ignore the horizontal differences between the two point clouds here.
Notes for reviewers
Interface changes
None.
Effects on system behavior
None.