Package xbot.common.trajectory
Class SwerveSimpleTrajectoryLogic
java.lang.Object
xbot.common.trajectory.SwerveSimpleTrajectoryLogic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalculatePowers
(Pose2d currentPose, PIDManager positionalPid, HeadingModule headingModule) calculatePowers
(Pose2d currentPose, PIDManager positionalPid, HeadingModule headingModule, double maximumVelocity) getGoalVector
(Pose2d currentPose) boolean
recommendIsFinished
(Pose2d currentPose, PIDManager positionalPid, HeadingModule headingModule) void
void
setAimAtGoalDuringFinalLeg
(boolean aimAtGoalDuringFinalLeg) void
setAimAtIntermediateNonFinalLegs
(boolean aimAtIntermediateNonFinalLegs) void
setConstantVelocity
(double constantVelocity) void
setDistanceThresholdToPrioritizeRotation
(double distanceThresholdToPrioritizeRotation) void
setDriveBackwards
(boolean driveBackwards) void
setEnableConstantVelocity
(boolean enableConstantVelocity) void
setEnableSpecialAimDuringFinalLeg
(boolean enableSpecialAimDuringFinalLeg) void
setEnableSpecialAimTarget
(boolean enableSpecialAimTarget) void
setKeyPoints
(List<XbotSwervePoint> keyPoints) void
setKeyPointsProvider
(Supplier<List<XbotSwervePoint>> keyPointsProvider) void
setMaxPower
(double maxPower) void
setMaxTurningPower
(double maxTurningPower) void
setPrioritizeRotationIfCloseToGoal
(boolean prioritizeRotationIfCloseToGoal) void
setSpecialAimTarget
(Pose2d specialAimTarget) void
setStopWhenFinished
(boolean newValue) void
setWaypointRouter
(ProvidesWaypoints waypointRouter)
-
Constructor Details
-
SwerveSimpleTrajectoryLogic
public SwerveSimpleTrajectoryLogic()
-
-
Method Details
-
setEnableSpecialAimTarget
public void setEnableSpecialAimTarget(boolean enableSpecialAimTarget) -
setEnableSpecialAimDuringFinalLeg
public void setEnableSpecialAimDuringFinalLeg(boolean enableSpecialAimDuringFinalLeg) -
setSpecialAimTarget
-
setAimAtGoalDuringFinalLeg
public void setAimAtGoalDuringFinalLeg(boolean aimAtGoalDuringFinalLeg) -
setAimAtIntermediateNonFinalLegs
public void setAimAtIntermediateNonFinalLegs(boolean aimAtIntermediateNonFinalLegs) -
setDriveBackwards
public void setDriveBackwards(boolean driveBackwards) -
setWaypointRouter
-
setKeyPoints
-
setKeyPointsProvider
-
setMaxPower
public void setMaxPower(double maxPower) -
setMaxTurningPower
public void setMaxTurningPower(double maxTurningPower) -
setEnableConstantVelocity
public void setEnableConstantVelocity(boolean enableConstantVelocity) -
setConstantVelocity
public void setConstantVelocity(double constantVelocity) -
getKeyPoints
-
getResolvedKeyPoints
-
setStopWhenFinished
public void setStopWhenFinished(boolean newValue) -
setPrioritizeRotationIfCloseToGoal
public void setPrioritizeRotationIfCloseToGoal(boolean prioritizeRotationIfCloseToGoal) -
setDistanceThresholdToPrioritizeRotation
public void setDistanceThresholdToPrioritizeRotation(double distanceThresholdToPrioritizeRotation) -
reset
-
getGoalVector
-
calculatePowers
public Twist2d calculatePowers(Pose2d currentPose, PIDManager positionalPid, HeadingModule headingModule) -
calculatePowers
public Twist2d calculatePowers(Pose2d currentPose, PIDManager positionalPid, HeadingModule headingModule, double maximumVelocity) -
recommendIsFinished
public boolean recommendIsFinished(Pose2d currentPose, PIDManager positionalPid, HeadingModule headingModule) -
getLastResult
-