Hello! My team is trying to get our swerve bot to follow a simple path to the point 1 meter in front of the robot. We’re using the YAGSL library. We have an issue where the wheels of the robot stutter for about half a meter and then just stop.
Here’s a video showcasing the issue:
Here is the command we’re using to generate the path, taken from the YAGSL example code:
public Command driveToPose(Pose2d pose)
{
// Create the constraints to use while pathfinding
PathConstraints constraints = new PathConstraints(
swerveDrive.getMaximumVelocity(), 4.0,
swerveDrive.getMaximumAngularVelocity(), Units.degreesToRadians(720));
// Since AutoBuilder is configured, we can use it to build pathfinding commands
return AutoBuilder.pathfindToPose(
pose,
constraints,
0.0, // Goal end velocity in meters/sec
0.0 // Rotation delay distance in meters. This is how far the robot should travel before attempting to rotate.
);
}
And here is how we’re calling it:
drivetrain.driveToPose(
new Pose2d(
new Translation2d(1, 0), new Rotation2d()
)
)
Any ideas of what could be causing the stuttering? I will also note that our teleop code works and that the robot pose (being viewed through shuffleboard) looks correct.
Thank you in advance!