test_show.py 文件源码

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

项目:AS_6Dof_Arm 作者: yao62995 项目源码 文件源码
def set_cube_pose(self, name, pose, orient=None):
        """
        :param name: cube name, a string
        :param pose: cube position, a list of three float, [x, y, z]
        :param orient: cube orientation, a list of three float, [ix, iy, iz]
        :return:
        """
        self.cubes_pose.link_name = "cubes::" + name
        p = self.cubes_pose.pose
        p.position.x = pose[0] + 0.18
        p.position.y = pose[1]
        p.position.z = pose[2] - 0.05
        if orient is None:
            orient = [0, 0, 0]
        q = quaternion_from_euler(orient[0], orient[1], orient[2])
        p.orientation = Quaternion(*q)
        self.pose_pub.publish(self.cubes_pose)


# create cube
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号