mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-11 15:32:42 +02:00
Doors now Working,
Pypi install adjustments.
This commit is contained in:
@ -3,12 +3,12 @@ import sys
|
||||
from pathlib import Path
|
||||
from collections import deque
|
||||
from itertools import product
|
||||
|
||||
import numpy as np
|
||||
import pygame
|
||||
from typing import Tuple, Union
|
||||
import time
|
||||
|
||||
import torch
|
||||
|
||||
from environment.utils.render import RenderEntity
|
||||
|
||||
AGENT: str = 'agent'
|
||||
@ -133,7 +133,8 @@ class Renderer:
|
||||
pygame.display.flip()
|
||||
self.clock.tick(self.fps)
|
||||
rgb_obs = pygame.surfarray.array3d(self.screen)
|
||||
return torch.from_numpy(rgb_obs).permute(2, 0, 1)
|
||||
return np.transpose(rgb_obs, (2, 0, 1))
|
||||
# return torch.from_numpy(rgb_obs).permute(2, 0, 1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Reference in New Issue
Block a user