Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Changes from 7 commits
f3f773c
91f6146
bbb9561
8a16c03
b826298
b7327c7
8316155
4993564
03309e2
1ddbee8
3398927
a061f42
5af1316
622c076
1acb118
e33ab61
396753d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 196 in localization/ekf_localizer/src/ekf_localizer.cpp
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
Check warning on line 287 in localization/ekf_localizer/src/ekf_module.cpp
Codecov / codecov/patch
localization/ekf_localizer/src/ekf_module.cpp#L287
Check warning on line 293 in localization/ekf_localizer/src/ekf_module.cpp
Codecov / codecov/patch
localization/ekf_localizer/src/ekf_module.cpp#L291-L293
Check warning on line 299 in localization/ekf_localizer/src/ekf_module.cpp
Codecov / codecov/patch
localization/ekf_localizer/src/ekf_module.cpp#L297-L299
Check warning on line 303 in localization/ekf_localizer/src/ekf_module.cpp
Codecov / codecov/patch
localization/ekf_localizer/src/ekf_module.cpp#L301-L303
Check warning on line 305 in localization/ekf_localizer/src/ekf_module.cpp
Codecov / codecov/patch
localization/ekf_localizer/src/ekf_module.cpp#L305
Check warning on line 345 in localization/ekf_localizer/src/ekf_module.cpp
Codecov / codecov/patch
localization/ekf_localizer/src/ekf_module.cpp#L344-L345
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_
andpitch_rate_
are initialized directly with the values fromtwist
. [possible issue, importance: 7]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.
I believe that taking the independent factor of the angular velocity vector as roll and pitch velocity is not mathematically correct, because the norm of the angular velocity vector equals to the angular variation around the major axis. In other words, the
roll_rate_
andpitch_rate_
can be affected by other factors.In my opinion, calculating the variation using the quaternion library should be better for precise calculation of angular variation. I think Line 270 to 281 in pose_instability_detector.cpp might be helpful.
Yes, this also calculates the variation of yaw, but since yaw is estimated in a different way we can discard the yaw part after the calculation of angular variation.
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.
Hello @TaikiYamada4 . Thanks for your review. You are right, it is a more accurate approach to calculate orientation as a whole instead of roll_rate and pitch_rate. I updated the code accordingly and tested it. 4993564
Could you check again?
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 Thank you for the revision! I also checked it seems to work in my environment too 👍