Package com.pathplanner.lib.events
Class ScheduleCommandEvent
java.lang.Object
com.pathplanner.lib.events.Event
com.pathplanner.lib.events.ScheduleCommandEvent
Event that will schedule a command within the EventScheduler
-
Constructor Summary
ConstructorsConstructorDescriptionScheduleCommandEvent(double timestamp, Command command) Create an event to schedule a commandScheduleCommandEvent(Time timestamp, Command command) Create an event to schedule a command -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelEvent(EventScheduler eventScheduler) Cancel this event.copyWithTimestamp(double timestampSeconds) Copy this event with a different timestampvoidhandleEvent(EventScheduler eventScheduler) Handle this eventMethods inherited from class com.pathplanner.lib.events.Event
copyWithTimestamp, getTimestamp, getTimestampSeconds, setTimestamp, setTimestamp
-
Constructor Details
-
ScheduleCommandEvent
Create an event to schedule a command- Parameters:
timestamp- The trajectory timestamp for this eventcommand- The command to schedule
-
ScheduleCommandEvent
Create an event to schedule a command- Parameters:
timestamp- The trajectory timestamp for this eventcommand- The command to schedule
-
-
Method Details
-
handleEvent
Description copied from class:EventHandle this event- Specified by:
handleEventin classEvent- Parameters:
eventScheduler- Reference to the EventScheduler handling this event
-
cancelEvent
Description copied from class:EventCancel this event. This will be called if a path following command ends before this event gets handled.- Specified by:
cancelEventin classEvent- Parameters:
eventScheduler- Reference to the EventScheduler handling this event
-
copyWithTimestamp
Description copied from class:EventCopy this event with a different timestamp- Specified by:
copyWithTimestampin classEvent- Parameters:
timestampSeconds- The new timestamp- Returns:
- Copied event with new time
-