[wpilib] Simulation: Add ctor parameter to set starting state of mechanism sims (#5288)

- Add a constructor parameter to configure the initial angle of the arm
- Also reorganizes cascading constructors for Java
This commit is contained in:
Sriman Achanta
2023-07-18 16:00:27 -04:00
committed by GitHub
parent 14f30752ab
commit 335e7dd89d
16 changed files with 151 additions and 96 deletions

View File

@@ -9,7 +9,7 @@
TEST(SingleJointedArmTest, Disabled) {
frc::sim::SingleJointedArmSim sim(frc::DCMotor::Vex775Pro(2), 300, 3_kg_sq_m,
30_in, -180_deg, 0_deg, true);
30_in, -180_deg, 0_deg, true, 90_deg);
sim.SetState(frc::Vectord<2>{0.0, 0.0});
for (size_t i = 0; i < 12 / 0.02; ++i) {