Class PivotConfigurationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
yams.core.exceptions.PivotConfigurationException
- All Implemented Interfaces:
Serializable
Thrown by
Pivot or
PivotConfig when a required field in
PivotConfig is missing or invalid.
Common triggers include:
withSmartMotorController(SmartMotorController)called more than once on the same config- MOI (moment of inertia) not derivable neither length+mass nor an explicit MOI was
configured on the underlying
SmartMotorControllerConfig
Resolution: Ensure PivotConfig.withSmartMotorController(SmartMotorController)
is called exactly once, and that the motor's SmartMotorControllerConfig includes
withMomentOfInertia(Distance, Mass) or withMomentOfInertia(MomentOfInertia) when
simulation is used.
Example minimal configuration:
SmartMotorControllerConfig motorCfg = new SmartMotorControllerConfig()
.withMomentOfInertia(Inches.of(10), Pounds.of(2));
PivotConfig config = new PivotConfig()
.withSmartMotorController(SmartMotorController.create(SPARK_MAX, DCMotor.getNEO(1),
motorCfg)); Pivot pivot = new Pivot(config);
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPivotConfigurationException(String message, String result, String remedyFunction) Pivot configuration exception. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PivotConfigurationException
-