mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Clean up simulation physics API (#2739)
Some vestigial functions were never removed, and C++ single-jointed arm sim was missing a flag for disabling gravity simulation. This is useful for mechanisms like turrets. Fixes #2738.
This commit is contained in:
@@ -67,6 +67,7 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N1> {
|
||||
* the simulation and write simulated outputs to sensors.
|
||||
*
|
||||
* @param motor DCMotor representing the motor driving the arm.
|
||||
* @param jKgSquaredMeters The moment of inertia of the arm.
|
||||
* @param G The gear ratio of the arm (numbers greater than 1
|
||||
* represent reductions).
|
||||
* @param armMassKg The mass of the arm.
|
||||
@@ -188,10 +189,6 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N1> {
|
||||
return m_x.get(1, 0);
|
||||
}
|
||||
|
||||
public double getInputVoltageVolts() {
|
||||
return m_u.get(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getCurrentDrawAmps() {
|
||||
// Reductions are greater than 1, so a reduction of 10:1 would mean the motor is
|
||||
|
||||
Reference in New Issue
Block a user