Mission Scheduler API
The Mission Scheduler API provides a ROS interface for creating, deleting, editing, and executing missions on a daily schedule. Schedules are stored in a database-like structure on-disk, and can be executed manually or automatically.
The web UI is the primary method of creating and modifying schedules, though the ROS API is available should you wish to write your own interface or create automation tools to interact with the scheduler.
The Schedule Object
A schedule consists of one or more missions to be executed in the specified order at a particular start time. For consistency the start time is expressed as a 24-hour time in UTC.
The schedule must be in one of 3 modes:
MODE_ONCE
-- the mission is executed exactly once per day, at the indicted UTC timeMODE_LOOP
-- the mission is executed a set number of times per day, starting at the indicated UTC time and repeating at fixed intervals until the desired number of repetitions is reachedMODE_TRANSIENT
-- the mission is run exactly once, and is not saved to the persistent storage. This is intended to be used for deferred execution of a mission (e.g.execute mission X in 5 minutes
would use a transient schedule)
Deleting a mission from the Mission Manager will result in that mission being automatically removed from any schedules it was part of. If a schedule has no missions it is automatically disabled, and cannot be re-enabled until it contains at least one mission.
A Note on Schedule Timing
Automatically-scheduled missions are executed at the provided time +/- 10 seconds. The duration provided by the
next_schedule
topic and get_next_schedule
service is therefore approximate. We recommend rounding the time to the
nearest minute when displaying the countdown information to the user in any sort of GUI.
Topics Exported by Mission Scheduler
mission_scheduler/next_schedule
Message Type: cpr_mission_scheduler_msgs/msg/NextSchedule
Description: Publishes the UUID and duration to the next scheduled mission. If no missions are scheduled the UUID will be blank.
Update Rate: 1Hz