I am a little confused about the path planner with event markers example on the path planner docs:
// This will load the file "Example Path.path" and generate it with a max velocity of 4 m/s and a max acceleration of 3 m/s^2
PathPlannerTrajectory examplePath = PathPlanner.loadPath("Example Path", new PathConstrains(4, 3));
// This is just an example event map. It would be better to have a constant, global event map
// in your code that will be used by all path following commands.
HashMap<String, Command> eventMap = new HashMap<>();
eventMap.put("marker1", new PrintCommand("Passed marker 1"));
eventMap.put("intakeDown", new IntakeDown());
FollowPathWithEvents command = new FollowPathWithEvents(
getPathFollowingCommand(examplePath),
examplePath.getMarkers(),
eventMap
);
I can see that the example adds an event to drop the intake and another event to print something but how does the path know where to put the markers along the path. How can I specify when to trigger the event?