jaco.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:cu-perception-manipulation-stack 作者: correlllab 项目源码 文件源码
def set_position(self, position):
        """Accept position from 0 (open) to 100 (closed)."""
        position_turns = self.parse_percent_to_turn(position)
        goal = kinova_msgs.msg.SetFingersPositionGoal()
        goal.fingers.finger1 = float(position_turns[0])
        goal.fingers.finger2 = float(position_turns[1])
        if len(position)==3:
            goal.fingers.finger3 = float(position_turns[2])
        else:
            goal.fingers.finger3 = 0.0

        self.client.send_goal(goal)

        if self.client.wait_for_result(rospy.Duration(5.0)):
            return self.client.get_result()
        else:
            self.client.cancel_all_goals()
            rospy.logwarn('        the gripper action timed-out')
            return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号