job_manager ROS node

The Job Manager takes in orders from the Fleet Manager Front and appends them to a order list.

Every second the Job Manager then checks this Order List and builds Jobs with Tasks from the orders, sorting them based on priority and placing them in the Pending Job list.

Every few seconds the Job Manager will check this Pending Job list and pick the first Pending Job (highest priority first, then within priotity First In First Out). It then allocates this Job to an available (and if local is applicable; closest) MEx, passing the Job on to the Active Jobs list.

Active Jobs keep track of their own Tasks and updates the Mobile Executor (MEx) on the MEx Sentinel. Upon Job completion (succes, cancel, abort) the Job is removed from the Active Jobs list and the MEx is freed and set to STANDBY in the MEx Sentinel.

The Job Manager provides callable services locally for

job_manager script

Job Manager:

The Job Manager ROS Node acts as the order processor and manager of (active and pending) Jobs. It takes in Orders from the Fleet Manager Front (GUI) and appends these on an order list. It processes orders into Jobs with Tasks and a priority value, starting with CRITICAL followed by HIGH, MEDIUM and finally LOW. Jobs with equal priority are sorted based on First In First Out. It queries the MEx Sentinel for available Mobile Executors (MEx) and allocates and refines Jobs. Active Jobs keep track of their own progress and trigger callbacks upon finalisation.

Note: See also the documentation below for a more detailed description.

job_manager.get_active_jobs_service_cb(request)[source]

GetActiveJobs service callback function. Takes in a empty request. Returns a response with a list of all Active Jobs and all basic information.

job_manager.get_job_info_service_cb(request)[source]

GetJobInfo service callback function. Takes in a request with a Job ID. Returns a response with all information on the Job matching the call ID, including a list of the Job’s Tasks.

job_manager.get_pending_jobs_service_cb(request)[source]

GetPendingJobs service callback function. Takes in a empty request. Returns a response with a list of all Pending Jobs and some basic information.

job_manager.job_allocator_timer_cb(event)[source]

Job allocator timer callback function. Calls job allocator function.

job_manager.job_completion_cb(job_id, mex_id)[source]

Job completion callback function, gets called when a Jobs is finished (succesful, cancel, error or abort). It is attached to a Job in the job_builder function.

job_manager.order_list_timer_cb(event)[source]

Order list timer callback function. Calls process_order_list function.

job_manager.order_service_cb(request)[source]

PlaceOrder service callback function. Takes in a PlaceOrderRequest request with a order keyword, priority and arguments. Processes these and adds the processed order in list form to the order_list. Returns a PlaceOrderResponse response with information on if the call failed and why.

job_manager.process_order_list()[source]

Build jobs from all orders in the order_list by calling the job_builder function, then clear the order_list.