Pros okapi support

I am attempting to use okapi in order to code our auton. However, I am not sure of some things. First of all, can I use turnraw commands in between pathing commands in order to point turns without it breaking? Also, because it can take time, could I setup my pathing in the initialization function? Thank you.

If I recall correctly, you can generate paths before the auton runs, but if you make too many you run the risk of getting a memory permission error. Delete unused paths as the auton goes on. As for the first question, do you mean turn as you are following a path, or directly after? Try it anyways.

The turn is after one path ends and before another path begins.

In okapi 3 you could use turnangle, as seen here at the end of mabl1:

I suspect it would still work in okapi 4 with the new turnraw.

also look at how paths are generated, used, and removed in that function.

2 Likes

So, with the path, isn’t the first point the starting point? Or will that always be 0,0,0? Also, before the brackets does it have to say Point for each point?

The example always uses 0,0,0 as the start. However, if you want to measure where you ended (from the last move) you can set the first point to that one. However, then you have the possibility of generating a negative value and you’d have to adjust for that. Also this means you cannot generate the next path while your are running the current path.

1 Like

What does the true do in profileControllerM.setTarget("D",true); ?

runs the path in reverse so the robot moves backwards. pathfinder cannot generate negative velocities so this was “their” solution.

1 Like

Thank you

you’re welcome. I added a video of one of the auton programs in mab that shows the use of different profile controllers. You’ll have do download it to view since github doesn’t like the 6mb size. its on the landing page for the OkapiLVGL example.

1 Like