Skip to content

Complete rotation in first half of path before finishing translation - #546

Open
KhaleelA19 wants to merge 1 commit into
mainfrom
khaleel-rotate-then-translate
Open

Complete rotation in first half of path before finishing translation#546
KhaleelA19 wants to merge 1 commit into
mainfrom
khaleel-rotate-then-translate

Conversation

@KhaleelA19

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant