pathplanner icon indicating copy to clipboard operation
pathplanner copied to clipboard

C++ `PPHolonomicDriveController` ignores `rotationTargetOverride`

Open bovlb opened this issue 1 year ago • 0 comments

From code inspection, the C++ implementation does not honour the rotation target override.

https://github.com/mjansen4857/pathplanner/blob/05a123d86f47976c564564674fdb997e25b03773/pathplannerlib/src/main/native/cpp/pathplanner/lib/controllers/PPHolonomicDriveController.cpp#L59-L68

Compare with he Java implementation:

https://github.com/mjansen4857/pathplanner/blob/05a123d86f47976c564564674fdb997e25b03773/pathplannerlib/src/main/java/com/pathplanner/lib/controllers/PPHolonomicDriveController.java#L147-L156

I suggest that this should should instead say:

        units::radians_per_second_t rotationFeedback {
                        m_rotationController.Calculate(currentPose.Rotation().Radians(),
                                        targetRotation.Radians(),
                                        { maxAngVel,
                                                        referenceState.constraints.getMaxAngularAcceleration() }) };
        units::radians_per_second_t rotationFF =

bovlb avatar Apr 25 '24 18:04 bovlb