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

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

        m_requirements
    • 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 pose
      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
      LinePath​(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 settings
      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
    • 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

      • 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 profile
        reversed - 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 profile
        reversed - Should the path be driven backwards?
        stop - Should it stop at the end of the path