vrep_env.py 文件源码

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

项目:vrep-env 作者: ycps 项目源码 文件源码
def obj_get_vision_image(self, handle):
        resolution, image = self.RAPI_rc(vrep.simxGetVisionSensorImage( self.cID,handle,
            0, # assume RGB
            vrep.simx_opmode_blocking,
        ))
        dim, im = resolution, image
        nim = np.array(im, dtype='uint8')
        nim = np.reshape(nim, (dim[1], dim[0], 3))
        nim = np.flip(nim, 0)  # horizontal flip
        #nim = np.flip(nim, 2)  # RGB -> BGR
        return nim

    # "setters"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号