Package com.marslib.auto
Class SmartAssistAlign
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
com.marslib.auto.SmartAssistAlign
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
public class SmartAssistAlign
extends edu.wpi.first.wpilibj2.command.Command
Command for dynamic, odometry-based robot alignment specifically for scoring on standard FRC grid
nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior -
Constructor Summary
ConstructorsConstructorDescriptionSmartAssistAlign(SwerveDrive swerveDrive, DoubleSupplier forwardThrottleSupplier, edu.wpi.first.math.geometry.Pose2d targetNode) Overrides the driver's lateral (Y) and rotational (Theta) control to perfectly track a specific field coordinate, while allowing them to maintain forward/backward (X) speed. -
Method Summary
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initialize, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
SmartAssistAlign
public SmartAssistAlign(SwerveDrive swerveDrive, DoubleSupplier forwardThrottleSupplier, edu.wpi.first.math.geometry.Pose2d targetNode) Overrides the driver's lateral (Y) and rotational (Theta) control to perfectly track a specific field coordinate, while allowing them to maintain forward/backward (X) speed.- Parameters:
swerveDrive- Standard drive subsystem hook.forwardThrottleSupplier- Lambda to the driver's X-axis joystick input.targetNode- The stationary coordinate mapping we want to align to.
-
-
Method Details
-
execute
public void execute()- Overrides:
executein classedu.wpi.first.wpilibj2.command.Command
-
end
public void end(boolean interrupted) - Overrides:
endin classedu.wpi.first.wpilibj2.command.Command
-
isFinished
public boolean isFinished()- Overrides:
isFinishedin classedu.wpi.first.wpilibj2.command.Command
-