Class DoubleJointedArmConfigurationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
yams.core.exceptions.DoubleJointedArmConfigurationException
- All Implemented Interfaces:
Serializable
Thrown by
DoubleJointedArm when a required field in the
lower-joint or upper-joint ArmConfig is missing or invalid.
Common triggers include:
- The lower and upper joint motor controllers do not share the same WPILib
Subsysteminstance both must reference the same subsystem so that a single command can require it - Starting angle missing on either joint config both the lower and upper
ArmConfigmust have a starting position set viaSmartMotorControllerConfig.withStartingPosition(Angle)
Resolution: Ensure both joint configs supply motors via
ArmConfig.withSmartMotorController(SmartMotorController), that both motors are bound to the same
subsystem via SmartMotorControllerConfig.withSubsystem(Subsystem), and that both configs
include SmartMotorControllerConfig.withStartingPosition(Angle).
Example minimal configuration:
ArmConfig lowerConfig = new ArmConfig()
.withSmartMotorController(SmartMotorController.create(SPARK_MAX, DCMotor.getNEO(1),
lowerMotorCfg)); ArmConfig upperConfig = new ArmConfig()
.withSmartMotorController(SmartMotorController.create(SPARK_MAX, DCMotor.getNEO(1),
upperMotorCfg)); DoubleJointedArm arm = new DoubleJointedArm(lowerConfig, upperConfig);
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleJointedArmConfigurationException(String message, String result, String remedyFunction) Arm configuration exception. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DoubleJointedArmConfigurationException
-