diff --git a/pathplannerlib-python/pathplannerlib/commands.py b/pathplannerlib-python/pathplannerlib/commands.py index 01bb5730..63cbc7cb 100644 --- a/pathplannerlib-python/pathplannerlib/commands.py +++ b/pathplannerlib-python/pathplannerlib/commands.py @@ -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)