Package yams.mechanisms.positional
Class DifferentialMechanism
java.lang.Object
yams.mechanisms.SmartMechanism
yams.mechanisms.positional.SmartPositionalMechanism
yams.mechanisms.positional.DifferentialMechanism
Arm mechanism.
-
Field Summary
Fields inherited from class yams.mechanisms.positional.SmartPositionalMechanism
m_mechanismLigament, m_mechanismRootFields inherited from class yams.mechanisms.SmartMechanism
m_mechanismWindow, m_smc, m_subsystem, m_telemetry -
Constructor Summary
ConstructorsConstructorDescriptionDifferentialMechanism(DifferentialMechanismConfig diffConfig) Constructor for the Differential mechanism. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of the mechanism.Get the relative position of the mechanism, taking into account the relative position defined in theMechanismPositionConfig.Get the tiltAngleof the mechanism.Get the twistAngleof the mechanism.max()Deprecated.min()Deprecated.set(double dutycycle) Deprecated.set(double twist, double tilt) Set the dutycycle of the differential mechanism.Deprecated.setPosition(Angle tilt, Angle twist) Set the position of the differential mechanism.setPosition(Supplier<Angle> tilt, Supplier<Angle> twist) Set the position of the differential mechanism using suppliers.setVoltage(Voltage volts) Deprecated.setVoltage(Supplier<Voltage> volts) Deprecated.voidIterate simsysId(Voltage maximumVoltage, Velocity<VoltageUnit> step, Time duration) Deprecated.voidUpdate the mechanism's telemetry.voidUpdates the mechanism ligament with the current angle of the Differential Mechanism.Methods inherited from class yams.mechanisms.positional.SmartPositionalMechanism
getMechanismLigament, getMechanismRoot, getMotorMethods inherited from class yams.mechanisms.SmartMechanism
gearbox, gearbox, gearing, gearing, getMechanismSetpoint, getMechanismWindow, getMotorController, sprocket, sprocket
-
Constructor Details
-
DifferentialMechanism
Constructor for the Differential mechanism.- Parameters:
diffConfig- LowerDifferentialMechanismConfigto use.
-
-
Method Details
-
getTwistPosition
Get the twistAngleof the mechanism.- Returns:
- Twist
Angle.
-
getTiltPosition
Get the tiltAngleof the mechanism.- Returns:
- Tilt
Angle.
-
setPosition
Set the position of the differential mechanism using suppliers.- Parameters:
tilt- Tilt of the Differential Mechanism.twist- Twist of the Differential Mechanism.- Returns:
RunCommandto set the position.
-
set
Set the dutycycle of the differential mechanism.- Parameters:
twist- Twist dutycycle.tilt- Tilt dutycycle.- Returns:
RunCommandto set the differential mechanism duty cycle.
-
setPosition
Set the position of the differential mechanism.- Parameters:
tilt- Tilt of the differential mechanism.twist- Twist of the differential mechanism.- Returns:
RunCommandto set the position.
-
updateTelemetry
public void updateTelemetry()Description copied from class:SmartMechanismUpdate the mechanism's telemetry.- Specified by:
updateTelemetryin classSmartMechanism
-
simIterate
public void simIterate()Description copied from class:SmartMechanismIterate sim- Specified by:
simIteratein classSmartMechanism
-
visualizationUpdate
public void visualizationUpdate()Updates the mechanism ligament with the current angle of the Differential Mechanism.- Specified by:
visualizationUpdatein classSmartMechanism- See Also:
-
getRelativeMechanismPosition
Get the relative position of the mechanism, taking into account the relative position defined in theMechanismPositionConfig.- Specified by:
getRelativeMechanismPositionin classSmartMechanism- Returns:
- The relative position of the mechanism as a
Translation3d.
-
getName
Description copied from class:SmartMechanismGet the name of the mechanism.- Specified by:
getNamein classSmartMechanism- Returns:
Stringname.
-
max
Deprecated.Description copied from class:SmartPositionalMechanismSmartPositionalMechanismis at max, defined by the soft limit or hard limit on theSmartPositionalMechanism.- Specified by:
maxin classSmartPositionalMechanism- Returns:
- Maximum angle for the
SmartPositionalMechanism.
-
set
Deprecated.Description copied from class:SmartMechanismSet the DutyCycle of theSmartMotorController.- Overrides:
setin classSmartMechanism- Parameters:
dutycycle- [-1,1] to set.- Returns:
Command
-
set
Deprecated.Description copied from class:SmartMechanismSet the DutyCycle of theSmartMotorController.- Overrides:
setin classSmartMechanism- Parameters:
dutycyle- [-1,1] to set via anSupplier.- Returns:
Command
-
setVoltage
Deprecated.Description copied from class:SmartMechanismSet the voltage of theSmartMotorController.- Overrides:
setVoltagein classSmartMechanism- Parameters:
volts-Voltageof theSmartMotorControllerto set.- Returns:
Command
-
setVoltage
Deprecated.Description copied from class:SmartMechanismSet the voltage of theSmartMotorController.- Overrides:
setVoltagein classSmartMechanism- Parameters:
volts-Voltageof theSmartMotorControllerto set, via aSupplier.- Returns:
Command
-
min
Deprecated.Description copied from class:SmartPositionalMechanismMinimum angle of theSmartPositionalMechanismgiven by the soft limit or hard limit of theSmartPositionalMechanism.- Specified by:
minin classSmartPositionalMechanism- Returns:
Triggeron minimum of theSmartPositionalMechanism.
-
sysId
Deprecated.Description copied from class:SmartPositionalMechanismCreate 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.- Specified by:
sysIdin classSmartPositionalMechanism- 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.
-