Skip to content

Fix PathPlanner trajectory logging in sim#193

Merged
nlaverdure merged 1 commit into
mainfrom
fix/pathplanner-trajectory-logging
Jul 24, 2026
Merged

Fix PathPlanner trajectory logging in sim#193
nlaverdure merged 1 commit into
mainfrom
fix/pathplanner-trajectory-logging

Conversation

@nlaverdure

@nlaverdure nlaverdure commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Store the active PathPlanner path in a lastTrajectory field (updated by the callback) instead of calling Logger.recordOutput directly from the callback
  • Log Odometry/Trajectory every periodic() loop for AdvantageKit compatibility
  • Only update lastTrajectory when the incoming path is non-empty, so the plot persists in AdvantageScope after the path command ends
  • Removes unused setLogTargetPoseCallback / Odometry/TrajectorySetpoint

Test plan

  • Run sim, trigger a PathPlanner path (e.g. keyboard button 2 / Xbox Y), confirm Odometry/Trajectory appears in AdvantageScope
  • Confirm trajectory remains visible after the path command finishes

🤖 Generated with Claude Code

Store the active path in a field and log it every periodic() rather than
calling Logger.recordOutput directly from the PathPlanner callback.
This ensures the output is recorded within AdvantageKit's logging window
and persists the last trajectory in AdvantageScope after the path ends.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nlaverdure
nlaverdure merged commit 368d1c6 into main Jul 24, 2026
2 checks passed
@nlaverdure
nlaverdure deleted the fix/pathplanner-trajectory-logging branch July 24, 2026 15:15
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