Class RebuiltOutpost
- All Implemented Interfaces:
SimulatedArena.Simulatable
Simulates a OUTPOSTs on the field.
This class simulates a outpost on the field where fuel can be scored. It has a store of fuel which can be added
too by scoring in it. This fuel can then be dumped via dump() or
Arena2026Rebuilt.outpostDump(boolean), thrown at the goal via throwForGoal() or
Arena2026Rebuilt.outpostThrowForGoal(boolean), or thrown with specific parameters via
throwFuel(Rotation2d, Angle, LinearVelocity) or Arena2026Rebuilt.outpostThrow(boolean, Rotation2d, Angle, LinearVelocity),
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ironmaple.simulation.Goal
Goal.PositionChecker, Goal.RotationChecker -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Arena2026Rebuiltprotected static final Translation3dprotected static final Translation3dprotected static final Translation3dprotected static final Translation3dprotected static final Translation3dprotected static final Translation3dprotected static final Translation3dprotected static final Translation3dFields inherited from class org.ironmaple.simulation.Goal
allowGrounded, elevation, gamePieceCount, gamePieceType, height, isBlue, max, position, positionChecker, rotationChecker, velocityValidator, xyBox -
Constructor Summary
ConstructorsConstructorDescriptionRebuiltOutpost(Arena2026Rebuilt arena, boolean isBlue) Creates an outpost of the specified color. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds Points When a Piece Has Been Successfully Scored in This GoalvoidDisplays Game Pieces to AdvantageScope if Applicablevoiddump()Dumps game pieces from the specified outpost.voidreset()Resets the outposts internal fuel counter too 24. voidsimulationSubTick(int subTickNum) Handles the update triggers for the goal object.voidAttempts too throw a game piece at the specified goal.voidthrowFuel(Rotation2d yaw, Angle pitch, LinearVelocity speed) Throws a game piece from the outpost at the specified angle and speed.Methods inherited from class org.ironmaple.simulation.Goal
absoluteAngle, anyRotation, box, checkCollision, checkGrounded, checkValidity, clear, flipRotation, getGamePieceCount, isFull, pitchOnly, setNeededAngle, setNeededAngle, withCustomCollisionPredicate, withCustomPositionChecker, withCustomRotationChecker, withCustomRotationValidator, withCustomVelocityValidator, withRotationTolerance
-
Field Details
-
redOutpostPose
-
redLaunchPose
-
redDumpPose
-
blueOutpostPose
-
blueDumpPose
-
blueLaunchPose
-
redRenderPose
-
blueRenderPose
-
arena
-
-
Constructor Details
-
RebuiltOutpost
Creates an outpost of the specified color.
- Parameters:
arena- The host arena of this outpost.isBlue- Wether this is the blue outpost or the red one.
-
-
Method Details
-
addPoints
protected void addPoints()Description copied from class:GoalAdds Points When a Piece Has Been Successfully Scored in This Goal
Since this function is the only trigger called when a piece is scored it may handle other small things outside of adding points.
-
simulationSubTick
public void simulationSubTick(int subTickNum) Description copied from class:GoalHandles the update triggers for the goal object.
- Specified by:
simulationSubTickin interfaceSimulatedArena.Simulatable- Overrides:
simulationSubTickin classGoal- Parameters:
subTickNum- the number of this sub-tick (counting from 0 in each robot period)
-
draw
Description copied from class:GoalDisplays Game Pieces to AdvantageScope if Applicable
-
reset
public void reset()Resets the outposts internal fuel counter too 24. -
throwForGoal
public void throwForGoal()Attempts too throw a game piece at the specified goal.
This method comes with variance built in (to simulate human inconsistency) and will therefore only hit about half the time. Additionally if the hub does not have game pieces stored this method will not do anything. If you would like to manually control how the human player throws game pieces use
#outpostThrow(boolean, Rotation2d, Angle, LinearVelocity) -
dump
public void dump()Dumps game pieces from the specified outpost.
This function will dump up to 24 game pieces, dependent on how many game pieces are currently stored in the outpost. For more manual control of the game pieces in the outpost use#outpostThrow(boolean, Rotation2d, Angle, LinearVelocity). To have a human player attempt to throw a game piece into the hub use#outpostThrowForGoal(boolean). -
throwFuel
Throws a game piece from the outpost at the specified angle and speed.
This method comes with variance built in (to simulate human inconsistency). Additionally if the hub does not have game pieces stored this method will not do anything. If you would like to have the human player throw at the hub use
#outpostThrowForGoal(boolean)- Parameters:
throwYaw- The yaw at which too throw the ball.throwPitch- The pitch at which too throw the ball.
-