Class Simulation

java.lang.Object
com.stuypulse.robot.util.simulation.Simulation

public class Simulation extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final org.ironmaple.simulation.seasonspecific.rebuilt2026.Arena2026Rebuilt
     
    private 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 Simulation
     
    private final org.ironmaple.simulation.IntakeSimulation
     
    private final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d>
     
    private final Intake
     
    private final edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose3d>
     
    private final Shooter
     
    private final edu.wpi.first.wpilibj.Notifier
     
    private final org.ironmaple.simulation.drivesims.SwerveDriveSimulation
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
     
    private org.ironmaple.simulation.IntakeSimulation
     
    static Simulation
     
    private double
     
    private edu.wpi.first.math.geometry.Pose3d
     
    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 speeds
    private void
     
    void
     
    private void
     
    private void
     
    private void
    updateIntakeEnabled(boolean enabled)
     
    private void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • instance

      private static final Simulation instance
    • arenaInstance

      public final org.ironmaple.simulation.seasonspecific.rebuilt2026.Arena2026Rebuilt arenaInstance
    • shotLoop

      private final edu.wpi.first.wpilibj.Notifier shotLoop
    • swerveMSim

      private final org.ironmaple.simulation.drivesims.SwerveDriveSimulation swerveMSim
    • intakeMSim

      private final org.ironmaple.simulation.IntakeSimulation intakeMSim
    • intakeSim

      private final Intake intakeSim
    • shooterSim

      private final Shooter 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

  • Method Details

    • getInstance

      public static Simulation getInstance()
    • configureArena

      private void configureArena()
    • createIntakeSimulation

      private org.ironmaple.simulation.IntakeSimulation createIntakeSimulation()
    • getIntakePivotPose

      private edu.wpi.first.math.geometry.Pose3d getIntakePivotPose()
    • getIntakeArmEndX

      private double getIntakeArmEndX()
    • updateIntakeEnabled

      private void updateIntakeEnabled(boolean enabled)
    • updateIntake

      private void updateIntake()
    • updateHopperFuel

      private void 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 speeds

      Adds a gamepiece too the arena with a certain random variance.

      Parameters:
      piecePose - the field relative position at which to spawn the gamepiece
      yaw - the initial yaw of the gamepiece
      height - the initial height of the gamepiece above the field
      speed - the initial speed of the gamepiece
      pitch - the initial pitch of the gamepiece
      xVariance - the maximum random offset applied to the x coordinate
      yVariance - the maximum random offset applied to the y coordinate
      yawVariance - the maximum random offset applied to the yaw, in degrees
      speedVariance - the maximum random offset applied to the speed, in m/s
      pitchVariance - the maximum random offset applied to the pitch, in degrees
    • summonFuelAtIntake

      private void summonFuelAtIntake()
    • updateShooting

      private void updateShooting()
    • update

      public void update()