Updated to 2024

This commit is contained in:
thenetworkgrinch
2024-01-15 14:37:13 -06:00
parent 3fd8493ccb
commit a71d7a0b4e
185 changed files with 6910 additions and 10987 deletions

View File

@@ -81,4 +81,15 @@ public class SwerveDriveConfiguration
}
return modArr;
}
/**
* Assume the first module is the furthest. Usually front-left.
*
* @return Drive base radius from center of robot to the farthest wheel in meters.
*/
public double getDriveBaseRadiusMeters()
{
Translation2d furthestModule = moduleLocationsMeters[0];
return Math.abs(Math.sqrt(Math.pow(furthestModule.getX(), 2) + Math.pow(furthestModule.getY(), 2)));
}
}