Package frc.robot.autonomous.actions
Class DriveToCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.CommandBase
-
- frc.robot.autonomous.actions.DriveToCommand
-
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable,edu.wpi.first.wpilibj2.command.Command
public class DriveToCommand extends edu.wpi.first.wpilibj2.command.CommandBaseA command that will drive the robot from a dynamic pose to an absolute pose
-
-
Constructor Summary
Constructors Constructor Description DriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal)Create a DriveToCommandDriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints)Create a DriveToCommandDriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints, boolean reversed)Create a DriveToCommandDriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints, boolean reversed, boolean stop)Create a DriveToCommand
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend(boolean interrupted)voidexecute()voidinitialize()booleanisFinished()-
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
DriveToCommand
public DriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal)
Create a DriveToCommand- Parameters:
goal- Goals pose
-
DriveToCommand
public DriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints)Create a DriveToCommand- Parameters:
goal- Goals poseconstraints- Speed constraints
-
DriveToCommand
public DriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints, boolean reversed)Create a DriveToCommand- Parameters:
goal- Goals poseconstraints- Speed constraintsreversed- Should drive backwards?
-
DriveToCommand
public DriveToCommand(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints, boolean reversed, boolean stop)Create a DriveToCommand- Parameters:
goal- Goals poseconstraints- Speed constraintsreversed- Should drive backwardsstop- Should stop at the end of paths
-
-