-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3eeee9
commit d3f0ba6
Showing
7 changed files
with
319 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
spot_rl_experiments/experiments/skill_test/test_semantic_gaze.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) Meta Platforms, Inc. and its affiliates. | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
|
||
import numpy as np | ||
from spot_rl.envs.skill_manager import SpotSkillManager | ||
|
||
if __name__ == "__main__": | ||
from perception_and_utils.utils.generic_utils import map_user_input_to_boolean | ||
|
||
spotskillmanager = SpotSkillManager(use_mobile_pick=True) | ||
contnue = True | ||
while contnue: | ||
spotskillmanager.semanticpick("penguin", "topdown") | ||
spotskillmanager.spot.open_gripper() | ||
contnue = map_user_input_to_boolean("Do you want to do it again ? Y/N ") | ||
|
||
# Navigate to dock and shutdown | ||
spotskillmanager.dock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Define the model class name | ||
MODEL_CLASS_NAME : "habitat_baselines.rl.ddppo.policy.resnet_policy.PointNavResNetPolicy" | ||
# Define the observation dict | ||
OBSERVATIONS_DICT: | ||
arm_depth_bbox_sensor: [[240, 228, 1], 'np.finfo(np.float32).min', 'np.finfo(np.float32).max', 'np.float32'] | ||
articulated_agent_arm_depth: [[240, 228, 1], '0.0', '1.0', 'np.float32'] | ||
topdown_or_side_grasping: [[1,], 'np.finfo(np.float32).min', 'np.finfo(np.float32).max', 'np.float32'] | ||
joint: [[4,], 'np.finfo(np.float32).min', 'np.finfo(np.float32).max', 'np.float32'] | ||
# Define the action space output length | ||
ACTION_SPACE_LENGTH: 7 | ||
# The path to load and save the models | ||
TARGET_HAB3_POLICY_PATH: "../weights/mobile_gaze_v2/mg97h103_15_ckpt.35.pth" | ||
OUTPUT_COMBINED_NET_SAVE_PATH: "../weights/mobile_gaze_v2/mg97h103_15_ckpt.35.torchscript" | ||
# If we want to use stereo pair camera for mobile gaze | ||
USE_STEREO_PAIR_CAMERA: False | ||
NEW_HABITAT_LAB_POLICY_OR_OLD: 'new' |