Skip to content

Java crashes on running an auton with no paths when resetOdom is true #1144

@bhall-ctre

Description

@bhall-ctre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions