In PathPlannerLib v2026.1.2, the Java code sets startingPose to null when the path is empty. However, just about all swerve implementations (including the WPILib pose estimator) assume the pose provided to resetPose is non-null, resulting in a NullPointerException. This behavior is different from C++ and Python, both of which use a zero Pose2d.
I would expect either that Java likewise uses Pose2d.kZero, or that all implementations skip running the resetOdom command when there is no starting pose. Since most teams should not encounter this, I would consider this a low-priority fix, although the first option is an easy change.
In PathPlannerLib v2026.1.2, the Java code sets
startingPosetonullwhen the path is empty. However, just about all swerve implementations (including the WPILib pose estimator) assume the pose provided toresetPoseis non-null, resulting in aNullPointerException. This behavior is different from C++ and Python, both of which use a zero Pose2d.I would expect either that Java likewise uses
Pose2d.kZero, or that all implementations skip running theresetOdomcommand when there is no starting pose. Since most teams should not encounter this, I would consider this a low-priority fix, although the first option is an easy change.