fake_katana_joint_publisher.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import roslib; roslib.load_manifest('katana')
3 import rospy
4 from sensor_msgs.msg import JointState
5 
7  pub = rospy.Publisher('/joint_states', JointState, queue_size=100)
8  rospy.init_node('fake_katana_joint_publisher')
9  while not rospy.is_shutdown():
10  js = JointState()
11  js.header.stamp = rospy.Time.now()
12  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']
13  js.position = [-2.9641690268167444, 2.1288782921967493, -2.1556486321117725, -1.971949347057968, -2.9318804356548496, 0.28921755238530117, 0.28921755238530117]
14  js.velocity = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
15  pub.publish(js)
16  rospy.sleep(0.02)
17 if __name__ == '__main__':
18  try:
20  except rospy.ROSInterruptException: pass


katana
Author(s): Martin Günther
autogenerated on Fri Jan 3 2020 04:01:25