wake_up.py
Go to the documentation of this file.
00001 import roslib
00002 roslib.load_manifest('trigger_msgs')
00003 import sys
00004 import rospy
00005 
00006 import trigger_msgs.msg
00007 import dynamic_reconfigure.client
00008 import threading
00009 import time
00010 import geometry_msgs.msg as gm
00011 
00012 rospy.init_node("wake_up", anonymous=True)
00013 
00014 projector_on = {'camera_reset': False,
00015                 'forearm_l_rate': 30.0,
00016                 'forearm_l_trig_mode': 1,
00017                 'forearm_r_rate': 30.0,
00018                 'forearm_r_trig_mode': 1,
00019                 'narrow_stereo_trig_mode': 2,
00020                 'projector_mode': 3,
00021                 'projector_pulse_length': 0.002,
00022                 'projector_pulse_shift': 0.0,
00023                 'projector_rate': 58.823529411764703,
00024                 'projector_tweak': 0.0,
00025                 'prosilica_projector_inhibit': False,
00026                 'stereo_rate': 29.411764705882351,
00027                 'wide_stereo_trig_mode': 2}
00028 
00029 projector_off = {'camera_reset': False,
00030                     'forearm_l_rate': 30.0,
00031                     'forearm_l_trig_mode': 1,
00032                     'forearm_r_rate': 30.0,
00033                     'forearm_r_trig_mode': 1,
00034                     'narrow_stereo_trig_mode': 2,
00035                     'projector_mode': 1,
00036                     'projector_pulse_length': 0.002,
00037                     'projector_pulse_shift': 0.0,
00038                     'projector_rate': 58.823529411764703,
00039                     'projector_tweak': 0.0,
00040                     'prosilica_projector_inhibit': False,
00041                     'stereo_rate': 29.411764705882351,
00042                     'wide_stereo_trig_mode': 2}
00043 projector = dynamic_reconfigure.client.Client('camera_synchronizer_node')
00044 #move_base = rospy.Publisher('simple_move_base', gm.Pose2D)
00045 
00046 blink_time = .2
00047 
00048 print 'on'
00049 projector.update_configuration(projector_on)
00050 time.sleep(1)
00051 print 'off'
00052 projector.update_configuration(projector_off)
00053 time.sleep(blink_time)
00054 
00055 print 'on'
00056 projector.update_configuration(projector_on)
00057 time.sleep(blink_time)
00058 print 'off'
00059 projector.update_configuration(projector_off)
00060 time.sleep(blink_time)
00061 
00062 print 'on'
00063 projector.update_configuration(projector_on)
00064 time.sleep(blink_time)
00065 print 'off'
00066 projector.update_configuration(projector_off)
00067 time.sleep(1)
00068 
00069 print 'on'
00070 projector.update_configuration(projector_on)
00071 time.sleep(10)
00072 
00073 
00074 #p2d = gm.Pose2D()
00075 #p2d.x = .6
00076 #p2d.y = .15
00077 # move_base.publish(p2d)
00078 
00079 
00080 #r = rospy.Rate(60/60.)
00081 #projector_animation = ProjectorWakeUp()
00082 #projector_animation.start()
00083 #time.sleep(3)
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117         #time.sleep(blink_time)
00118         #self.projector.update_configuration(self.projector_off)
00119 
00120         #self.projector.update_configuration(self.projector_on)
00121         #time.sleep(.2)
00122 
00123         #self.projector.update_configuration(self.projector_off)
00124         #time.sleep(.05)
00125         #self.projector.update_configuration(self.projector_on)
00126         #time.sleep(.05)
00127 
00128         #self.projector.update_configuration(self.projector_off)
00129         #time.sleep(.05)
00130         #self.projector.update_configuration(self.projector_on)
00131         #time.sleep(.05)
00132 
00133         #self.projector.update_configuration(self.projector_off)
00134         #time.sleep(2)
00135         #self.projector.update_configuration(self.projector_on)
00136         #time.sleep(3)


hai_sandbox
Author(s): Hai Nguyen
autogenerated on Wed Nov 27 2013 11:46:56