human_model.py 文件源码

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

项目:human_moveit_config 作者: baxter-flowers 项目源码 文件源码
def nearest_neighbour(self, fk_dict, scale_orient=40):
        def query_database(link, fk):
            x_vector = deepcopy(fk[0])
            if self.with_orient:
                x_vector += (np.array(fk[1]) / scale_orient).tolist()
            res = self.trees[link]['tree'].query(x_vector)
            joints = self.trees[link]['data']['data'][res[1]][:-7]
            joint_names = self.trees[link]['data']['names'][:-7]
            return joints.tolist(), joint_names.tolist()

        state = JointState()
        for key, value in fk_dict.iteritems():
            joints, joint_names = query_database(key, value)
            state.position += joints
            state.name += joint_names
        return state
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号