Go to the documentation of this file.00001
00002
00003 import rospy
00004
00005 try:
00006 import joy_mouse.xinput
00007 except:
00008 import roslib; roslib.load_manifest("joy_mouse")
00009 import joy_mouse.xinput
00010
00011 import joy_mouse.joy
00012
00013 if __name__ == "__main__":
00014 rospy.init_node("enabale_mouse")
00015 argv = rospy.myargv()
00016 if "--name" == argv[1]:
00017 dev = joy_mouse.joy.lookupDeviceFileByNameAttribute(argv[2])
00018 else:
00019 dev = argv[1]
00020 joy_mouse.xinput.enableDeviceByRegexp(dev)