Team2168 / 2018_Main_Robot

0 stars 0 forks source link

Quintic Path File Generation #47

Open NotInControl opened 6 years ago

NotInControl commented 6 years ago

To speed up the quantic path calculation, we can modify the constructors of the QuinticTrajectory.java file to take in a string filename.

The constructor should search for the filename in the folder Paths/filename.txt on the Roborio, if the file exits the robot should load the file, which should contain the number of segments, the left vel, right vel, and heading, without running the calculation.

If the file does not exist the constructor should run the calculation, and save the file to the file name, this way on second run the file will be loaded and not the calculation.

Doing this will allow us to still run calculations on the roborio if we change the path between matches quickly, but if the path was ran before, loading the file and saving that should be much quicker than recalculating the same path each iteration.