00001 # joy_plugins.py 00002 00003 import rospy 00004 00005 class JSKJoyPlugin(): 00006 def __init__(self, name, args): 00007 self.name = name 00008 self.args = args 00009 def joyCB(self, status): 00010 # a callback function 00011 rospy.logerr("%s: no joyCB is overriden" % (self.name)) 00012 def enable(self): 00013 pass 00014 def disable(self): 00015 pass 00016 def getArg(self, key, default=None): 00017 if self.args.has_key(key): 00018 return self.args[key] 00019 else: 00020 return default