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
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
00075
00076
00077
00078
00079
00080
00081
00082
00083
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
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136