Public Member Functions | Public Attributes | Private Member Functions | List of all members
routine_behaviours.robot_routine.RobotRoutine Class Reference
Inheritance diagram for routine_behaviours.robot_routine.RobotRoutine:
Inheritance graph
[legend]

Public Member Functions

def __init__
 
def add_night_task (self, task)
 
def battery_ok (self)
 
def clear_then_charge (self, charge_duration)
 
def create_task_routine
 
def demand_charge (self, charge_duration)
 
def dynamic_reconfigure_cb (self, config, level)
 
def is_after_day_end (self, time)
 
def is_before_day_start (self, time)
 
def is_during_day (self, time)
 
def on_day_end (self)
 
def on_day_start (self)
 
def on_idle (self)
 
def start_routine (self)
 
def task_allowed_now (self, task)
 

Public Attributes

 add_tasks
 
 addition
 
 battery_count
 
 battery_count_thres
 
 battery_state
 
 charge_window
 
 charging_point
 
 clear_schedule
 
 daily_end
 
 daily_start
 
 demand_task
 
 force_charge_duration
 
 idle_charge_duration
 
 idle_count
 
 idle_thres
 
 maps_msg_store
 
 night_duration
 
 night_tasks
 
 recfg_sever
 
 routine
 
 runner
 
 sent_night_tasks
 
 sent_to_charge
 
 set_execution_status
 
 threshold
 

Private Member Functions

def _check_battery (self, battery_state)
 
def _check_idle (self, schedule)
 
def _create_services (self)
 
def _send_night_tasks (self)
 

Detailed Description

This class manages the over-arching routine behaviour of the robot. It monitors battery charge task level and can force charging when necessary and also generate tasks when the robot is idle. 

Definition at line 24 of file robot_routine.py.

Constructor & Destructor Documentation

def routine_behaviours.robot_routine.RobotRoutine.__init__ (   self,
  daily_start,
  daily_end,
  idle_duration,
  charging_point = 'ChargingPoint' 
)
Args:
    daily_start (datetime.time): The time of day the routine should start.
    daily_end (datetime.time): The time of day the routine should end.
    idle_duration (rospy.Duration): How long to be idle before triggering on_idle.
    charging_point: Where to head to when charge is low

Definition at line 27 of file robot_routine.py.

Member Function Documentation

def routine_behaviours.robot_routine.RobotRoutine._check_battery (   self,
  battery_state 
)
private

Definition at line 218 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine._check_idle (   self,
  schedule 
)
private

Definition at line 155 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine._create_services (   self)
private

Definition at line 262 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine._send_night_tasks (   self)
private

Definition at line 246 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.add_night_task (   self,
  task 
)
Add a task to be executed after the routine ends. These tasks cannot involve movement and therefore must either have an empty start_node_id or be performed at the charging station.

Definition at line 117 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.battery_ok (   self)
Reports false if battery is below force_charge_threshold or if it is above it but within force_charge_addition of the threshold and charging 

Definition at line 198 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.clear_then_charge (   self,
  charge_duration 
)
Clears the schedule of the robot before demanding a charge task. 

Definition at line 296 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.create_task_routine (   self,
  tasks,
  daily_start = None,
  daily_end = None,
  repeat_delta = None 
)
    Create routine behaviour from given tasks using provided parameter. 

    This largely passes arguments on to similar arguments in task_routine.repeat_every_delta, but constrains repeats to the bounds of the this routine.

    If daily start or end not supplied use routine start or end
    If delta not supplied, just do once during the start to end window

Definition at line 340 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.demand_charge (   self,
  charge_duration 
)
Create an on-demand task to charge the robot for the given duration.

Definition at line 286 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.dynamic_reconfigure_cb (   self,
  config,
  level 
)

Definition at line 110 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.is_after_day_end (   self,
  time 
)
Check if the given time is after the end of the routine.

Definition at line 139 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.is_before_day_start (   self,
  time 
)
Check if the given time is before the start of the routine.

Definition at line 130 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.is_during_day (   self,
  time 
)
Check if the given time is during the routine.

Definition at line 148 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.on_day_end (   self)
Triggered when the routine ends for the day.

This clears tasks and triggers an on-demand charge.

Definition at line 307 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.on_day_start (   self)
Triggered when the routine starts for the day.

Definition at line 319 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.on_idle (   self)
    Called when the routine is idle. Default is to trigger travel to the charging. As idleness is determined by the current schedule, if this call doesn't utlimately cause a task schedule to be generated this will be called repeatedly.

Definition at line 332 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.start_routine (   self)
Starts the routine running. Must be called to generate behaviour.

Definition at line 326 of file robot_routine.py.

def routine_behaviours.robot_routine.RobotRoutine.task_allowed_now (   self,
  task 
)
Return true if a task can be send to the task_executor now.


This checks if battery level is fine and that the robot is not at the charging point. Subclasses can override this to provide additional checks.

Definition at line 100 of file robot_routine.py.

Member Data Documentation

routine_behaviours.robot_routine.RobotRoutine.add_tasks

Definition at line 271 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.addition

Definition at line 114 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.battery_count

Definition at line 45 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.battery_count_thres

Definition at line 47 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.battery_state

Definition at line 48 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.charge_window

Definition at line 78 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.charging_point

Definition at line 38 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.clear_schedule

Definition at line 274 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.daily_end

Definition at line 37 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.daily_start

Definition at line 36 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.demand_task

Definition at line 273 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.force_charge_duration

Definition at line 50 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.idle_charge_duration

Definition at line 81 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.idle_count

Definition at line 83 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.idle_thres

Definition at line 90 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.maps_msg_store

Definition at line 275 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.night_duration

Definition at line 73 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.night_tasks

Definition at line 52 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.recfg_sever

Definition at line 42 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.routine

Definition at line 61 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.runner

Definition at line 63 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.sent_night_tasks

Definition at line 51 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.sent_to_charge

Definition at line 92 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.set_execution_status

Definition at line 272 of file robot_routine.py.

routine_behaviours.robot_routine.RobotRoutine.threshold

Definition at line 113 of file robot_routine.py.


The documentation for this class was generated from the following file:


routine_behaviours
Author(s): Nick Hawes
autogenerated on Tue Mar 17 2015 21:43:31