-
Notifications
You must be signed in to change notification settings - Fork 61
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
base: master
Are you sure you want to change the base?
Fix/slope inaccuracies #1493
Conversation
Checklist for reviewers ☑️All references to "You" in the following text refer to the code reviewer.
|
…dEntityStatusInWorldFrame
…ntityStatusInWorldFrame
This reverts commit 26f8a65.
…etPose and return it
…yStatusInWorldFrame
…moveTowardsLaneletPose
…ose for WalkStraightAction, tidy up
- Adjusted entity position when transitioning between lanelets to reduce slope errors
… position updates
- Updated makeUpdatedStatus to fix an issue with toCanonicalizedLaneletPose
There is no regression |
updated_pose.orientation = status->getMapPose().orientation * delta_quaternion; | ||
|
||
/// @note Apply position change | ||
/// @todo first determine global desired_velocity, calculate position change using it |
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.
This todo has already finished?
If so, please delete.
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 left the todo on purpose because the calculations are done in a specific coordinate system (desired_velocity is given in the local frame). This conversion to the global frame might still need to be done. I also wanted to point this out for others working on the code to avoid potential mistakes from misinterpreting the reference frame.
Quality Gate passedIssues Measures |
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
updatePositionForLaneletTransition
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
--