From 48a270426815f3db23a1d8848aec28b123d166df Mon Sep 17 00:00:00 2001 From: Michael Jansen Date: Thu, 21 Nov 2024 15:17:57 -0500 Subject: [PATCH] Fix python trajectory generation within commands (#915) --- pathplannerlib-python/pathplannerlib/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)