patroller_routine_node.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 
5 from datetime import time, date
6 from dateutil.tz import tzlocal
7 
8 from routine_behaviours.patrol_routine import PatrolRoutine
9 
10 
11 if __name__ == '__main__':
12  rospy.init_node("patroller_routine")
13 
14  # start and end times -- all times should be in local timezone
15  localtz = tzlocal()
16  start = time(8,30, tzinfo=localtz)
17  end = time(0,37, tzinfo=localtz)
18 
19  # how long to stand idle before doing something
20  idle_duration=rospy.Duration(20)
21 
22  # how long you think it will take to do a complete tour. overestimate is better than under
23  # tour_duration_estimate = rospy.Duration(60 * 40 * 2)
24 
25 # for dummy testing
26  tour_duration_estimate = rospy.Duration(60)
27 
28  routine = PatrolRoutine(daily_start=start, daily_end=end,
29  idle_duration=idle_duration, tour_duration_estimate=tour_duration_estimate)
30 
31  # set tasks and start execution
32  routine.create_routine()
33  routine.start_routine()
34 
35  rospy.spin()


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