pr2_ears_server.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 # Merges functionality from ros_M5e in hrl_rfid package.
00004 #     if opt.device == 'ears':
00005 #         print 'Starting Ears RFID Services'
00006 #         ros_rfid = ROS_M5e( name = 'ears', readPwr = opt.power,
00007 #                             portStr = '/dev/robot/RFIDreader',
00008 #                             antFuncs = [EleLeftEar, EleRightEar],
00009 #                             callbacks = [] )
00010 #         rospy.spin()
00011 #         ros_rfid.stop()
00012 
00013 
00014 import roslib
00015 roslib.load_manifest( 'robotis' )
00016 roslib.load_manifest( 'hrl_rfid' )
00017 roslib.load_manifest( 'rfid_people_following' )
00018 import rospy
00019 
00020 import time
00021 from threading import Thread
00022 
00023 # The Servers need to distinguish b/w real vs. simulated!
00024 #   They implement same services / functions. (Clients unaffected)
00025 import os
00026 if os.environ.has_key('ROBOT') and os.environ['ROBOT'] == 'sim':
00027     import rfid_people_following.robotis_servo_sim as rr
00028     import rfid_people_following.M5e_reader_sim as rM5e
00029     
00030 else:
00031     import robotis.ros_robotis as rr
00032     import hrl_rfid.ros_M5e as rM5e
00033 
00034 
00035 if __name__ == '__main__':
00036 #     p_right = rr.ROS_Robotis_Poller( '/dev/robot/servo1', [29,30], ['right_pan', 'right_tilt'] )
00037 #     p_left = rr.ROS_Robotis_Poller( '/dev/robot/servo0', [27,28], ['left_pan', 'left_tilt'] )
00038     p_right = rr.ROS_Robotis_Poller( '/dev/robot/servo1', [29,30], ['right_pan', 'right_tilt'] )
00039     p_left = rr.ROS_Robotis_Poller( '/dev/robot/servo0', [27,28], ['left_pan', 'left_tilt'] )
00040 #     p_right = rr.ROS_Robotis_Poller( '/dev/robot/servo0', [29,30], ['right_pan', 'right_tilt'] )
00041 #     p_left = rr.ROS_Robotis_Poller( '/dev/robot/servo1', [27,28], ['left_pan', 'left_tilt'] )
00042     ros_rfid = rM5e.ROS_M5e( name = 'ears', readPwr = 3000,
00043                              portStr = '/dev/robot/RFIDreader',
00044                              antFuncs = [ rM5e.EleLeftEar, rM5e.EleRightEar ],
00045                              callbacks = [] )
00046     rospy.spin()
00047     
00048     ros_rfid.stop()
00049     p_right.stop()
00050     p_left.stop()
00051 


rfid_people_following
Author(s): Travis Deyle (Healthcare Robotics Lab, Georgia Tech)
autogenerated on Wed Nov 27 2013 11:38:30