Class Simulation
java.lang.Object
com.stuypulse.robot.util.simulation.Simulation
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.ironmaple.simulation.seasonspecific.rebuilt2026.Arena2026Rebuiltprivate final edu.wpi.first.networktables.StructArrayPublisher<edu.wpi.first.math.geometry.Pose3d>private final edu.wpi.first.networktables.StructArrayPublisher<edu.wpi.first.math.geometry.Pose3d>private final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d>private static final Simulationprivate final org.ironmaple.simulation.IntakeSimulationprivate final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d>private final Intakeprivate final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d>private final Shooterprivate final edu.wpi.first.wpilibj.Notifierprivate final org.ironmaple.simulation.drivesims.SwerveDriveSimulation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate org.ironmaple.simulation.IntakeSimulationstatic Simulationprivate doubleprivate edu.wpi.first.math.geometry.Pose3dprivate voidrobotRelativeAddPieceWithVariance(edu.wpi.first.math.geometry.Translation2d piecePose, edu.wpi.first.math.geometry.Rotation2d yaw, edu.wpi.first.units.measure.Distance height, edu.wpi.first.units.measure.LinearVelocity speed, edu.wpi.first.units.measure.Angle pitch, double xVariance, double yVariance, double yawVariance, double speedVariance, double pitchVariance) Extension ofArena2026Rebuilt.addPieceWithVariance(edu.wpi.first.math.geometry.Translation2d, edu.wpi.first.math.geometry.Rotation2d, edu.wpi.first.units.measure.Distance, edu.wpi.first.units.measure.LinearVelocity, edu.wpi.first.units.measure.Angle, double, double, double, double, double)that uses chassis speedsprivate voidvoidupdate()private voidprivate voidprivate voidupdateIntakeEnabled(boolean enabled) private void
-
Field Details
-
instance
-
arenaInstance
-
shotLoop
-
swerveMSim
-
intakeMSim
-
intakeSim
-
shooterSim
-
fuel
private final edu.wpi.first.networktables.StructArrayPublisher<edu.wpi.first.math.geometry.Pose3d> fuel -
intakePivot
private final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d> intakePivot -
hopper
private final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d> hopper -
fuelLayers
private final edu.wpi.first.networktables.StructArrayPublisher<edu.wpi.first.math.geometry.Pose3d> fuelLayers -
shooter
private final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d> shooter
-
-
Constructor Details
-
Simulation
private Simulation()
-
-
Method Details
-
getInstance
-
configureArena
-
createIntakeSimulation
-
getIntakePivotPose
-
getIntakeArmEndX
-
updateIntakeEnabled
-
updateIntake
-
updateHopperFuel
-
robotRelativeAddPieceWithVariance
private void robotRelativeAddPieceWithVariance(edu.wpi.first.math.geometry.Translation2d piecePose, edu.wpi.first.math.geometry.Rotation2d yaw, edu.wpi.first.units.measure.Distance height, edu.wpi.first.units.measure.LinearVelocity speed, edu.wpi.first.units.measure.Angle pitch, double xVariance, double yVariance, double yawVariance, double speedVariance, double pitchVariance) Extension of
Arena2026Rebuilt.addPieceWithVariance(edu.wpi.first.math.geometry.Translation2d, edu.wpi.first.math.geometry.Rotation2d, edu.wpi.first.units.measure.Distance, edu.wpi.first.units.measure.LinearVelocity, edu.wpi.first.units.measure.Angle, double, double, double, double, double)that uses chassis speedsAdds a gamepiece too the arena with a certain random variance.
- Parameters:
piecePose- the field relative position at which to spawn the gamepieceyaw- the initial yaw of the gamepieceheight- the initial height of the gamepiece above the fieldspeed- the initial speed of the gamepiecepitch- the initial pitch of the gamepiecexVariance- the maximum random offset applied to the x coordinateyVariance- the maximum random offset applied to the y coordinateyawVariance- the maximum random offset applied to the yaw, in degreesspeedVariance- the maximum random offset applied to the speed, in m/spitchVariance- the maximum random offset applied to the pitch, in degrees
-
summonFuelAtIntake
-
updateShooting
-
update
-