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

RJD-1505 Change sign of slope acceleration #1509

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gmajrobotec
Copy link
Contributor

Description

Abstract

This pull request introduces a fix for sign of slope acceleration when consider_acceleration_by_road_slope is set to true.

Details

When consider_acceleration_by_road_slope was set to true some scenarios were failing.

This was primarily because of wrong calculation of actual acceleration, slope acceleration sign was sometimes changed by multiplying it by gear sign, when slope acceleration value was already properly signed.

Second problem was CanonicalizedEntityStatus::getLaneletPose method throwing exception because slope acceleration was tried to calculate even when lane matching was not successful. This was fixed by checking lane matching before slope acceleration is calculated, and removing noexcept operator.

Code Changes

EgoEntitySimulation

  • slope acceleration was moved out of the bracket as the slope acceleration is already a signed value and there is no need to multiply it by gear sign
  • check lane matching status to avoid exception when not and to provide slope acceleration when information of actual lanelet slope is obtained

CanonicalizedEntityStatus

  • noexcept was removed from getLaneletId and getLaneletPose as those two methods can actually throw common::SemanticError

References

Internal link 1

Destructive Changes

--

Known Limitations

--

@gmajrobotec gmajrobotec added the bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 label Jan 19, 2025
Copy link

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

@gmajrobotec gmajrobotec marked this pull request as ready for review January 20, 2025 00:52
@gmajrobotec gmajrobotec requested a review from HansRobo January 20, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 wait for regression test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant