Sim Updates for 2023 (#512)

* WIP updating sim stuff for 2023 and pose3d's

* vision system build fixups, but test not yet passing.

* WIP Sim fixups and working on testcases

* Still doesn't work, but closer

* tests pass

* removed C++ sim support

* formatting update

* adjusted target height above ground per review

* Turns out its unused

* missed example removal
This commit is contained in:
Chris Gerth
2022-11-03 15:05:37 -05:00
committed by GitHub
parent a64697e714
commit b408a58e9e
18 changed files with 276 additions and 1314 deletions

View File

@@ -87,7 +87,6 @@ public class Constants {
// page 197
public static final double targetHeight =
Units.inchesToMeters(98.19) - Units.inchesToMeters(81.19); // meters
public static final double targetHeightAboveGround = Units.inchesToMeters(81.19); // meters
// See https://firstfrc.blob.core.windows.net/frc2020/PlayingField/LayoutandMarkingDiagram.pdf
// pages 4 and 5
@@ -103,6 +102,5 @@ public class Constants {
new Rotation3d(0.0, 0.0, Units.degreesToRadians(180)));
public static final SimVisionTarget kFarTarget =
new SimVisionTarget(
kFarTargetPose.toPose2d(), targetHeightAboveGround, targetWidth, targetHeight);
new SimVisionTarget(kFarTargetPose, targetWidth, targetHeight, 42);
}

View File

@@ -89,11 +89,7 @@ public class DrivetrainSim {
new SimVisionSystem(
Constants.kCamName,
camDiagFOV,
camPitch,
new Transform2d(
Constants.kCameraToRobot.getTranslation().toTranslation2d(),
Constants.kCameraToRobot.getRotation().toRotation2d()),
camHeightOffGround,
Constants.kCameraToRobot,
maxLEDRange,
camResolutionWidth,
camResolutionHeight,