#!/usr/bin/env python import roslib; roslib.load_manifest('minipr2') import rospy import math from wiimote.msg import State from std_msgs.msg import Int64 from sensor_msgs.msg import JointState from logical import Cluster def callback(data, js): def wiijoyck(): rospy.init_node('wiijoyck') pub = rospy.Publisher('mpr2', JointState) js = JointState() js.name = ['l_shoulder_pan_joint', 'l_shoulder_tilt_joint','l_upper_arm_roll_joint','l_elbow_flex_joint','l_forearm_roll_joint','l_wrist_flex_joint'] # Sends wiimote/state state messages to the callback function rospy.Subscriber("wiimote/state", State, callback, js) rospy.spin() if __name__ == '__main__': try: wiijoyck() except rospy.ROSInterruptException: pass