Draft
Add multi-point navigation node with rotation-drift correction and AMCL initial pose alignment#1
Conversation
…sues Co-authored-by: ouglish <62865449+ouglish@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issues with multi-point navigation code
Add multi-point navigation node with rotation-drift correction and AMCL initial pose alignment
Mar 19, 2026
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.
Three-wheel differential drive robot has two navigation issues: x/y drift after rotation-only goals, and AMCL initial pose defaulting to
(0,0,0)rather than the map-building start pose.Changes
Problem 1 — x/y drift after in-place rotation (
_is_rotation_only_goal+_correct_xy_drift)Differential drive robots physically drift when rotating in place due to wheel tolerances, uneven friction, and off-center CoM. After a rotation-only waypoint completes:
position_tolerancebut Δθ >angle_tolerance(angle diff normalized viaatan2to handle ±π wrap)rotation_settle_waitfor the robot to fully stopxy_correction_threshold, resend a position-correction goal to the same (x, y, θ)Problem 2 — Initial pose mismatch (
_set_initial_pose)AMCL defaults to
(0,0,0)on startup. If the robot is placed at the map-building origin with the same orientation this is fine, but any deviation causes localization divergence. On node startup, publish aPoseWithCovarianceStampedto/initialposeusing configurableinitial_pose_x/y/thetaparams (matching the SLAM start pose), then waitamcl_convergence_waitseconds before sending the first goal.New package:
multi_point_navscripts/multi_point_nav.pylaunch/multi_point_nav.launchconfig/nav_points.yamlAll timing constants (
amcl_convergence_wait,rotation_settle_wait,waypoint_pause) are ROS-param configurable to accommodate different robot dynamics. Publisher readiness uses a connection-count poll rather than a fixed sleep.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.