Class PathGenerator


  • public class PathGenerator
    extends java.lang.Object
    Trajectory-based path follower command generator. For generating WPILib command to drive the robot form point to point
    • Constructor Summary

      Constructors 
      Constructor Description
      PathGenerator()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t)
      Generate a path following command group from a trajectory
      static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t, SpeedConstraint constraint)
      Generate a path following command group from a trajectory and a constraint
      static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t, SpeedConstraint constraint, boolean reversed)  
      static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t, SpeedConstraint constraint, boolean reversed, boolean stop)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PathGenerator

        public PathGenerator()
    • Method Detail

      • generate

        public static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t)
        Generate a path following command group from a trajectory
        Parameters:
        t - Trajectory to follow
        Returns:
        generated path following command
      • generate

        public static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t,
                                                                                     SpeedConstraint constraint)
        Generate a path following command group from a trajectory and a constraint
        Parameters:
        t - Trajectory to follow
        constraint - trajectory constraints
        Returns:
        generated path following command
      • generate

        public static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t,
                                                                                     SpeedConstraint constraint,
                                                                                     boolean reversed)
        Parameters:
        t - Trajectory to follow
        constraint - Trajectory constraints
        reversed - Should the path be reversed
        Returns:
        generated path following command
      • generate

        public static edu.wpi.first.wpilibj2.command.SequentialCommandGroup generate​(EasyTrajectory t,
                                                                                     SpeedConstraint constraint,
                                                                                     boolean reversed,
                                                                                     boolean stop)
        Parameters:
        t - Trajectory to follow
        constraint - Trajectory constraints
        reversed - Should the path be reversed
        stop - Should the path stop after
        Returns:
        generated path following command