Skip to content
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

refactor(ekf_localizer): add a function to check the delay step #2657

Conversation

IshitaTakeshi
Copy link
Contributor

@IshitaTakeshi IshitaTakeshi commented Jan 16, 2023

Description

Checking the delay step in the callback function is redundant. I added a function to do this and improved the readability.
Note that the warning message is modified to reduce the number of arguments.

Related links

Tests performed

Smoke tests to check the delay step boundary

Notes for reviewers

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.

@github-actions github-actions bot added the component:localization Vehicle's position determination in its environment. (auto-assigned) label Jan 16, 2023
@IshitaTakeshi IshitaTakeshi marked this pull request as draft January 17, 2023 04:57
@IshitaTakeshi IshitaTakeshi marked this pull request as ready for review January 17, 2023 05:58
@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Base: 11.55% // Head: 11.55% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (5f012ed) compared to base (ea2b32b).
Patch coverage: 54.54% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2657   +/-   ##
=======================================
  Coverage   11.55%   11.55%           
=======================================
  Files        1309     1309           
  Lines       91321    91413   +92     
  Branches    24220    24287   +67     
=======================================
+ Hits        10549    10564   +15     
- Misses      69729    69791   +62     
- Partials    11043    11058   +15     
Flag Coverage Δ *Carryforward flag
differential 22.44% <50.00%> (?)
total 11.55% <47.05%> (ø) Carriedforward from ea2b32b

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

Impacted Files Coverage Δ
localization/ekf_localizer/src/ekf_localizer.cpp 0.00% <0.00%> (ø)
...zation/ekf_localizer/test/test_warning_message.cpp 59.09% <50.00%> (+4.54%) ⬆️
localization/ekf_localizer/src/warning_message.cpp 73.68% <80.00%> (+7.01%) ⬆️

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -0,0 +1,25 @@
// Copyright 2022 Autoware Foundation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve after the conflict is resolved!

Copy link
Contributor Author

@IshitaTakeshi IshitaTakeshi Jan 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved the conflicts in cdb8d15

#include <string>

std::string poseDelayStepWarningMessage(
const double delay_step, const double extend_state_step, const double ekf_dt);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to make extended_state_step as int, given that it is defined so in hyper_parameters.hpp.

Suggested change
const double delay_step, const double extend_state_step, const double ekf_dt);
const double delay_step, const int extend_state_step, const double ekf_dt);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in 2777ae9

Copy link
Contributor

@kminoda kminoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IshitaTakeshi IshitaTakeshi merged commit 4269291 into autowarefoundation:main Feb 8, 2023
badai-nguyen pushed a commit to badai-nguyen/autoware.universe that referenced this pull request Mar 23, 2023
…warefoundation#2657)

* Add a function to check delay step
* Apply the delay step checker to twist
* Test the delay step cheker
badai-nguyen pushed a commit to badai-nguyen/autoware.universe that referenced this pull request Apr 4, 2023
…warefoundation#2657)

* Add a function to check delay step
* Apply the delay step checker to twist
* Test the delay step cheker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:localization Vehicle's position determination in its environment. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants