def __init__(self, server):
self.server = server
self.mutex = Lock()
# Publisher to send commands
self.pub_command = rospy.Publisher("/motion_planning_goal", geometry_msgs.msg.Transform,
queue_size=1)
self.listener = tf.TransformListener()
# Subscribes to information about what the current joint values are.
rospy.Subscriber("/joint_states", sensor_msgs.msg.JointState,
self.joint_states_callback)
# Publisher to set robot position
self.pub_reset = rospy.Publisher("/joint_command", JointState, queue_size=1)
rospy.sleep(0.5)
# Wait for validity check service
rospy.wait_for_service("check_state_validity")
self.state_valid_service = rospy.ServiceProxy('check_state_validity',
moveit_msgs.srv.GetStateValidity)
self.reset_robot()
评论列表
文章目录