Skip to content

Commit

Permalink
Fix python trajectory generation within commands (#915)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansen4857 authored Nov 21, 2024
1 parent a193d55 commit 48a2704
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pathplannerlib-python/pathplannerlib/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ def initialize(self):
self._trajectory = self._path.getIdealTrajectory(self._robotConfig)
else:
# We need to regenerate
self._path.generateTrajectory(currentSpeeds, currentPose.rotation(), self._robotConfig)
self._trajectory = self._path.generateTrajectory(currentSpeeds, currentPose.rotation(),
self._robotConfig)
else:
# No ideal starting state, generate the trajectory
self._path.generateTrajectory(currentSpeeds, currentPose.rotation(), self._robotConfig)
self._trajectory = self._path.generateTrajectory(currentSpeeds, currentPose.rotation(), self._robotConfig)

PathPlannerLogging.logActivePath(self._path)
PPLibTelemetry.setCurrentPath(self._path)
Expand Down

0 comments on commit 48a2704

Please sign in to comment.