Class 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
    • Field Summary

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

        m_requirements
    • 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 pose
      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
      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
    • 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
      • Methods inherited from interface edu.wpi.first.wpilibj2.command.Command

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

        addChild, setName, setName, setName
    • 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 speed
        reversed - Is the path to be followed backwards?