Skip to content

Adapted Library from FRC 254 to generate paths for WPI Command-Based Robots

Notifications You must be signed in to change notification settings

Team2791/TrajectoryLib-254-Adapted-by-2791

Repository files navigation

TrajectoryLib-254-adapted

This is an adaptation of FRC 254's TrajectoryLib. They created this code, I just adapted it for a WPI Command-Based robot This Uses FRC254's Spline Path Generating Code and FeedFoward Path Following. HUGE Thanks to them!!!:
https://github.com/Team254/TrajectoryLib


How To Use (as of 02/25/2017)

Step 1:

In a new scope of the Main class, define the config values and the waypoints with the following syntax:

   WaypointSequence p = new WaypointSequence(10);
   p.new Waypoint(x_feet,y_feet,angle_radians); 

the angles are absolute
If your angle was negative and the path didn't reticulate properly, try using a positive angle using invertY() on the Waypoint Sequence

Step 3:

Find the path file, and copy it to the location "://file/paths" on the rio

Step 4:

Make sure that in your robot code that your path has been added to the array "kPathNames" and "KPathDescriptions" in AutoPaths.java

Step 5:

Create an Autonomous Command/Command Group that uses the Follow Path command like this:
new FollowPath(AutoPaths.get("TestPath"))

Step 6:

Run your auto!


This Uses FRC254's Spline Path Generating Code and FeedFoward Path Following. HUGE Thanks to them!!!:
https://github.com/Team254/TrajectoryLib

About

Adapted Library from FRC 254 to generate paths for WPI Command-Based Robots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published