public class Arm
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Arm.ArmState
Represents a potential state for the arm including a wrist angle, elbow
angle, and extension.
|
class |
Arm.GrabBallLoadingStationBack |
class |
Arm.GrabBallLoadingStationForward |
static class |
Arm.HeldItem |
static class |
Arm.LegalState
Represents the different possible states of the Arm
READY = the state where the Arm is close to being able to place
|
class |
Arm.LowHatchBack |
class |
Arm.LowHatchForward |
class |
Arm.PlaceBallCargoBack |
class |
Arm.PlaceBallCargoForward |
class |
Arm.PlaceGrabState |
class |
Arm.ReadyLowHatchBack |
class |
Arm.ReadyLowHatchForward |
class |
Arm.ReadyPlaceBallRocketLowBack |
class |
Arm.ReadyPlaceBallRocketLowForward |
class |
Arm.ReadyPlaceBallRocketMiddleBack |
class |
Arm.ReadyPlaceHatchRocketMiddleBack |
class |
Arm.ReadyPlaceHatchRocketMiddleForward |
Modifier and Type | Field and Description |
---|---|
static double |
ARM_HEIGHT_IN_INCHES |
static double |
unitTestElbowAngle
Value meant only for unit testing.
|
static double |
unitTestExtensionDist
Value meant only for unit testing.
|
static double |
unitTestWristAngle
Value meant only for unit testing.
|
Constructor and Description |
---|
Arm(BaseElbow elbow,
BaseWrist wrist,
BaseExtension extension,
BaseIntake intake,
Claw claw) |
Modifier and Type | Method and Description |
---|---|
static Arm.ArmState |
getArmState(Arm.LegalState state)
Gets the ArmState object that corresponds to the LegalState Ex.
|
Claw |
getClaw() |
static java.awt.geom.Point2D.Double |
getCoordPosition(double elbowAngle,
double wristAngle,
double extensionLength)
Returns the arm's point in forward facing plane relative to (0,0) at the base
of the arm.
|
static double |
getCurrentLowestPointOnArm(double elbowAngle,
double wristAngle,
double extensionLength)
Returns the arm's point in forward facing plane relative to (0,0) at the base
of the arm.
|
static Arm.ArmState |
getCurrentState()
Gets the State that the arm most recently was located at.
|
BaseElbow |
getElbow() |
BaseExtension |
getExtension() |
Arm.HeldItem |
getHeldItem() |
static java.util.HashMap<Arm.LegalState,Arm.ArmState> |
getStates() |
static java.util.ArrayList<Arm.ArmState> |
getStatesArrayList() |
static Arm.ArmState |
getTargetState() |
BaseWrist |
getWrist() |
void |
setBrakeMode() |
void |
setCoastMode() |
void |
setHeldItem(Arm.HeldItem item) |
static void |
setState(Arm.ArmState state)
Sets the current state of the arm.
|
static void |
setTargetState(Arm.ArmState state) |
public static final double ARM_HEIGHT_IN_INCHES
public static double unitTestExtensionDist
public static double unitTestElbowAngle
public static double unitTestWristAngle
public Arm(BaseElbow elbow, BaseWrist wrist, BaseExtension extension, BaseIntake intake, Claw claw)
public BaseElbow getElbow()
public BaseWrist getWrist()
public BaseExtension getExtension()
public static java.util.HashMap<Arm.LegalState,Arm.ArmState> getStates()
public static java.util.ArrayList<Arm.ArmState> getStatesArrayList()
public static void setState(Arm.ArmState state)
public static Arm.ArmState getCurrentState()
public static Arm.ArmState getArmState(Arm.LegalState state)
public static java.awt.geom.Point2D.Double getCoordPosition(double elbowAngle, double wristAngle, double extensionLength)
public static double getCurrentLowestPointOnArm(double elbowAngle, double wristAngle, double extensionLength)
public void setHeldItem(Arm.HeldItem item)
public Arm.HeldItem getHeldItem()
public static Arm.ArmState getTargetState()
public static void setTargetState(Arm.ArmState state)
public void setCoastMode()
public void setBrakeMode()
public Claw getClaw()