Right now, I’m generating my paths as I go through the autonomous, which obviously isn’t ideal. The robot also disconnects while generating the path, which makes the entire thing unviable. How would I go about generating the paths before hand? Would it work if I ran a separate task in initialize?
Yes, it’s possible to generate paths in initialize and then call back to them during the autonomous period.
Wouldn’t the effect be the same since the robot would need to hang for a few seconds before running the actual autonomous?
Initialize is a function in PROS when the program first boots. If the robot pauses in initialize fot a couple seconds, its not a huge deal since it will have to wait for the match to start regardless.
it will take a little less than a second per average path so be wary of that when you boot up to close to when the game starts
Anyone using the latest OkapiLib v4.0.0 RC can load/store paths from/to the SD card using these functions:
https://okapilib.github.io/OkapiLib/classokapi_1_1AsyncMotionProfileController.html#ad588aa51d62169159ff5e4b05ad3982c
https://okapilib.github.io/OkapiLib/classokapi_1_1AsyncMotionProfileController.html#a87c74350a819a3a322321be787c32d1f
You can use this feature to precompute paths before the match and save time having to compute them each time. The latest releases are always here: Releases · OkapiLib/OkapiLib · GitHub
Cool, I saw this issue was resolved but didn’t see where it was documented (especially since it says “needs doc”.