Class CANVictorSPXWpiAdapter
java.lang.Object
xbot.common.controls.actuators.XCANMotorController
xbot.common.controls.actuators.wpi_adapters.CANVictorSPXWpiAdapter
- All Implemented Interfaces:
DataFrameRefreshable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class xbot.common.controls.actuators.XCANMotorController
XCANMotorController.MotorPidMode, XCANMotorController.XCANMotorControllerFactory -
Field Summary
Fields inherited from class xbot.common.controls.actuators.XCANMotorController
akitName, busId, deviceId, firstPeriodicCall, inputs, kDProps, kGravityFFProps, kIProps, kMaxOutputProps, kMinOutputProps, kPProps, kStaticFFProps, kVelocityFFProps, MAX_VOLTAGE, pidProperties, propertyFactory, softwareForwardLimit, softwareReverseLimit, usesPropertySystem -
Constructor Summary
ConstructorsConstructorDescriptionCANVictorSPXWpiAdapter(CANMotorControllerInfo info, String owningSystemPrefix, PropertyFactory propertyFactory, DevicePolice police, RobotAssertionManager assertionManager, String pidPropertyPrefix, XCANMotorControllerPIDProperties defaultPIDProperties, PowerDistributionProperties pdProperties) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetPower()booleanvoidsetClosedLoopRampRates(Time dutyCyclePeriod, Time voltagePeriod) voidsetConfiguration(CANMotorControllerOutputConfig outputConfig) voidsetOpenLoopRampRates(Time dutyCyclePeriod, Time voltagePeriod) voidsetPidDirectly(XCANMotorControllerPIDProperties pidProperties, int slot) Set the PID values for the motor controller directly, without using the property system.voidsetPositionAndVelocityUpdateFrequency(Frequency frequency) voidsetPower(double power) voidsetPowerRange(double minPower, double maxPower) voidsetRawPosition(Angle position) Override the position of the motor controller.voidsetRawPositionTarget(Angle rawPosition, XCANMotorController.MotorPidMode mode, int slot) Set the target position for the motor controller.voidsetRawVelocityTarget(AngularVelocity rawVelocity, XCANMotorController.MotorPidMode mode, int slot) Set the target velocity for the motor controller.voidsetRawVelocityTargetWithFeedForward(AngularVelocity rawVelocity, XCANMotorController.MotorPidMode mode, double feedForward, int slot) Set the target velocity for the motor controller.voidsetTrapezoidalProfileAcceleration(AngularAcceleration acceleration) voidvoidvoidsetVoltage(Voltage voltage) voidsetVoltageRange(Voltage minVoltage, Voltage maxVoltage) protected voidMethods inherited from class xbot.common.controls.actuators.XCANMotorController
convertDistanceToRawAngle, convertRawAngleToDistance, convertRawAngleToScaledAngle, convertRawVelocityToScaledVelocity, convertScaledAngleToRawAngle, convertScaledVelocityToRawVelocity, getCurrent, getPosition, getPositionAsDistance, getRawPosition, getRawVelocity, getVelocity, getVoltage, isValidPowerRequest, isValidVoltageRequest, periodic, refreshDataFrame, setAngleScaleFactor, setDistancePerMotorRotationsScaleFactor, setPidDirectly, setPidDirectly, setPidDirectly, setPosition, setPositionTarget, setPositionTarget, setPositionTarget, setRawPositionTarget, setRawPositionTarget, setRawVelocityTarget, setRawVelocityTarget, setRawVelocityTargetWithFeedForward, setRawVelocityTargetWithFeedForward, setSoftwareForwardLimit, setSoftwareReverseLimit, setVelocityTarget, setVelocityTarget, setVelocityTarget, setVelocityTargetWithFeedForward, setVelocityTargetWithFeedForward, setVelocityTargetWithFeedForward
-
Constructor Details
-
CANVictorSPXWpiAdapter
@AssistedInject public CANVictorSPXWpiAdapter(@Assisted("info") CANMotorControllerInfo info, @Assisted("owningSystemPrefix") String owningSystemPrefix, PropertyFactory propertyFactory, DevicePolice police, RobotAssertionManager assertionManager, @Assisted("pidPropertyPrefix") String pidPropertyPrefix, @Assisted("defaultPIDProperties") XCANMotorControllerPIDProperties defaultPIDProperties, PowerDistributionProperties pdProperties)
-
-
Method Details
-
setConfiguration
- Specified by:
setConfigurationin classXCANMotorController
-
setPidDirectly
Description copied from class:XCANMotorControllerSet the PID values for the motor controller directly, without using the property system.- Specified by:
setPidDirectlyin classXCANMotorController- Parameters:
pidProperties- The PID properties to set.slot- The PID slot to set the values for.
-
getHealth
- Specified by:
getHealthin classXCANMotorController
-
setOpenLoopRampRates
- Specified by:
setOpenLoopRampRatesin classXCANMotorController
-
setClosedLoopRampRates
- Specified by:
setClosedLoopRampRatesin classXCANMotorController
-
setTrapezoidalProfileAcceleration
- Specified by:
setTrapezoidalProfileAccelerationin classXCANMotorController
-
setTrapezoidalProfileJerk
- Specified by:
setTrapezoidalProfileJerkin classXCANMotorController
-
setTrapezoidalProfileMaxVelocity
- Specified by:
setTrapezoidalProfileMaxVelocityin classXCANMotorController
-
setPower
public void setPower(double power) - Specified by:
setPowerin classXCANMotorController
-
getPower
public double getPower()- Specified by:
getPowerin classXCANMotorController
-
setPowerRange
public void setPowerRange(double minPower, double maxPower) - Specified by:
setPowerRangein classXCANMotorController
-
setRawPosition
Description copied from class:XCANMotorControllerOverride the position of the motor controller.Typically, this would be called to zero the reported position of the motor as part of a calibration routine.
- Specified by:
setRawPositionin classXCANMotorController- Parameters:
position- The new position to set.
-
setRawPositionTarget
public void setRawPositionTarget(Angle rawPosition, XCANMotorController.MotorPidMode mode, int slot) Description copied from class:XCANMotorControllerSet the target position for the motor controller.- Specified by:
setRawPositionTargetin classXCANMotorController- Parameters:
rawPosition- The target position to set.mode- The PID mode to use when setting the target position.slot- The PID slot to use when setting the target position.
-
setRawVelocityTarget
public void setRawVelocityTarget(AngularVelocity rawVelocity, XCANMotorController.MotorPidMode mode, int slot) Description copied from class:XCANMotorControllerSet the target velocity for the motor controller.- Specified by:
setRawVelocityTargetin classXCANMotorController- Parameters:
rawVelocity- The target velocity to set.mode- The PID mode to use when setting the target velocity.slot- The PID slot to use when setting the target velocity.
-
setRawVelocityTargetWithFeedForward
public void setRawVelocityTargetWithFeedForward(AngularVelocity rawVelocity, XCANMotorController.MotorPidMode mode, double feedForward, int slot) Description copied from class:XCANMotorControllerSet the target velocity for the motor controller.- Specified by:
setRawVelocityTargetWithFeedForwardin classXCANMotorController- Parameters:
rawVelocity- The target velocity to set.mode- The PID mode to use when setting the target velocity.feedForward- The additional feed forward to apply (in volts for voltage PID modes or -1..1 for duty-cycle PID modes).slot- The PID slot to use when setting the target velocity.
-
setVoltage
- Specified by:
setVoltagein classXCANMotorController
-
setVoltageRange
- Specified by:
setVoltageRangein classXCANMotorController
-
isInverted
public boolean isInverted()- Specified by:
isInvertedin classXCANMotorController
-
updateInputs
- Specified by:
updateInputsin classXCANMotorController
-
setPositionAndVelocityUpdateFrequency
- Specified by:
setPositionAndVelocityUpdateFrequencyin classXCANMotorController
-