Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00024
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
00037
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
00041
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