mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated to 2024
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user