Class PathFollowCommand

  • All Implemented Interfaces:
    Sendable, Command

    @Deprecated(since="October 2020",
                forRemoval=true)
    public class PathFollowCommand
    extends CommandBase
    Deprecated, for removal: This API element is subject to removal in a future version.
    PathFollowCommand is a CommandBase object generated by DriveTrainBase, and can be used to follow paths with the drivetrain. In the background, it also logs the robot's current position vs the goal position for match analysis.
    • Constructor Detail

      • PathFollowCommand

        public PathFollowCommand​(DriveTrainBase driveTrain,
                                 Path path,
                                 double epsRadius)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a PathFollowCommand. This should not be called from user code. To create one of these, call DriveTrainBase.createPathingCommand() instead.
        Parameters:
        driveTrain - DriveTrain to control
        path - Path to follow
        epsRadius - Radius around the final pose for trigger isFinished()
    • Method Detail

      • inReverse

        public PathFollowCommand inReverse​(boolean reverse)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Configure reverse path following
        Parameters:
        reverse - Should the path be followed in reverse?
        Returns:
        This Object
      • withLookahead

        public PathFollowCommand withLookahead​(double lookaheadMeters)
        Deprecated, for removal: This API element is subject to removal in a future version.
        A builder-style method for setting the lookahead. Lookahead is the radius in front of the robot that is searched for a new point in the path. The bigger this is, the more shortcuts will be taken while path following.
        Parameters:
        lookaheadMeters - How far to look ahead for new goal poses
        Returns:
        This Object
      • withMaxSpeed

        public PathFollowCommand withMaxSpeed​(double speedPercent)
        Deprecated, for removal: This API element is subject to removal in a future version.
        A builder-style method for setting the max speed
        Parameters:
        speedPercent - Percent speed to cap at
        Returns:
        This Object
      • initialize

        public void initialize()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • execute

        public void execute()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • end

        public void end​(boolean interrupted)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • isFinished

        public boolean isFinished()
        Deprecated, for removal: This API element is subject to removal in a future version.