Go to the documentation of this file.00001
00002 import roslib; roslib.load_manifest('katana')
00003 import rospy
00004 from sensor_msgs.msg import JointState
00005
00006 def fake_katana_joint_publisher():
00007 pub = rospy.Publisher('/joint_states', JointState, queue_size=100)
00008 rospy.init_node('fake_katana_joint_publisher')
00009 while not rospy.is_shutdown():
00010 js = JointState()
00011 js.header.stamp = rospy.Time.now()
00012 js.name = ['katana_motor1_pan_joint', 'katana_motor2_lift_joint', 'katana_motor3_lift_joint', 'katana_motor4_lift_joint', 'katana_motor5_wrist_roll_joint', 'katana_r_finger_joint', 'katana_l_finger_joint']
00013 js.position = [-2.9641690268167444, 2.1288782921967493, -2.1556486321117725, -1.971949347057968, -2.9318804356548496, 0.28921755238530117, 0.28921755238530117]
00014 js.velocity = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
00015 pub.publish(js)
00016 rospy.sleep(0.02)
00017 if __name__ == '__main__':
00018 try:
00019 fake_katana_joint_publisher()
00020 except rospy.ROSInterruptException: pass