-
Notifications
You must be signed in to change notification settings - Fork 59
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/slope inaccuracies #1493
Draft
SzymonParapura
wants to merge
28
commits into
master
Choose a base branch
from
fix/slope_inaccuracies
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fix/slope inaccuracies #1493
+250
−19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Checklist for reviewers ☑️All references to "You" in the following text refer to the code reviewer.
|
SzymonParapura
added
the
bump minor
If this pull request merged, bump minor version of the scenario_simulator_v2
label
Dec 18, 2024
…dEntityStatusInWorldFrame
…ntityStatusInWorldFrame
This reverts commit 26f8a65.
…etPose and return it
…yStatusInWorldFrame
…moveTowardsLaneletPose
…ose for WalkStraightAction, tidy up
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bump minor
If this pull request merged, bump minor version of the scenario_simulator_v2
wait for regression test
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.
Description
Abstract
This pull request introduces a fix for lanelet slope inaccuracies in the
FollowTrajectoryAction
andWalkStraightAction
.Details
In the case of
FollowTrajectoryAction
andWalkStraightAction
, an issue arises in the algorithm responsible for determining the entity's position. During each simulation step, displacement is calculated based on the velocity vector and step_time. When the entity moves along a sloped lanelet (e.g., driving uphill), the calculated displacement can sometimes exceed the remaining distance to the end of the lanelet.To address transitions between lanelets, the method
CanonicalizedLaneletPose::adjustOrientationAndOzPosition
adjusts the entity's orientation to match the lanelet's pitch angle and sets the entity's height to the lanelet's elevation. As a result, the cumulative displacement computed by themakeUpdatedStatus
function may not always reflect the actual distance traveled.The proposed solution involves checking the remaining distance to the end of the current lanelet. If the calculated displacement exceeds this distance, the entity's position is updated to the next lanelet in a controlled manner. This ensures accurate positioning and smooth transitions between lanelets.
Code Changes
Pose
moveTowardsLaneletPose
function calculates the new position of an entity along a lanelet based on a desired velocity and step time. The function accounts for cases where the entity reaches the end of the current lanelet and needs to transition to the next lanelet. LinkFollow Trajectory Action
makeUpdatedStatus
method has been updated to fix issues. LinkWalk Straight Action
ActionNode::calculateUpdatedEntityStatusInWorldFrame
has been modified to fix the issue withWalkStraightAction
. It updates the position and orientation of the entity, ensuring precise movement along the lanelet and accurate handling of transitions between lanelets. Link.New Vector and Quaternion Operations
Added function to calculate the norm of a quaternion. Link
Added function to normalize a quaternion. Link
An operator overload for the + operator was added to facilitate vector addition. This allows combining custom vector types with Eigen::Vector3d seamlessly. Link
References
Internal link 1
Internal link 2
Destructive Changes
--
Known Limitations
--