Hi, I was trying to code the Path Planner Swerve Controller Command, but it keeps giving an error. Can anyone help? Thanks!
public Command followTrajectoryCommand(PathPlannerTrajectory traj, boolean isFirstPath) {
return new SequentialCommandGroup(
new PPSwerveControllerCommand(
traj,
this::getPose, // Pose supplier
new SwerveDriveKinematics(
new Translation2d(0.57785/ 2, 0.57785 / 2),
new Translation2d(0.57785 / 2, -0.57785 / 2),
new Translation2d(-0.57785 / 2, 0.57785 / 2),
new Translation2d(-0.57785 / 2, -0.57785 / 2)),//kinematics, // SwerveDriveKinematics
new PIDController(0, 0, 0), // X controller. Tune these values for your robot. Leaving them 0 will only use feedforwards.
new PIDController(0, 0, 0), // Y controller (usually the same values as X controller)
new PIDController(0, 0, 0), // Rotation controller. Tune these values for your robot. Leaving them 0 will only use feedforwards.
this::setModuleStates, // Module states consumer
true, // Should the path be automatically mirrored depending on alliance color. Optional, defaults to true
this // Requires this drive subsystem
)
);
}
error: The constructor PPSwerveControllerCommand(PathPlannerTrajectory, this::getPose, SwerveDriveKinematics, PIDController, PIDController, PIDController, this::setModuleStates, boolean, DriveSubsystem) is undefined
Sorry - I don’t know how to format code here. Thanks!