Skip to content

Commit

Permalink
WORKING
Browse files Browse the repository at this point in the history
  • Loading branch information
PrieureDeSion committed Oct 17, 2023
1 parent 2dcb7f9 commit b5aa711
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions projects/scannet_offline_eval/demo/components/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@

# from dash_extensions.websockets import SocketPool, run_server
from dash_extensions.enrich import BlockingCallbackTransform, DashProxy
from home_robot.core.interfaces import Observations
from home_robot.mapping.voxel.voxel import SparseVoxelMap
from home_robot.utils.point_cloud_torch import get_bounds
from loguru import logger
from matplotlib import pyplot as plt
from pytorch3d.vis.plotly_vis import get_camera_wireframe
from torch_geometric.nn.pool.voxel_grid import voxel_grid

from home_robot.core.interfaces import Observations
from home_robot.mapping.voxel.voxel import SparseVoxelMap
from home_robot.utils.point_cloud_torch import get_bounds

from .directory_watcher import DirectoryWatcher, get_most_recent_viz_directory

HARD_CODE_RESPONSES = False
Expand Down Expand Up @@ -139,7 +140,7 @@ def add_obs(self, obs) -> bool:
if isinstance(obs["obs"].camera_pose, np.ndarray)
else obs["obs"].camera_pose.float()
)
else:
elif "limited_obs" not in obs:
logger.warning("No limited obs in obs")

# TODO: REMOVE
Expand Down Expand Up @@ -184,7 +185,7 @@ def add_obs(self, obs) -> bool:
if obs["target_id"] is not None:
self.target_instance_id = obs["target_id"]
# Update map
if "obstacles" in obs and obs["obstacles"]:
if "obstacles" in obs:
rgb_ten = (torch.flip(obs["obstacles"], dims=(0, 1)) > 0) * 255
rgb_ten = rgb_ten[256:-256, 256:-256]
self.map_im = cv2.imencode(
Expand Down

0 comments on commit b5aa711

Please sign in to comment.