def joint_angle_client(angle_set):
"""Send a joint angle goal to the action server."""
action_address = '/j2n6s300_driver/joints_action/joint_angles'
client = actionlib.SimpleActionClient(action_address,
kinova_msgs.msg.ArmJointAnglesAction)
client.wait_for_server()
goal = kinova_msgs.msg.ArmJointAnglesGoal()
goal.angles.joint1 = angle_set[0]
goal.angles.joint2 = angle_set[1]
goal.angles.joint3 = angle_set[2]
goal.angles.joint4 = angle_set[3]
goal.angles.joint5 = angle_set[4]
goal.angles.joint6 = angle_set[5]
goal.angles.joint7 = angle_set[6]
client.send_goal(goal)
if client.wait_for_result(rospy.Duration(20.0)):
return client.get_result()
else:
print(' the joint angle action timed-out')
client.cancel_all_goals()
return None
joints_action_client.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录