Package frc.robot.autonomous.actions
Class LinePath
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.CommandBase
-
- edu.wpi.first.wpilibj2.command.CommandGroupBase
-
- edu.wpi.first.wpilibj2.command.SequentialCommandGroup
-
- frc.robot.autonomous.actions.LinePath
-
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable
,edu.wpi.first.wpilibj2.command.Command
public class LinePath extends edu.wpi.first.wpilibj2.command.SequentialCommandGroup
A simple point-to-point movement command. This works by motion-profiling "desired" motor velocity control frames, then sampling them, and comparing against the real motor data. The LinePath will automatically turn to face the "end" pose, then move towards it.
-
-
Constructor Summary
Constructors Constructor Description LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end)
Generate a LinePath from a start to end poseLinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end, boolean reversed)
Generate a LinePath from a start to end poseLinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end, SpeedConstraint constraints, boolean reversed)
LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end, SpeedConstraint constraints, boolean reversed, boolean stop)
Generate a LinePath from a start to end pose with various settingsLinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d end, SpeedConstraint constraints, boolean reversed)
Generate a LinePath from a start pose to end translation with various settings
-
Method Summary
-
Methods inherited from class edu.wpi.first.wpilibj2.command.SequentialCommandGroup
addCommands, end, execute, initialize, isFinished, runsWhenDisabled
-
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandGroupBase
clearGroupedCommand, clearGroupedCommands, deadline, parallel, race, requireUngrouped, requireUngrouped, sequence
-
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
-
LinePath
public LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end)
Generate a LinePath from a start to end pose- Parameters:
start
- Starting pose (field-relative)end
- Desired ending pose ( field-relative)
-
LinePath
public LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end, boolean reversed)
Generate a LinePath from a start to end pose- Parameters:
start
- Starting pose (field-relative)end
- Desired ending pose ( field-relative)reversed
- Should the path be driven backwards?
-
LinePath
public LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d end, SpeedConstraint constraints, boolean reversed)
Generate a LinePath from a start pose to end translation with various settings- Parameters:
start
- Starting pose (field-relative)end
- Desired ending translation vector (start-relative)constraints
- Constraints on profilereversed
- Should the path be driven backwards?
-
LinePath
public LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end, SpeedConstraint constraints, boolean reversed)
-
LinePath
public LinePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Pose2d end, SpeedConstraint constraints, boolean reversed, boolean stop)
Generate a LinePath from a start to end pose with various settings- Parameters:
start
- Starting pose (field-relative)end
- Desired ending pose (field-relative)constraints
- Constraints on profilereversed
- Should the path be driven backwards?stop
- Should it stop at the end of the path
-
-