Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Nov 13, 2024
1 parent d19f1b2 commit 80d82c1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@ jobs:
name: built-client
path: photon-client/dist/
build-examples:
name: "Build Examples"

strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
architecture: x64
- os: macos-14
architecture: aarch64
- os: ubuntu-22.04

name: "Photonlib - Build Examples - ${{ matrix.os }}"
runs-on: ${{ matrix.os }}

runs-on: ubuntu-22.04
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

public class Robot extends TimedRobot {
private SwerveDrive drivetrain;
// private VisionSim visionSim;
private VisionSim visionSim;
private PhotonCamera camera;

private final double VISION_TURN_kP = 0.01;
Expand All @@ -54,7 +54,7 @@ public void robotInit() {
if (!TimeSyncSingleton.load()) {
System.exit(-111);
}
// visionSim = new VisionSim(camera);
visionSim = new VisionSim(camera);

controller = new XboxController(0);
}
Expand Down Expand Up @@ -126,11 +126,11 @@ public void simulationPeriodic() {
drivetrain.simulationPeriodic();

// Update camera simulation
// visionSim.simulationPeriodic(drivetrain.getSimPose());
visionSim.simulationPeriodic(drivetrain.getSimPose());

// var debugField = visionSim.getSimDebugField();
// debugField.getObject("EstimatedRobot").setPose(drivetrain.getPose());
// debugField.getObject("EstimatedRobotModules").setPoses(drivetrain.getModulePoses());
var debugField = visionSim.getSimDebugField();
debugField.getObject("EstimatedRobot").setPose(drivetrain.getPose());
debugField.getObject("EstimatedRobotModules").setPoses(drivetrain.getModulePoses());

// Calculate battery voltage sag due to current draw
RoboRioSim.setVInVoltage(
Expand All @@ -143,6 +143,6 @@ public void resetPose() {
// The first pose in an autonomous path is often a good choice.
var startPose = new Pose2d(1, 1, new Rotation2d());
drivetrain.resetPose(startPose, true);
// visionSim.resetSimPose(startPose);
visionSim.resetSimPose(startPose);
}
}

0 comments on commit 80d82c1

Please sign in to comment.