Forum: PogamutUT2004

Collecting NavPoints?

During the path execution to a distant target I would like to store the individual navigation points that the bot passed into some list in order to try to optimilize the path by myself. But I cannot find any way how to make path executor return me a navpoint it is currently "exectuting". Any idea?

best wishes,
Lukas
This should be quite easy. Just store the path you are obtaining by path planner and giving to PathExecutor. Then in logic method you can check, between which navigation points in the path you are.
PathPlanner is returning this PathHandle type, which is the actual path.

Best,
Michal
Also you may set up a PathEventListener and listen for event types of PathEventType.PATH_ELEMENT_REACHED, that event is sent whenever the executor manage to navigate the bot to another path elemnt from the handle that is passed to it from the path planner.

Best,
Jimmy
Thanks. Works fine.