00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import roslib; roslib.load_manifest('sr_hand')
00019 *
00020 * Copyright 2011 Shadow Robot Company Ltd.
00021 *
00022 * This program is free software: you can redistribute it and/or modify it
00023 * under the terms of the GNU General Public License as published by the Free
00024 * Software Foundation, either version 2 of the License, or (at your option)
00025 * any later version.
00026 *
00027 * This program is distributed in the hope that it will be useful, but WITHOUT
00028 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00029 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00030 * more details.
00031 *
00032 * You should have received a copy of the GNU General Public License along
00033 * with this program. If not, see <http://www.gnu.org/licenses/>.
00034 *
00035 import rospy
00036
00037 import time
00038 import threading
00039
00040 from sr_robot_msgs.msg import sendupdate
00041
00042 class SRLibrary():
00043 """
00044 This is a python library used to easily access the shadow robot ROS interface.
00045 """
00046 def __init__(self):
00047 rospy.init_node('python_hand_library')
00048
00049 print "Creating new library"
00050 self.mutex = threading.Lock()
00051
00052 self.pub = rospy.Publisher('/sr_arm/sendupdate',sendupdate)
00053 threading.Thread(None, rospy.spin)
00054
00055 srl = SRLibrary()
00056 time.sleep(1.0)
00057
00058 print "exit"