Class DriveToCommand

  • All Implemented Interfaces:
    edu.wpi.first.wpilibj.Sendable, edu.wpi.first.wpilibj2.command.Command

    public class DriveToCommand
    extends edu.wpi.first.wpilibj2.command.CommandBase
    A command that will drive the robot from a dynamic pose to an absolute pose
    • Field Summary

      • Fields inherited from class edu.wpi.first.wpilibj2.command.CommandBase

        m_requirements
    • Constructor Summary

      Constructors 
      Constructor Description
      DriveToCommand​(edu.wpi.first.wpilibj.geometry.Pose2d goal)
      Create a DriveToCommand
      DriveToCommand​(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints)
      Create a DriveToCommand
      DriveToCommand​(edu.wpi.first.wpilibj.geometry.Pose2d goal, SpeedConstraint constraints, boolean reversed)
      Create a DriveToCommand
      DriveToCommand​(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
      void end​(boolean interrupted)  
      void execute()  
      void initialize()  
      boolean isFinished()  
      • 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
      • Methods inherited from interface edu.wpi.first.wpilibj2.command.Command

        alongWith, andThen, andThen, asProxy, beforeStarting, cancel, deadlineWith, hasRequirement, isScheduled, perpetually, raceWith, runsWhenDisabled, schedule, schedule, withInterrupt, withTimeout
      • Methods inherited from interface edu.wpi.first.wpilibj.Sendable

        addChild, setName, setName, setName
    • 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 pose
        constraints - Speed constraints
      • DriveToCommand

        public DriveToCommand​(edu.wpi.first.wpilibj.geometry.Pose2d goal,
                              SpeedConstraint constraints,
                              boolean reversed)
        Create a DriveToCommand
        Parameters:
        goal - Goals pose
        constraints - Speed constraints
        reversed - 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 pose
        constraints - Speed constraints
        reversed - Should drive backwards
        stop - Should stop at the end of paths
    • Method Detail

      • initialize

        public void initialize()
      • execute

        public void execute()
      • end

        public void end​(boolean interrupted)
      • isFinished

        public boolean isFinished()