Skip to content

Add PID path tracking with odometry feedback and controller tests - #258

Open
soundcake wants to merge 2 commits into
UniflexAI:mainfrom
soundcake:bounty/pid-path-tracking
Open

soundcake wants to merge 2 commits into
UniflexAI:mainfrom
soundcake:bounty/pid-path-tracking

Conversation

@soundcake

@soundcake soundcake commented Oct 28, 2026 •

Copy link
Copy Markdown

The current cmd_vel controller derives velocity from the first path segment, so an odometry position or heading error does not change its command. This adds time-sampled trajectory feedforward with longitudinal/heading PID and lateral feedback, using the planner's camera-to-control-center offset. It implements the control-node PID item on the bounty board.

Pause, navigation deactivation, stale-path slowdown/stop, fixed straight reverse and robot speed limits remain in place. Missing/stale odometry and invalid poses stop output. Gains are ROS parameters, with tuning and CPU test commands in docs/path_tracking.md.

Validation: 24 tests pass in ROS 2 Humble/Python 3.10 with NumPy 1.26.1 and SciPy 1.15.3, including straight/curved kinematic recovery, the real node's acceleration/minimum-speed logic, camera offset, reverse, stale inputs and DDS stop-message delivery. The unchanged-path displacement regression fails on the current main controller and passes here. Full tinynav lint and the new tests pass with Ruff 0.15.9; the quality workflow now uses that existing uv.lock version rather than an unpinned tool download. A focused ROS CPU workflow runs the controller suite.

Native Ubuntu amd64 validation at 4c7de92: 24 controller tests passed.

@xiaolefang-dm
xiaolefang-dm requested review from dvorak0 and junlinp and removed request for dvorak0 November 2, 2026 01:08

This branch has not been deployed

No deployments
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