Skip to content

Commit

Permalink
fix breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
naokiyokoyamabd committed Aug 30, 2023
1 parent ef3ae41 commit 584c922
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/experiments/llm_objectnav_hm3d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ habitat_baselines:
evaluate: True
eval_ckpt_path_dir: dummy_policy.pth
num_environments: 1
load_resume_state_config: False

torch_gpu_id: 0
tensorboard_dir: "tb"
Expand Down
2 changes: 1 addition & 1 deletion scripts/launch_vlm_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export OS_PYTHON=${OS_PYTHON:-`which python`}
export MOBILE_SAM_CHECKPOINT=${MOBILE_SAM_CHECKPOINT:-data/mobile_sam.pt}
export GROUNDING_DINO_CONFIG=${GROUNDING_DINO_CONFIG:-GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py}
export GROUNDING_DINO_WEIGHTS=${GROUNDING_DINO_WEIGHTS:-data/groundingdino_swint_ogc.pth}

export CLASSES_PATH=${CLASSES_PATH:-zsos/vlm/classes.txt}

# Create a detached tmux session
tmux new-session -d -s vlm_servers
Expand Down
4 changes: 3 additions & 1 deletion zsos/policy/habitat_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def _cache_observations(
depth = filter_depth(depth.reshape(depth.shape[:2]), blur_type=None)
# Habitat GPS makes west negative, so flip y
camera_position = np.array([x, -y, self._camera_height])
robot_xy = camera_position[:2]
tf_camera_to_episodic = xyz_yaw_to_tf_matrix(camera_position, camera_yaw)

self._obstacle_map: ObstacleMap
Expand All @@ -157,6 +158,7 @@ def _cache_observations(
self._fx,
self._fy,
self._camera_fov,
robot_xy,
)
frontiers = self._obstacle_map.frontiers
else:
Expand All @@ -168,7 +170,7 @@ def _cache_observations(
self._observations_cache = {
"frontier_sensor": frontiers,
"nav_depth": observations["depth"], # for pointnav
"robot_xy": camera_position[:2],
"robot_xy": robot_xy,
"robot_heading": camera_yaw,
"object_map_rgbd": [
(
Expand Down
82 changes: 82 additions & 0 deletions zsos/vlm/coco_classes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
COCO_CLASSES = [
"person",
"bicycle",
"car",
"motorcycle",
"airplane",
"bus",
"train",
"truck",
"boat",
"traffic",
"fire",
"stop",
"parking",
"bench",
"bird",
"cat",
"dog",
"horse",
"sheep",
"cow",
"elephant",
"bear",
"zebra",
"giraffe",
"backpack",
"umbrella",
"handbag",
"tie",
"suitcase",
"frisbee",
"skis",
"snowboard",
"sports",
"kite",
"baseball",
"baseball",
"skateboard",
"surfboard",
"tennis",
"bottle",
"wine",
"cup",
"fork",
"knife",
"spoon",
"bowl",
"banana",
"apple",
"sandwich",
"orange",
"broccoli",
"carrot",
"hot",
"pizza",
"donut",
"cake",
"chair",
"couch",
"potted",
"bed",
"dining",
"toilet",
"tv",
"laptop",
"mouse",
"remote",
"keyboard",
"cell",
"microwave",
"oven",
"toaster",
"sink",
"refrigerator",
"book",
"clock",
"vase",
"scissors",
"teddy",
"hair",
"toothbrush",
]

0 comments on commit 584c922

Please sign in to comment.