Skip to content

Commit

Permalink
initialized sim
Browse files Browse the repository at this point in the history
  • Loading branch information
sigalrmp committed Jan 12, 2025
1 parent 305c90f commit 0e2141c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/sciborgs1155/robot/arm/SimArm.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public double position() {
return simulation.getAngleRads();
}

public SimArm() {
simulation.update(0);
}

@Override
public double velocity() {
return simulation.getVelocityRadPerSec();
Expand Down
8 changes: 0 additions & 8 deletions src/test/java/org/sciborgs1155/robot/ArmTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.sciborgs1155.robot.arm.Arm;

/** Tests {@link Arm} subsystem with simulated hardware. Doesn't work :/ */
Expand Down Expand Up @@ -55,10 +53,4 @@ public void pointExtensionTest() {
arm.goToTest(
Radians.of(Math.random() * (MAX_ANGLE.minus(MIN_ANGLE).in(Radians))).plus(MIN_ANGLE)));
}

@ParameterizedTest
@ValueSource(doubles = {2, 1, 0, -0.2})
public void whjakfsd(double a) {
runUnitTest(arm.goToTest(Radians.of(a)));
}
}

0 comments on commit 0e2141c

Please sign in to comment.