Package frc.robot.autonomous.actions
Class TrianglePath
- 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.TrianglePath
-
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable
,edu.wpi.first.wpilibj2.command.Command
public class TrianglePath extends edu.wpi.first.wpilibj2.command.SequentialCommandGroup
A simple point-to-waypoint-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 TrianglePath will automatically get from the start pose to the end pose, while finding the "best" way to pass through the midpoint
-
-
Constructor Summary
Constructors Constructor Description TrianglePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d mid, edu.wpi.first.wpilibj.geometry.Pose2d end)
Generate a TrianglePath from a start pose, through a midpoint translation, to an end poseTrianglePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d mid, edu.wpi.first.wpilibj.geometry.Pose2d end, boolean reversed)
Generate a TrianglePath from a start pose, through a midpoint translation, to an end poseTrianglePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d mid, edu.wpi.first.wpilibj.geometry.Pose2d end, SpeedConstraint constraints, boolean reversed)
Generate a TrianglePath from a start pose, through a midpoint translation, to an end pose
-
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
-
TrianglePath
public TrianglePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d mid, edu.wpi.first.wpilibj.geometry.Pose2d end)
Generate a TrianglePath from a start pose, through a midpoint translation, to an end pose- Parameters:
start
- Starting pose (field-relative)mid
- Midpoint translation (start-relative)end
- End pose (field-relative)
-
TrianglePath
public TrianglePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d mid, edu.wpi.first.wpilibj.geometry.Pose2d end, boolean reversed)
Generate a TrianglePath from a start pose, through a midpoint translation, to an end pose- Parameters:
start
- Starting pose (field-relative)mid
- Midpoint translation (start-relative)end
- End pose (field-relative)reversed
- Is the path to be followed backwards?
-
TrianglePath
public TrianglePath(edu.wpi.first.wpilibj.geometry.Pose2d start, edu.wpi.first.wpilibj.geometry.Translation2d mid, edu.wpi.first.wpilibj.geometry.Pose2d end, SpeedConstraint constraints, boolean reversed)
Generate a TrianglePath from a start pose, through a midpoint translation, to an end pose- Parameters:
start
- Starting pose (field-relative)mid
- Midpoint translation (start-relative)end
- End pose (field-relative)constraints
- Constraints on profile speedreversed
- Is the path to be followed backwards?
-
-