Package yams.mechanisms.velocity
Class SmartVelocityMechanism
java.lang.Object
yams.mechanisms.SmartMechanism
yams.mechanisms.velocity.SmartVelocityMechanism
- Direct Known Subclasses:
FlyWheel
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()SmartVelocityMechanismis at max, defined by the soft limit or hard limit on theSmartVelocityMechanism.abstract Triggermin()Minimum angle of theSmartVelocityMechanismgiven by the soft limit or hard limit of theSmartVelocityMechanism.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
-
mechanismRoot
The root point of the Mechanism. -
mechanismLigament
The ligament that is being moved.
-
-
Constructor Details
-
SmartVelocityMechanism
public SmartVelocityMechanism()
-
-
Method Details
-
max
SmartVelocityMechanismis at max, defined by the soft limit or hard limit on theSmartVelocityMechanism.- Returns:
- Maximum angle for the
SmartVelocityMechanism.
-
min
Minimum angle of theSmartVelocityMechanismgiven by the soft limit or hard limit of theSmartVelocityMechanism.- Returns:
Triggeron minimum of theSmartVelocityMechanism.
-
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 theSmartVelocityMechanism, is the voltage given to run theSmartVelocityMechanismup at a static speed.step- StepVoltageto give to theSmartVelocityMechanism.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.
-