Skip to content

Performance

nab138 edited this page Apr 1, 2024 · 2 revisions

Oxplorer is designed to be as real time as possible. It is designed to be run every loop, in some cases. However, this does sometimes cause loop overruns, and optimizations are in-progress to address this.

If you find Oxplorer is consistently having loop overruns and can't wait for the fixes, one quick solution could be to disable corner cutting. This halves the size of the visibility graph, making it more efficient, but does come at the cost of the robot taking wider corners (especially around acute angles).

To do this, you can set the CornerCutting to none on the PathfinderBuilder, like so:

Pathfinder pathfinder = new PathfinderBuilder(Field.CRESCENDO_2024)
    /* Your configuration here */
    .setCornerCuttingType(CornerCutting.NONE)
    .build();

Additionally, it may be beneficial to see where you could reuse an old path instead of generating a new one, to reduce the number of times Oxplorer is being used.

Clone this wiki locally