Class PathFollowCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.CommandBase
-
- io.github.frc5024.common_drive.commands.PathFollowCommand
-
@Deprecated(since="October 2020", forRemoval=true) public class PathFollowCommand extends CommandBaseDeprecated, for removal: This API element is subject to removal in a future version.PathFollowCommand is aCommandBaseobject generated byDriveTrainBase, 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.
-
-
Field Summary
-
Fields inherited from class edu.wpi.first.wpilibj2.command.CommandBase
m_requirements
-
-
Constructor Summary
Constructors Constructor Description PathFollowCommand(DriveTrainBase driveTrain, Path path, double epsRadius)Deprecated, for removal: This API element is subject to removal in a future version.Create a PathFollowCommand.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidend(boolean interrupted)Deprecated, for removal: This API element is subject to removal in a future version.voidexecute()Deprecated, for removal: This API element is subject to removal in a future version.voidinitialize()Deprecated, for removal: This API element is subject to removal in a future version.PathFollowCommandinReverse(boolean reverse)Deprecated, for removal: This API element is subject to removal in a future version.Configure reverse path followingbooleanisFinished()Deprecated, for removal: This API element is subject to removal in a future version.PathFollowCommandwithLookahead(double lookaheadMeters)Deprecated, for removal: This API element is subject to removal in a future version.A builder-style method for setting the lookahead.PathFollowCommandwithMaxSpeed(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-
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem, withName
-
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
-
-
-
-
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 controlpath- Path to followepsRadius- 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.
-
-