Class SwerveDriveRotationAdvisor
java.lang.Object
xbot.common.subsystems.drive.swerve.SwerveDriveRotationAdvisor
This class is responsible for advising the drive subsystem on what heading to rotate to based on various inputs and modes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory for creating instances of SwerveDriveRotationAdvisor.static enum -
Constructor Summary
ConstructorsConstructorDescriptionSwerveDriveRotationAdvisor(RobotAssertionManager assertionManager, ISwerveAdvisorPoseSupport pose, ISwerveAdvisorDriveSupport drive, PropertyFactory pf, HumanVsMachineDecider hvmDecider, double hvmDeadband) -
Method Summary
Modifier and TypeMethodDescriptiongetSuggestedRotationValue(Translation2d snappingInput, double triggerRotateIntent) voidvoidsetSnappingZoneCount(int count) Set how many snapping zones there are.
-
Constructor Details
-
SwerveDriveRotationAdvisor
@AssistedInject public SwerveDriveRotationAdvisor(RobotAssertionManager assertionManager, ISwerveAdvisorPoseSupport pose, ISwerveAdvisorDriveSupport drive, PropertyFactory pf, @Assisted HumanVsMachineDecider hvmDecider, @Assisted("HvmDeadband") double hvmDeadband)
-
-
Method Details
-
setSnappingZoneCount
public void setSnappingZoneCount(int count) Set how many snapping zones there are. For example, 4 would mean we snap to the cardinal directions (0, 90, 180, 270) while 2 would mean we only snap to forward and reverse (0, 180).- Parameters:
count- The number of snapping zones, must be at least 2 (1 would mean we snap to everything, essentially disabling snapping zones)
-
getSuggestedRotationValue
public SwerveSuggestedRotation getSuggestedRotationValue(Translation2d snappingInput, double triggerRotateIntent) -
resetDecider
public void resetDecider()
-