Complete rotation in first half of path before finishing translation - #546
Open
KhaleelA19 wants to merge 1 commit into
Open
Complete rotation in first half of path before finishing translation#546KhaleelA19 wants to merge 1 commit into
KhaleelA19 wants to merge 1 commit into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Rotation was interpolated evenly across the entire path, so the sub rotated continuously while translating all the way to the goal.
Fix
Orientation progress now runs at 2× the translation progress (t2 = t * 2.0, clamped at 1.0). Rotation completes in the first half of the path, then every remaining breadcrumb holds the goal orientation while translation finishes. Note the else-branch is required — leaving orientation unassigned would produce a default (identity) quaternion, not "keep last value."
Tested in sim
Sent a ~5 m goal with a 90° yaw (goal quaternion z=0.7071, w=0.7071). Planner output shows the quaternion sweeping z: 0.291 → 0.443 → 0.583 → 0.7071 over the first 4 of 10 poses, then holding constant at the goal orientation for the back half while position converges. Sub behavior in Gazebo matched: turn first, then straight cruise.