Package yams.mechanisms.positional
Class SmartPositionalMechanism
java.lang.Object
yams.mechanisms.SmartMechanism
yams.mechanisms.positional.SmartPositionalMechanism
- Direct Known Subclasses:
Arm,DifferentialMechanism,DoubleJointedArm,Elevator,Pivot
Generic for positional mechanisms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MechanismLigament2dThe ligament that is being moved.protected MechanismRoot2dThe root point of the Mechanism.Fields inherited from class yams.mechanisms.SmartMechanism
m_mechanismWindow, m_smc, m_subsystem, m_telemetry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the ligament of the 2D mechanism model.The root of the 2D mechanism model.getMotor()Get the motor controller which is moving the mechanism.abstract Triggermax()SmartPositionalMechanismis at max, defined by the soft limit or hard limit on theSmartPositionalMechanism.abstract Triggermin()Minimum angle of theSmartPositionalMechanismgiven by the soft limit or hard limit of theSmartPositionalMechanism.abstract CommandsysId(Voltage maximumVoltage, Velocity<VoltageUnit> step, Time duration) Create the SysId routine and commands to run the SysId tests.Methods inherited from class yams.mechanisms.SmartMechanism
gearbox, gearbox, gearing, gearing, getMechanismSetpoint, getMechanismWindow, getMotorController, getName, getRelativeMechanismPosition, set, set, setVoltage, setVoltage, simIterate, sprocket, sprocket, updateTelemetry, visualizationUpdate
-
Field Details
-
m_mechanismRoot
The root point of the Mechanism. -
m_mechanismLigament
The ligament that is being moved.
-
-
Constructor Details
-
SmartPositionalMechanism
public SmartPositionalMechanism()
-
-
Method Details
-
max
SmartPositionalMechanismis at max, defined by the soft limit or hard limit on theSmartPositionalMechanism.- Returns:
- Maximum angle for the
SmartPositionalMechanism.
-
min
Minimum angle of theSmartPositionalMechanismgiven by the soft limit or hard limit of theSmartPositionalMechanism.- Returns:
Triggeron minimum of theSmartPositionalMechanism.
-
sysId
Create the SysId routine and commands to run the SysId tests. The SysId test will run the mechanism up then down at a constant speed, then run the mechanism up at an increasing speed and down at an increasing speed. Requires the maximum and minimum limit to be set. Runs the mechanism within 1 degree of the maximum and minimum.- Parameters:
maximumVoltage- MaximumVoltageto give to theSmartPositionalMechanism, is the voltage given to run theSmartPositionalMechanismup at a static speed.step- StepVoltageto give to theSmartPositionalMechanism.duration- SysId test duration.- Returns:
SequentialCommandGrouprunning the SysId commands.
-
getMechanismLigament
Get the ligament of the 2D mechanism model. Used to change the position of the mechanism model in the SmartDashboard.- Returns:
- Ligament of the 2D mechanism model.
-
getMechanismRoot
The root of the 2D mechanism model.- Returns:
- Root of the 2D mechanism model.
-
getMotor
Get the motor controller which is moving the mechanism.- Returns:
- Motor controller which is moving the mechanism.
-