hyin-ustc commited on
Commit
8a6dafc
·
verified ·
1 Parent(s): babd800

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. world-in-world/src/habitat-baselines/habitat-lab/MANIFEST.in +6 -0
  2. world-in-world/src/habitat-baselines/habitat-lab/habitat/__init__.py +19 -0
  3. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/CONFIG_KEYS.md +182 -0
  4. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/README.md +497 -0
  5. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/__init__.py +11 -0
  6. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/default.py +140 -0
  7. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/default_structured_configs.py +2675 -0
  8. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/eqa/mp3d.yaml +11 -0
  9. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/imagenav/gibson.yaml +9 -0
  10. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/imagenav/mp3d.yaml +9 -0
  11. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/instance_imagenav/hm3d_v1.yaml +9 -0
  12. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/instance_imagenav/hm3d_v2.yaml +9 -0
  13. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/hm3d.yaml +8 -0
  14. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/hssd-hab.yaml +9 -0
  15. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/mp3d.yaml +8 -0
  16. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/procthor-hab.yaml +9 -0
  17. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/gibson.yaml +9 -0
  18. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/gibson_0_plus.yaml +9 -0
  19. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/gibson_v2.yaml +9 -0
  20. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/habitat_test.yaml +9 -0
  21. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/hm3d.yaml +9 -0
  22. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/mp3d.yaml +9 -0
  23. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/rearrangement/hssd.yaml +10 -0
  24. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/rearrangement/replica_cad.yaml +10 -0
  25. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/vln/mp3d_r2r.yaml +10 -0
  26. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/simulator/rearrange_sim.yaml +10 -0
  27. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/simulator/sensor_setups/rgbd_head_agent.yaml +5 -0
  28. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/eqa.yaml +16 -0
  29. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/imagenav.yaml +21 -0
  30. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/instance_imagenav.yaml +39 -0
  31. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/objectnav.yaml +41 -0
  32. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/pointnav.yaml +21 -0
  33. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/pointnav_franka.yaml +17 -0
  34. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm.yaml +7 -0
  35. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm_base.yaml +8 -0
  36. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm_base_empty.yaml +10 -0
  37. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm_base_stop.yaml +9 -0
  38. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_base_stop.yaml +6 -0
  39. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/spot_base_arm_empty.yaml +26 -0
  40. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/stretch_base_arm_empty.yaml +18 -0
  41. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/prepare_groceries.yaml +83 -0
  42. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/rearrange.yaml +23 -0
  43. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/rearrange_easy.yaml +29 -0
  44. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/set_table.yaml +59 -0
  45. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/tidy_house.yaml +118 -0
  46. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/tidy_house_2obj.yaml +45 -0
  47. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/vln_r2r.yaml +17 -0
  48. world-in-world/src/habitat-baselines/habitat-lab/habitat/config/read_write.py +29 -0
  49. world-in-world/src/habitat-baselines/habitat-lab/habitat/py.typed +1 -0
  50. world-in-world/src/habitat-baselines/habitat-lab/habitat/version.py +7 -0
world-in-world/src/habitat-baselines/habitat-lab/MANIFEST.in ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ graft habitat/config
2
+ graft habitat/utils/visualizations/assets
3
+ graft habitat/tasks/rearrange/multi_task/domain_configs
4
+ graft habitat/datasets/rearrange/configs
5
+ include habitat/py.typed
6
+ include requirements.txt
world-in-world/src/habitat-baselines/habitat-lab/habitat/__init__.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ # Copyright (c) Meta Platforms, Inc. and its affiliates.
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ from habitat.config import get_config, read_write
8
+ from habitat.core.agent import Agent
9
+ from habitat.core.benchmark import Benchmark
10
+ from habitat.core.challenge import Challenge
11
+ from habitat.core.dataset import Dataset
12
+ from habitat.core.embodied_task import EmbodiedTask, Measure, Measurements
13
+ from habitat.core.env import Env, RLEnv
14
+ from habitat.core.logging import logger
15
+ from habitat.core.registry import registry # noqa: F401
16
+ from habitat.core.simulator import Sensor, SensorSuite, SensorTypes, Simulator
17
+ from habitat.core.vector_env import ThreadedVectorEnv, VectorEnv
18
+ from habitat.datasets import make_dataset
19
+ from habitat.version import VERSION as __version__ # noqa: F401
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/CONFIG_KEYS.md ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configuration Keys
2
+
3
+ ## Dataset
4
+ Configuration for the dataset of the task.
5
+ A dataset consists of episodes
6
+ (a start configuration for a task within a scene) and a scene dataset
7
+ (with all the assets needed to instantiate the task).
8
+ For a list of all the available datasets, see [this page](../../../DATASETS.md).
9
+
10
+ | Key | Description |
11
+ | --- | --- |
12
+ | habitat.dataset.type | The key for the dataset class that will be used. Examples of such keys are `PointNav-v1`, `ObjectNav-v1`, `InstanceImageNav-v1` or `RearrangeDataset-v0`. Different datasets have different properties so you should use the dataset that fits your task. |
13
+ | habitat.dataset.scene_dir | The path to the directory containing the scenes that will be used. You should put all your scenes in the same folder (example `data/scene_datasets`) to avoid having to change it. |
14
+ |habitat.dataset.data_path | The path to the episode dataset. Episodes need to be compatible with the `type` argument (so they will load properly) and only use scenes that are present in the `scenes_dir`.|
15
+ |habitat.dataset.split | `data_path` can have a `split` in the path. For example: "data/datasets/pointnav/habitat-test-scenes/v1/{split}/{split}.json.gz" the value in "{split}" will be replaced by the value of the `split` argument. This allows to easily swap between training, validation and test episodes by only changing the split argument. |
16
+
17
+ ## Task
18
+ The definition of the task in Habitat.
19
+ There are many different Tasks determined by the `habitat.task.type` config:
20
+ - Point navigation : `Nav-0` The agent needs to navigate to a geometric goal position.
21
+ - Image navigation : `Nav-0` The agent needs to navigate to an object matching the type shown in a goal image.
22
+ - Instance image navigation:`InstanceImageNav-v1` The agent needs to navigate to an object matching the type shown in a goal image that is sampled from the current scene.
23
+ - Object navigation : `ObjectNav-v1` The agent needs to navigate to a specific type of object in the scene indicated by a categorical value.
24
+ - Rearrangement close drawer: `RearrangeCloseDrawerTask-v0` The agent must close the kitchen drawer in the scene.
25
+ - Rearrangement open drawer: `RearrangeOpenDrawerTask-v0` The agent must open the kitchen drawer in the scene.
26
+ - Rearrangement close fridge : `RearrangeCloseFridgeTask-v0` The agent must close the kitchen fridge in the scene.
27
+ - Rearrangement open fridge : `RearrangeOpenFridgeTask-v0` The agent must open the kitchen fridge in the scene.
28
+ - Rearrangement navigate to object : `NavToObjTask-v0` The agent must navigate to an object located at a known geometric position in the scene.
29
+ - Rearrangement pick : `RearrangePickTask-v0` The agent must pick up a specific object in the scene from given the object's geometric coordinates.
30
+ - Rearrangement place : `RearrangePlaceTask-v0` The agent must place a grasped object at a geometric set of coordinates.
31
+ - Rearrangement do nothing : `RearrangeEmptyTask-v0` The agent does not have to do anything. Useful for debugging.
32
+ - Rearrangement reach : `RearrangeReachTask-v0` The agent must place its end effector into a specific location defined by geometric coordinates.
33
+ - Rearrangement composite tasks : `RearrangePddlTask-v0` The agent must perform a sequence of sub-tasks in succession defined by a PDDL plan.
34
+
35
+
36
+ | Key | Description |
37
+ | --- | --- |
38
+ |habitat.task.type | The registered task that will be used. For example : `InstanceImageNav-v1` or `ObjectNav-v1`.
39
+ |habitat.task.physics_target_sps | The size of each simulator physics update will be 1 / physics_target_sps. |
40
+ |habitat.task.reward_measure | The name of the Measurement that will correspond to the reward of the robot. This value must be a key present in the dictionary of Measurements in the habitat configuration (under `habitat.task.measurements`, see below for a list of available measurements). For example, `distance_to_goal_reward` for navigation or `place_reward` for the rearrangement place task.|
41
+ |habitat.task.success_measure | The name of the Measurement that will correspond to the success criteria of the robot. This value must be a key present in the dictionary of Measurements in the habitat configuration (under `habitat.task.measurements`, see below for a list of available measurements). If the measurement has a non-zero value, the episode is considered a success. |
42
+ |habitat.task.end_on_success | If True, the episode will end when the success measure indicates success. Otherwise the episode will go on (this is useful when doing hierarchical learning and the robot has to explicitly decide when to change policies)|
43
+ |habitat.task.task_spec | When doing the `RearrangePddlTask-v0` only, will look for a pddl plan of that name to determine the sequence of sub-tasks that need to be completed. The format of the pddl plans files is undocumented.|
44
+ |habitat.task.task_spec_base_path | When doing the `RearrangePddlTask-v0` only, the relative path where the task_spec file will be searched.|
45
+ |habitat.task.spawn_max_dists_to_obj| For `RearrangePickTask-v0` task only. Controls the maximum distance the robot can be spawned from the target object. |
46
+ | habitat.task.base_angle_noise| For Rearrangement tasks only. Controls the standard deviation of the random normal noise applied to the base's rotation angle at the start of an episode.|
47
+ | habitat.task.base_noise| For Rearrangement tasks only. Controls the standard deviation of the random normal noise applied to the base's position at the start of an episode.|
48
+
49
+ ## Visual Agents
50
+ We define the visual agents as a bundle of sim sensors. They are a quick way to specify the visual observation space you need in your environment. You can inherit a default agent in your configuration.
51
+ Some sample agents are defined [here](./habitat/simulator/agents/) and are reused in many of our benchmarks. To use one of these agents, add
52
+ ```
53
+ - /habitat/simulator/agents@habitat.simulator.agents.main_agent: <the key of the agent>
54
+ ```
55
+ to your defaults list. All agents have a camera resolution of 256 by 256.
56
+ | Key | Description |
57
+ | --- | --- |
58
+ |depth_head_agent| An Agent with a single depth camera attached to its head.|
59
+ |rgb_head_agent| An Agent with a single RGB camera attached to its head.|
60
+ |rgbd_head_rgbd_arm_agent| An Agent with both a RGB and depth camera attached to its head and arm.|
61
+
62
+
63
+
64
+ ## Environment
65
+ Some habitat environment configurations.
66
+ | Key | Description |
67
+ | --- | --- |
68
+ |habitat.environment.max_episode_steps| The maximum number of environment steps before the episode ends.|
69
+ |habitat.environment.max_episode_seconds| The maximum number of wall-clock seconds before the episode ends.|
70
+
71
+ ## Discrete Navigation Actions
72
+ Actions are the means through an agent affects the environment. They are defined in the dictionary `habitat.task.actions`. All actions in this dictionary will be available for the agent to perform. Note that Navigation action space is discrete while the Rearrangement action space is continuous. The way one would add an action to a configuration file would be by adding to the `defaults` list. For example:
73
+ ```
74
+ defaults:
75
+ - /habitat/task/actions:
76
+ - move_forward
77
+ - turn_left
78
+ ```
79
+
80
+ | Key | Description |
81
+ | --- | --- |
82
+ | habitat.task.actions.stop | In Navigation tasks only, the stop action is a discrete action. When called, the Agent will request to stop the navigation task. Note that this action is needed to succeed in a Navigation task since the Success is determined by the Agent calling the stop action within range of the target. Note that this is different from the RearrangeStopActionConfig that works for Rearrangement tasks only instead of the Navigation tasks.|
83
+ | habitat.task.actions.empty | In Navigation tasks only, the pass action. The robot will do nothing.|
84
+ | habitat.task.actions.move_forward | In Navigation tasks only, this discrete action will move the robot forward by a fixed amount determined by the `habitat.simulator.forward_step_size` amount. |
85
+ | habitat.task.actions.turn_left | In Navigation tasks only, this discrete action will rotate the robot to the left by a fixed amount determined by the `habitat.simulator.turn_angle` amount. |
86
+ | habitat.task.actions.turn_right | In Navigation tasks only, this discrete action will rotate the robot to the right by a fixed amount determined by the `habitat.simulator.turn_angle` amount. |
87
+ | habitat.task.actions.look_up | In Navigation tasks only, this discrete action will rotate the robot's camera up by a fixed amount determined by the `tilt_angle` amount of the look_up action. |
88
+ | habitat.task.actions.look_down | In Navigation tasks only, this discrete action will rotate the robot's camera down by a fixed amount determined by the `tilt_angle` amount of the look_down action. |
89
+
90
+ ## Navigation Measures
91
+ A measure is a way to collect data about the environment at each step that is not sensor information. Measures can contain privileged information for the user (like a top down map) or for training (like rewards).
92
+ The way one would add a measure to a configuration file would be by adding to the `defaults` list. For example:
93
+ ```
94
+ defaults:
95
+ - /habitat/task/measurements:
96
+ - articulated_agent_force
97
+ - force_terminate
98
+ ```
99
+
100
+ | Key | Description |
101
+ | --- | --- |
102
+ | habitat.task.measurements.num_steps| In both Navigation and Rearrangement tasks, counts the number of steps since the start of the episode.|
103
+ | habitat.task.measurements.distance_to_goal | In Navigation tasks only, measures the geodesic distance to the goal.|
104
+ |habitat.task.measurements.distance_to_goal.distance_to | If 'POINT' measures the distance to the closest episode goal. If 'VIEW_POINTS' measures the distance to the episode's goal viewpoints (useful in image nav). |
105
+ |habitat.task.measurements.success | For Navigation tasks only, Measures 1.0 if the robot reached a success and 0 otherwise. A success is defined as calling the `habitat.task.actions.stop` when the `habitat.task.measurements.distance_to_goal` Measure is smaller than `success_distance`.|
106
+ |habitat.task.measurements.success.success_distance| The minimal distance the robot must be to the goal for a success.|
107
+ |habitat.task.measurements.spl| For Navigation tasks only, Measures the SPL (Success weighted by Path Length) ref: [On Evaluation of Embodied Agents - Anderson et. al](https://arxiv.org/pdf/1807.06757.pdf). Measure is always 0 except at success where it will be the ratio of the optimal distance from start to goal over the total distance traveled by the agent. Maximum value is 1. `SPL = success * optimal_distance_to_goal / distance_traveled_so_far`
108
+ |habitat.task.measurements.soft_spl | For Navigation tasks only, Similar to SPL, but instead of a boolean, success is now calculated as 1 - (ratio of distance covered to target). `SoftSPL = max(0, 1 - distance_to_goal / optimal_distance_to_goal) * optimal_distance_to_goal / distance_traveled_so_far`
109
+ |habitat.task.measurements.distance_to_goal_reward | In Navigation tasks only, measures a reward based on the distance towards the goal. The reward is `- (new_distance - previous_distance)` i.e. the decrease of distance to the goal.
110
+
111
+ ## Navigation Lab Sensors
112
+ Lab sensors are any non-rendered sensor observation, like geometric goal information. The way one would add a sensor to a configuration file would be by adding to the `defaults` list. For example:
113
+ ```
114
+ defaults:
115
+ - /habitat/task/lab_sensors:
116
+ - objectgoal_sensor
117
+ - compass_sensor
118
+ ```
119
+
120
+ | Key | Description |
121
+ | --- | --- |
122
+ | habitat.task.lab_sensors.objectgoal_sensor| For Object Navigation tasks only. Generates a discrete observation containing the id of the goal object for the episode. |
123
+ | habitat.task.lab_sensors.objectgoal_sensor.goal_spec| A string that can take the value TASK_CATEGORY_ID or OBJECT_ID. If the value is TASK_CATEGORY_ID, then the observation will be the id of the `episode.object_category` attribute, if the value is OBJECT_ID, then the observation will be the id of the first goal object. |
124
+ | habitat.task.lab_sensors.objectgoal_sensor.goal_spec_max_val| If the ` habitat.task.lab_sensors.objectgoal_sensor.goal_spec` is OBJECT_ID, then `goal_spec_max_val` is the total number of different objects that can be goals. Note that this value must be greater than the largest episode goal category id. |
125
+ | habitat.task.lab_sensors.instance_imagegoal_sensor | Used only by the InstanceImageGoal Navigation task. The observation is a rendered image of the goal object within the scene.|
126
+ | habitat.task.lab_sensors. instance_imagegoal_hfov_sensor | Used only by the InstanceImageGoal Navigation task. The observation is a single float value corresponding to the Horizontal field of view (HFOV) in degrees of the image provided by the `habitat.task.lab_sensors.instance_imagegoal_sensor `.|
127
+ | habitat.task.lab_sensors.compass_sensor | For Navigation tasks only. The observation of the `EpisodicCompassSensor` is a single float value corresponding to the angle difference in radians between the current rotation of the robot and the start rotation of the robot along the vertical axis. |
128
+ | habitat.task.lab_sensors.gps_sensor | For Navigation tasks only. The observation of the EpisodicGPSSensor are two float values corresponding to the vector difference in the horizontal plane between the current position and the start position of the robot (in meters). |
129
+ | habitat.task.lab_sensors.pointgoal_with_gps_compass_sensor | Indicates the position of the point goal in the frame of reference of the robot. |
130
+
131
+
132
+ ## Continuous Rearrangement Actions
133
+
134
+ | Key | Description |
135
+ | --- | --- |
136
+ |habitat.task.actions.arm_action |In Rearrangement tasks only, the action that will move the robot arm around. The action represents to delta angle (in radians) of each joint. |
137
+ |habitat.task.actions.arm_action.grasp_thresh_dist| The grasp action will only work on the closest object if its distance to the end effector is smaller than this value. Only for `MagicGraspAction` grip_controller.|
138
+ |habitat.task.actions.arm_action.grip_controller| Can either be None, `MagicGraspAction` or `SuctionGraspAction`. If None, the arm will be unable to grip object. Magic grasp will grasp the object if the end effector is within grasp_thresh_dist of an object, with `SuctionGraspAction`, the object needs to be in contact with the end effector. |
139
+ |habitat.task.actions.base_velocity | In Rearrangement only. Corresponds to the base velocity. Contains two continuous actions, the first one controls forward and backward motion, the second the rotation.
140
+ |habitat.task.actions.rearrange_stop | In rearrangement tasks only, if the robot calls this action, the task will end.|
141
+ |habitat.task.actions.oracle_nav_action| Rearrangement Only, Oracle navigation action. This action takes as input a discrete ID which refers to an object in the PDDL domain. The oracle navigation controller then computes the actions to navigate to that desired object.|
142
+
143
+
144
+ ## Rearrangement Sensors
145
+
146
+
147
+ | Key | Description |
148
+ | --- | --- |
149
+ |habitat.task.lab_sensors.relative_resting_pos_sensor | Rearrangement only. Sensor for the desired relative position of the end-effector's resting position, relative to the end-effector's current position. The three values correspond to the cartesian coordinates of the desired resting position in the frame of reference of the end effector. The desired resting position is determined by the habitat.task.desired_resting_position coordinates relative to the robot's base.|
150
+ | habitat.task.lab_sensors.is_holding_sensor | Rearrangement only. A single float sensor with value 1.0 if the robot is grasping any object and 0.0 otherwise.|
151
+ |habitat.task.lab_sensors.end_effector_sensor | Rearrangement only. the cartesian coordinates (3 floats) of the arm's end effector in the frame of reference of the robot's base.|
152
+ |habitat.task.lab_sensors.joint_sensor| Rearrangement only. Returns the joint positions of the robot.|
153
+ | habitat.task.lab_sensors.goal_sensor | Rearrangement only. Returns the relative position from end effector to a goal position in which the agent needs to place an object. |
154
+ | habitat.task.lab_sensors.target_start_gps_compass_sensor | Rearrangement only. Returns the initial position of every object that needs to be rearranged in composite tasks relative to the robot's start position, in 2D polar coordinates (distance and angle in the horizontal plane). |
155
+ | habitat.task.lab_sensors.target_goal_gps_compass_sensor | Rearrangement only. Returns the desired goal position of every object that needs to be rearranged in composite tasks relative to the robot's start position, in 2D polar coordinates (distance and angle in the horizontal plane). |
156
+
157
+ ## Rearrangement Measures
158
+ | Key | Description |
159
+ | --- | --- |
160
+ |habitat.task.measurements.end_effector_to_rest_distance | Rearrangement only. Distance between current end effector position and the resting position of the end effector. Requires that the RelativeRestingPositionSensor is attached to the agent (see Rearrangement Sensors above to see how to attach sensors). |
161
+ |habitat.task.measurements.articulated_agent_force | The amount of force in newton's applied by the robot. It computes both the instantaneous and accumulated force during the episode. |
162
+ |habitat.task.measurements.does_want_terminate | Rearrangement Only. Measures 1 if the agent has called the stop action and 0 otherwise. |
163
+ |habitat.task.measurements.force_terminate | If the force is greater than a certain threshold, this measure will be 1.0 and 0.0 otherwise. Note that if the measure is 1.0, the task will end as a result. |
164
+ |habitat.task.measurements.force_terminate.max_accum_force | The threshold for the accumulated force before calling termination. -1 is no threshold, i.e., force-based termination is never called. |
165
+ |habitat.task.measurements.force_terminate.max_instant_force | The threshold for the current, instantaneous force before calling termination. -1 is no threshold, i.e., force-based termination is never called. |
166
+ |habitat.task.measurements.object_to_goal_distance | In rearrangement only. The distance between the target object and the goal position for the object. |
167
+ |habitat.task.measurements.obj_at_goal | The measure is a dictionary of target indexes to float. The values are 1 if the object is within succ_thresh of the goal position for that object. |
168
+ |habitat.task.measurements.obj_at_goal.succ_thresh | The threshold distance below which an object is considered at the goal location. |
169
+ |habitat.task.measurements.art_obj_at_desired_state | Rearrangement open/close container tasks only. Whether the articulated object (fridge or cabinet door) is in a desired joint state (open or closed) as defined by the task. |
170
+ |habitat.task.measurements.rot_dist_to_goal | Rearrangement Navigation task only. The angle between the forward direction of the agent and the direction to the goal location. |
171
+ |habitat.task.measurements.composite_stage_goals | Composite Rearrangement only. 1.0 if the agent complete a particular stage defined in `stage_goals` and 0.0 otherwise. Stage goals are specified in the `pddl` task description. |
172
+ |habitat.task.measurements.nav_to_pos_succ | Rearrangement Navigation task only. The value is 1.0 if the robot is within success_distance of the goal position. |
173
+
174
+ ### Task defining rearrangement measures
175
+
176
+ You can change the success and reward measures of a task by changing the `habitat.task.success_measure` and the `habitat.task.reward_measure` keys respectively.
177
+
178
+ For Rearrangement Pick : `pick_success` | `place_reward`
179
+ For Rearrangement Place : `place_success` | `place_reward`
180
+ For Rearrangement Open / Close Articulated Object : `art_obj_success` | `art_obj_reward`
181
+ For Rearrangement Navigation : `nav_to_obj_success` | `nav_to_obj_reward`
182
+ For Composite Rearrangement using a PDDL plan : `pddl_compositesuccess` | ` move_objects_reward`
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/README.md ADDED
@@ -0,0 +1,497 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Habitat-Lab Configuration System
2
+ ================================
3
+ ![Habitat with Hydra](/res/img/habitat_with_hydra.png)
4
+
5
+ For a description of some of the most important configuration keys of the habitat benchmarks, refer to [this file](CONFIG_KEYS.md).
6
+
7
+ Habitat-Lab's configuration system has been changed from [YACS](https://github.com/rbgirshick/yacs)
8
+ to [Hydra](https://hydra.cc).
9
+
10
+ ## Hydra Concepts used in Habitat-Lab
11
+
12
+ With Hydra, the [Output Config](https://hydra.cc/docs/advanced/terminology/#output-config)
13
+ is composed dynamically at run time from
14
+ the [Input Configs](https://hydra.cc/docs/advanced/terminology/#input-configs) specified in
15
+ the [Defaults List](https://hydra.cc/docs/advanced/terminology/#defaults-list) and
16
+ [Overrides](https://hydra.cc/docs/advanced/terminology/#overrides) from the primary yaml config file or command line.
17
+
18
+ Default config values and their types are defined via
19
+ [Structured Configs](https://hydra.cc/docs/advanced/terminology/#structured-config). Structured Configs are used as a
20
+ config validation schemas to ensure that all the required fields are set and match the required type, and also as a
21
+ configs, in place of configuration yaml files. All Structured Configs are registered in
22
+ the [ConfigStore](https://hydra.cc/docs/tutorials/structured_config/config_store/) - in-memory
23
+ Structured Configs registry. Habitat-Lab's Structured Configs are defined and registered to the ConfigStore in
24
+ [habitat-lab/habitat/config/default_structured_configs.py](default_structured_configs.py).
25
+
26
+ Similar configs are grouped in [Config Groups](https://hydra.cc/docs/advanced/terminology/#config-group)
27
+ (placed in the same directories in the [Config Search Path](https://hydra.cc/docs/advanced/terminology/#config-search-path)).
28
+ These configs are also called [Config Group Options](https://hydra.cc/docs/advanced/terminology/#config-group-option).
29
+ For example, Embodied AI task specifications supported by Habitat-Lab are placed in the `habitat/task` Config Group
30
+ and to use the PointNav task just add `habitat/task: pointnav` line to your config's Defaults List.
31
+
32
+ Each Input Config's position in the Output Config is determined via
33
+ [Package](https://hydra.cc/docs/advanced/terminology/#package). In other words, a Package is the path to node in a config.
34
+ By default, the Package of a Config Group Option is derived from the Config Group. e.g: task configs in `habitat/task`
35
+ will have the package `habitat.task` by default (i.e. will be placed under `habitat.task` in the final Output Config).
36
+
37
+ To make all habitat configs visible to Hydra, the `habitat/config` path is added to Config Search Path by
38
+ extending [SearchPathPlugin](https://hydra.cc/docs/advanced/plugins/overview/#searchpathplugin)
39
+ (see `HabitatConfigPlugin` class in the [habitat-lab/habitat/config/default_structured_configs.py](default_structured_configs.py)).
40
+ `HabitatConfigPlugin` is registered by `register_hydra_plugin(HabitatConfigPlugin)` function call in Habitat-Lab's `get_config`
41
+ (see `get_config` definition in [habitat-lab/habitat/config/default.py](default.py)).
42
+
43
+ Note, due to the fact that Habitat-Lab doesn't have a single entry point, but creates config objects in multiple places,
44
+ for example, Jupyter Notebooks, example scripts in the `/examples` folder, tests, etc. Hydra's
45
+ [Compose API](https://hydra.cc/docs/advanced/compose_api/) is used to create the config in the Habitat-Lab's
46
+ `get_config` function instead of `@hydra.main` decorator (used in most Hydra examples).
47
+
48
+ For more detailed explanation of Hydra concepts visit Hydra's [website](https://hydra.cc/docs/intro/).
49
+
50
+ ## Config directory structure
51
+ ```
52
+ habitat-lab/habitat/config/
53
+ |
54
+ |_benchmark # benchmark configs (primary configs to be used in habitat.get_config)
55
+ | |_nav
56
+ | |_rearrange
57
+ |
58
+ |_habitat # habitat configs (habitat config groups options)
59
+ | |_dataset
60
+ | |_simulator
61
+ | |_task
62
+ |
63
+ |_test # test configs
64
+ ```
65
+
66
+
67
+ ## What's changed?
68
+ <details>
69
+ <summary>PointNav benchmark: Input Config.</summary>
70
+
71
+ ```yaml
72
+ # @package _global_
73
+
74
+ # defaults list:
75
+ defaults:
76
+ - /habitat: habitat_config_base
77
+ - /habitat/task: pointnav
78
+ - /habitat/simulator/agents:
79
+ - rgbd_agent
80
+ - /habitat/dataset/pointnav: gibson
81
+ - _self_
82
+
83
+ # config values overrides:
84
+ habitat:
85
+ environment:
86
+ max_episode_steps: 500
87
+ simulator:
88
+ agents:
89
+ rgbd_agent:
90
+ sim_sensors:
91
+ rgb_sensor:
92
+ width: 256
93
+ height: 256
94
+ depth_sensor:
95
+ width: 256
96
+ height: 256
97
+ ```
98
+ </details>
99
+
100
+ <details>
101
+ <summary>PointNav benchmark: Output Config.</summary>
102
+
103
+ ```yaml
104
+ habitat:
105
+ seed: 100
106
+ env_task: GymHabitatEnv
107
+ env_task_gym_dependencies: []
108
+ env_task_gym_id: ''
109
+ environment:
110
+ max_episode_steps: 500
111
+ max_episode_seconds: 10000000
112
+ iterator_options:
113
+ cycle: true
114
+ shuffle: true
115
+ group_by_scene: true
116
+ num_episode_sample: -1
117
+ max_scene_repeat_episodes: -1
118
+ max_scene_repeat_steps: 10000
119
+ step_repetition_range: 0.2
120
+ simulator:
121
+ type: Sim-v0
122
+ forward_step_size: 0.25
123
+ turn_angle: 10
124
+ create_renderer: false
125
+ requires_textures: true
126
+ lag_observations: 0
127
+ auto_sleep: false
128
+ step_physics: true
129
+ concur_render: false
130
+ needs_markers: true
131
+ update_articulated_agent: true
132
+ scene: data/scene_datasets/habitat-test-scenes/van-gogh-room.glb
133
+ scene_dataset: default
134
+ additional_object_paths: []
135
+ seed: ${habitat.seed}
136
+ default_agent_id: 0
137
+ debug_render: false
138
+ debug_render_robot: false
139
+ kinematic_mode: false
140
+ debug_render_goal: true
141
+ robot_joint_start_noise: 0.0
142
+ ctrl_freq: 120.0
143
+ ac_freq_ratio: 4
144
+ load_objs: true
145
+ hold_thresh: 0.09
146
+ grasp_impulse: 1000.0
147
+ agents:
148
+ rgbd_agent:
149
+ height: 1.5
150
+ radius: 0.1
151
+ sim_sensors:
152
+ rgb_sensor:
153
+ type: HabitatSimRGBSensor
154
+ height: 256
155
+ width: 256
156
+ position:
157
+ - 0.0
158
+ - 1.25
159
+ - 0.0
160
+ orientation:
161
+ - 0.0
162
+ - 0.0
163
+ - 0.0
164
+ hfov: 90
165
+ sensor_subtype: PINHOLE
166
+ noise_model: None
167
+ noise_model_kwargs: {}
168
+ depth_sensor:
169
+ type: HabitatSimDepthSensor
170
+ height: 256
171
+ width: 256
172
+ position:
173
+ - 0.0
174
+ - 1.25
175
+ - 0.0
176
+ orientation:
177
+ - 0.0
178
+ - 0.0
179
+ - 0.0
180
+ hfov: 90
181
+ sensor_subtype: PINHOLE
182
+ noise_model: None
183
+ noise_model_kwargs: {}
184
+ min_depth: 0.0
185
+ max_depth: 10.0
186
+ normalize_depth: true
187
+ is_set_start_state: false
188
+ start_position:
189
+ - 0.0
190
+ - 0.0
191
+ - 0.0
192
+ start_rotation:
193
+ - 0.0
194
+ - 0.0
195
+ - 0.0
196
+ - 1.0
197
+ joint_start_noise: 0.0
198
+ articulated_agent_urdf: data/robots/hab_fetch/robots/hab_fetch.urdf
199
+ articulated_agent_type: FetchRobot
200
+ ik_arm_urdf: data/robots/hab_fetch/robots/fetch_onlyarm.urdf
201
+ agents_order:
202
+ - rgbd_agent
203
+ habitat_sim_v0:
204
+ gpu_device_id: 0
205
+ gpu_gpu: false
206
+ allow_sliding: true
207
+ frustum_culling: true
208
+ enable_physics: false
209
+ physics_config_file: ./data/default.physics_config.json
210
+ leave_context_with_background_renderer: false
211
+ enable_gfx_replay_save: false
212
+ ep_info: null
213
+ task:
214
+ reward_measure: distance_to_goal_reward
215
+ success_measure: spl
216
+ success_reward: 2.5
217
+ slack_reward: -0.01
218
+ end_on_success: true
219
+ type: Nav-v0
220
+ lab_sensors:
221
+ pointgoal_with_gps_compass_sensor:
222
+ type: PointGoalWithGPSCompassSensor
223
+ goal_format: POLAR
224
+ dimensionality: 2
225
+ measurements:
226
+ distance_to_goal:
227
+ type: DistanceToGoal
228
+ distance_to: POINT
229
+ success:
230
+ type: Success
231
+ success_distance: 0.2
232
+ spl:
233
+ type: SPL
234
+ distance_to_goal_reward:
235
+ type: DistanceToGoalReward
236
+ goal_sensor_uuid: pointgoal_with_gps_compass
237
+ count_obj_collisions: true
238
+ settle_steps: 5
239
+ constraint_violation_ends_episode: true
240
+ constraint_violation_drops_object: false
241
+ force_regenerate: false
242
+ should_save_to_cache: true
243
+ object_in_hand_sample_prob: 0.167
244
+ render_target: true
245
+ ee_sample_factor: 0.2
246
+ ee_exclude_region: 0.0
247
+ base_angle_noise: 0.15
248
+ base_noise: 0.05
249
+ spawn_region_scale: 0.2
250
+ joint_max_impulse: -1.0
251
+ desired_resting_position:
252
+ - 0.5
253
+ - 0.0
254
+ - 1.0
255
+ use_marker_t: true
256
+ cache_robot_init: false
257
+ success_state: 0.0
258
+ easy_init: false
259
+ should_enforce_target_within_reach: false
260
+ task_spec_base_path: habitat/task/rearrange/pddl/
261
+ task_spec: ''
262
+ pddl_domain_def: replica_cad
263
+ obj_succ_thresh: 0.3
264
+ art_succ_thresh: 0.15
265
+ robot_at_thresh: 2.0
266
+ actions:
267
+ stop:
268
+ type: StopAction
269
+ move_forward:
270
+ type: MoveForwardAction
271
+ turn_left:
272
+ type: TurnLeftAction
273
+ turn_angle: 10
274
+ turn_right:
275
+ type: TurnRightAction
276
+ turn_angle: 10
277
+ dataset:
278
+ type: PointNav-v1
279
+ split: train
280
+ scenes_dir: data/scene_datasets
281
+ content_scenes:
282
+ - '*'
283
+ data_path: data/datasets/pointnav/gibson/v1/{split}/{split}.json.gz
284
+ gym:
285
+ obs_keys: null
286
+ action_keys: null
287
+ achieved_goal_keys: []
288
+ desired_goal_keys: []
289
+ ```
290
+ </details>
291
+
292
+ - The configuration keys are lowercase and live under the `habitat` namespace.
293
+ - Embodied AI task specifications are separated from the benchmark configs (more general configs that include
294
+ task config as one of their sub-configs in the Defaults List). Task configs are grouped in the `habitat/task`
295
+ Config Group (located in [habitat-lab/config/habitat/task](habitat/task) directory) and benchmark configs
296
+ are placed in the [habitat-lab/config/benchmark](benchmark) directory.
297
+ - `agent.sensors` is renamed to `agent.sim_sensors`, `task.sensors` is renamed to `task.lab_sensors`.
298
+ - Actions, agents, measurements and sensors configs are not directly attached to the simulator, task or agent
299
+ config nodes but are added to `task.actions`, `simulator.agents`, `task.measurements`, `task.lab_sensors`,
300
+ `simulator.<agent_name>.sim_sensors` sub-nodes of type `Dict[str, CorrespondingConfigNodeType]`
301
+ that can be updated dynamically. Consequently, Output Config contains only those config nodes that are listed in
302
+ `task.actions`, `simulator.agents`, `task.measurements`, `task.lab_sensors`, `simulator.agents.agent_name.sim_sensors`
303
+ (not all possible actions, agents, measurements and sensors config nodes).
304
+ - `task.possible_actions` is removed.
305
+
306
+ ### New functionality enabled
307
+ After the configuration system migration to Hydra, Habitat-Lab automatically supports all Hydra's
308
+ and [OmegaConf's](https://omegaconf.readthedocs.io/) features (note that Hydra is build on top of OmegaConf).
309
+ Some of new features are listed below:
310
+ - Config node reuse by redefining the config package. For example, it is possible to use the same agent config to
311
+ configure two agents of the same type:
312
+ ```yaml
313
+ defaults:
314
+ - /habitat/simulator/sensor_setups@habitat.simulator.agents.agent_0: depth_head_agent
315
+ - /habitat/simulator/sensor_setups@habitat.simulator.agents.agent_1: depth_head_agent
316
+ ```
317
+ - [Variable interpolation](https://omegaconf.readthedocs.io/en/2.2_branch/usage.html#variable-interpolation).
318
+ For example, use the same seed value for `SimulatorConfig.seed` as in `HabitatConfig.seed` (see `SimulatorConfig`
319
+ in the [habitat-lab/habitat/config/default.py](default.py)):
320
+ ```python
321
+ from omegaconf import II
322
+
323
+ @dataclass
324
+ class SimulatorConfig(HabitatBaseConfig):
325
+ # Other SimulatorConfig keys are omitted in this code snippet
326
+ seed: int = II("habitat.seed")
327
+ ```
328
+ - [Parameter sweeping and multirun](https://hydra.cc/docs/tutorials/basic/running_your_app/multi-run/). For example, launching 3 experiments with three different learning rates:
329
+ ```bash
330
+ python -u -m habitat_baselines.run --config-name=config.yaml \
331
+ –-multirun habitat_baselines.rl.ppo.lr 2.5e-4,2.5e-5,2.5e-6
332
+ ```
333
+ - Seamless [SLURM](https://slurm.schedmd.com/documentation.html) integration through
334
+ [Submitit Launcher](https://hydra.cc/docs/plugins/submitit_launcher/).
335
+ To enable the feature Submitit plugin should be installed: `pip install hydra-submitit-launcher --upgrade`
336
+ and `submitit_slurm` launcher specified in the command line `hydra/launcher=submitit_slurm`:
337
+ ```bash
338
+ python -u -m habitat_baselines.run --config-name=config.yaml \
339
+ hydra/launcher=submitit_slurm --multirun
340
+ ```
341
+ - Making the config key required by setting its value to `MISSING`. For example, we require the user to explicitly
342
+ set the `task` and the `dataset` in every Habitat-Lab benchmark config (see `HabitatConfig` Structured Config
343
+ in the [habitat-lab/habitat/config/default.py](default.py)):
344
+ ```python
345
+ from omegaconf import MISSING
346
+
347
+ @dataclass
348
+ class HabitatConfig(HabitatBaseConfig):
349
+ # Other HabitatConfig keys are omitted in this code snippet
350
+ task: TaskConfig = MISSING
351
+ dataset: DatasetConfig = MISSING
352
+ ```
353
+
354
+
355
+ But Hydra allows a lot more! Visit Hydra's [website](https://hydra.cc/docs/intro/) for mode details about Hydra's features.
356
+
357
+ ## How to ______?
358
+ ### read the config
359
+ ```python
360
+ import habitat
361
+
362
+ config = habitat.get_config("benchmark/nav/pointnav/pointnav_gibson.yaml")
363
+ ```
364
+ ### override the config
365
+ #### via command line
366
+ Override config values:
367
+ ```bash
368
+ python -u -m habitat_baselines.run --config-name=pointnav/ddppo_pointnav.yaml \
369
+ habitat.environment.max_episode_steps=250 \
370
+ habitat_baselines.total_num_steps=100
371
+ ```
372
+
373
+ Override the Config Group Option value:
374
+ ```bash
375
+ python -u -m habitat_baselines.run --config-name=pointnav/ddppo_pointnav.yaml \
376
+ benchmark/nav/pointnav=pointnav_hm3d # overriding benchmark config to be pointnav_hm3d
377
+ ```
378
+
379
+ #### via yaml
380
+ Yaml file definitions or overrides are defined after the Defaults List:
381
+ ```yaml
382
+ # @package _global_
383
+
384
+ defaults:
385
+ - /habitat: habitat_config_base
386
+ - /habitat/task: pointnav
387
+ - /habitat/simulator/agents:
388
+ - rgbd_agent
389
+ - /habitat/dataset/pointnav: gibson
390
+ - _self_
391
+
392
+ # config values overrides:
393
+ habitat:
394
+ environment:
395
+ max_episode_steps: 500
396
+ simulator:
397
+ agents:
398
+ rgbd_agent:
399
+ sim_sensors:
400
+ rgb_sensor:
401
+ width: 256
402
+ height: 256
403
+ depth_sensor:
404
+ width: 256
405
+ height: 256
406
+ ```
407
+ Note, that its also possible to override the Config Group Options in the Defaults list:
408
+ ```yaml
409
+ # @package _global_
410
+
411
+ defaults:
412
+ - any_base_config
413
+ - override /habitat/dataset/pointnav: gibson # override the any_base_config dataset to gibson
414
+ ```
415
+
416
+ #### via code
417
+ The config object returned from `habitat.get_config` is readonly. To be able to update the config object via code, wrap
418
+ it in the `read_write(config)` context manager:
419
+
420
+ ```python
421
+ from habitat.config.read_write import read_write
422
+
423
+ with read_write(config):
424
+ config.habitat.simulator.concur_render = False
425
+ agent_config = get_agent_config(config.habitat.simulator)
426
+ agent_config.sim_sensors.update(
427
+ {"third_rgb_sensor": ThirdRGBSensorConfig(height=512, width=512)}
428
+ )
429
+ ```
430
+
431
+ ### extend the config
432
+ pointnav_base.yaml
433
+ ```yaml
434
+ # @package _global_
435
+
436
+ defaults:
437
+ - /habitat: habitat_config_base
438
+ - /habitat/task: pointnav
439
+ - /habitat/simulator/agents:
440
+ - rgbd_agent
441
+ - _self_
442
+
443
+ habitat:
444
+ environment:
445
+ max_episode_steps: 500
446
+ simulator:
447
+ agents:
448
+ rgbd_agent:
449
+ sim_sensors:
450
+ rgb_sensor:
451
+ width: 256
452
+ height: 256
453
+ depth_sensor:
454
+ width: 256
455
+ height: 256
456
+ ```
457
+
458
+ pointnav_habitat_test.yaml
459
+ ```yaml
460
+ # @package _global_
461
+
462
+ defaults:
463
+ - pointnav_base
464
+ - /habitat/dataset/pointnav: habitat_test
465
+ ```
466
+
467
+ pointnav_gibson.yaml
468
+ ```yaml
469
+ # @package _global_
470
+
471
+ defaults:
472
+ - pointnav_base
473
+ - /habitat/dataset/pointnav: gibson
474
+ ```
475
+
476
+ ### define new structured config
477
+ In case, you directly work with code in the habitat-lab repository (for example, clone and extend), then to add new
478
+ custom Structured Config just define and add the class to the ConfigStore in the
479
+ [habitat-lab/habitat/config/default_structured_configs.py](default_structured_configs.py).
480
+
481
+ ```python
482
+ from dataclasses import dataclass
483
+ from hydra.core.config_store import ConfigStore
484
+
485
+ @dataclass
486
+ class CustomStructuredConfig:
487
+ custom_config_key: KeyType = DefaultValue
488
+
489
+ cs = ConfigStore.instance()
490
+ cs.store(
491
+ group="habitat/custom_structured_config", # config group
492
+ name="custom_structured_config", # config name
493
+ node=CustomStructuredConfig,
494
+ # Note, it is also possible to override the package (that's derived from the Config Group by default)
495
+ # package="habitat.new.custom_structured_config",
496
+ )
497
+ ```
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/__init__.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ # Copyright (c) Meta Platforms, Inc. and its affiliates.
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+
8
+ from habitat.config.default import DictConfig, get_config
9
+ from habitat.config.read_write import read_write
10
+
11
+ __all__ = ["get_config", "read_write", "default_structured_configs"]
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/default.py ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ # Copyright (c) Meta Platforms, Inc. and its affiliates.
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ import inspect
8
+ import os.path as osp
9
+ import threading
10
+ from functools import partial
11
+ from typing import List, Optional
12
+
13
+ from hydra import compose, initialize_config_dir
14
+ from omegaconf import DictConfig, OmegaConf
15
+
16
+ from habitat.config.default_structured_configs import (
17
+ AgentConfig,
18
+ HabitatConfigPlugin,
19
+ SimulatorConfig,
20
+ register_hydra_plugin,
21
+ )
22
+ from habitat.config.read_write import read_write
23
+
24
+ _HABITAT_CFG_DIR = osp.dirname(inspect.getabsfile(inspect.currentframe()))
25
+ # Habitat config directory inside the installed package.
26
+ # Used to access default predefined configs.
27
+ # This is equivalent to doing osp.dirname(osp.abspath(__file__))
28
+ # in editable install, this is pwd/habitat-lab/habitat/config
29
+ CONFIG_FILE_SEPARATOR = ","
30
+
31
+
32
+ def get_full_config_path(config_path: str, configs_dir: str) -> str:
33
+ r"""Returns absolute path to the yaml config file if exists, else raises RuntimeError.
34
+
35
+ :param config_path: path to the yaml config file.
36
+ :param configs_dir: path to the config files root directory.
37
+ :return: absolute path to the yaml config file.
38
+ """
39
+ if osp.exists(config_path):
40
+ return osp.abspath(config_path)
41
+
42
+ proposed_full_path = osp.join(configs_dir, config_path)
43
+ if osp.exists(proposed_full_path):
44
+ return osp.abspath(proposed_full_path)
45
+
46
+ raise RuntimeError(f"No file found for config '{config_path}'")
47
+
48
+
49
+ get_full_habitat_config_path = partial(
50
+ get_full_config_path, configs_dir=_HABITAT_CFG_DIR
51
+ )
52
+ get_full_habitat_config_path.__doc__ = r"""
53
+ Returns absolute path to the habitat yaml config file if exists, else raises RuntimeError.
54
+
55
+ :param config_path: relative path to the habitat yaml config file.
56
+ :return: absolute config to the habitat yaml config file.
57
+ """
58
+
59
+
60
+ def get_agent_config(
61
+ sim_config: SimulatorConfig, agent_id: Optional[int] = None
62
+ ) -> AgentConfig:
63
+ r"""Returns agent's config node of default agent or based on index of the agent.
64
+
65
+ :param sim_config: config of :ref:`habitat.core.simulator.Simulator`.
66
+ :param agent_id: index of the agent config (relevant for multi-agent setup).
67
+ :return: relevant agent's config.
68
+ """
69
+ if agent_id is None:
70
+ agent_id = sim_config.default_agent_id
71
+
72
+ agent_name = sim_config.agents_order[agent_id]
73
+ agent_config = sim_config.agents[agent_name]
74
+
75
+ return agent_config
76
+
77
+
78
+ lock = threading.Lock()
79
+
80
+
81
+ def patch_config(cfg: DictConfig) -> DictConfig:
82
+ """
83
+ Internal method only. Modifies a configuration by inferring some missing keys
84
+ and makes sure some keys are present and compatible with each other.
85
+ """
86
+ # In the single-agent setup use the agent's key from `habitat.simulator.agents`.
87
+ sim_config = cfg.habitat.simulator
88
+ if len(sim_config.agents) == 1:
89
+ with read_write(sim_config):
90
+ sim_config.agents_order = list(sim_config.agents.keys())
91
+
92
+ # Check if the `habitat.simulator.agents_order`
93
+ # is set and matches the agents' keys in `habitat.simulator.agents`.
94
+ assert len(sim_config.agents_order) == len(sim_config.agents) and set(
95
+ sim_config.agents_order
96
+ ) == set(sim_config.agents.keys()), (
97
+ "habitat.simulator.agents_order should be set explicitly "
98
+ "and match the agents' keys in habitat.simulator.agents.\n"
99
+ f"habitat.simulator.agents_order: {sim_config.agents_order}\n"
100
+ f"habitat.simulator.agents: {list(sim_config.agents.keys())}"
101
+ )
102
+
103
+ OmegaConf.set_readonly(cfg, True)
104
+
105
+ return cfg
106
+
107
+
108
+ def register_configs():
109
+ """
110
+ This method will register the Habitat-lab benchmark configurations.
111
+ """
112
+ register_hydra_plugin(HabitatConfigPlugin)
113
+
114
+
115
+ def get_config(
116
+ config_path: str,
117
+ overrides: Optional[List[str]] = None,
118
+ configs_dir: str = _HABITAT_CFG_DIR,
119
+ ) -> DictConfig:
120
+ r"""Returns habitat config object composed of configs from yaml file (config_path) and overrides.
121
+
122
+ :param config_path: path to the yaml config file.
123
+ :param overrides: list of config overrides. For example, :py:`overrides=["habitat.seed=1"]`.
124
+ :param configs_dir: path to the config files root directory (defaults to :ref:`_HABITAT_CFG_DIR`).
125
+ :return: composed config object.
126
+ """
127
+ register_configs()
128
+ config_path = get_full_config_path(config_path, configs_dir)
129
+ # If get_config is called from different threads, Hydra might
130
+ # get initialized twice leading to issues. This lock fixes it.
131
+ with lock, initialize_config_dir(
132
+ version_base=None,
133
+ config_dir=osp.dirname(config_path),
134
+ ):
135
+ cfg = compose(
136
+ config_name=osp.basename(config_path),
137
+ overrides=overrides if overrides is not None else [],
138
+ )
139
+
140
+ return patch_config(cfg)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/default_structured_configs.py ADDED
@@ -0,0 +1,2675 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ # Copyright (c) Meta Platforms, Inc. and its affiliates.
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ from dataclasses import dataclass, field
8
+ from typing import Any, Dict, List, Optional
9
+
10
+ from hydra.core.config_store import ConfigStore
11
+ from omegaconf import II, MISSING
12
+
13
+ # __all__ is used for documentation. Only put in this list the configurations
14
+ # that have proper documentation for.
15
+ __all__ = [
16
+ # HABITAT
17
+ "HabitatConfig",
18
+ # DATASET
19
+ "DatasetConfig",
20
+ # TASK
21
+ "TaskConfig",
22
+ # ENVIRONMENT
23
+ "EnvironmentConfig",
24
+ # NAVIGATION ACTIONS
25
+ "StopActionConfig",
26
+ "MoveForwardActionConfig",
27
+ "TurnLeftActionConfig",
28
+ "TurnLeftActionConfig",
29
+ "TurnRightActionConfig",
30
+ "LookUpActionConfig",
31
+ "LookDownActionConfig",
32
+ # NAVIGATION MEASURES
33
+ "NumStepsMeasurementConfig",
34
+ "DistanceToGoalMeasurementConfig",
35
+ "SuccessMeasurementConfig",
36
+ "SPLMeasurementConfig",
37
+ "SoftSPLMeasurementConfig",
38
+ "DistanceToGoalRewardMeasurementConfig",
39
+ # NAVIGATION LAB SENSORS
40
+ "ObjectGoalSensorConfig",
41
+ "InstanceImageGoalSensorConfig",
42
+ "InstanceImageGoalHFOVSensorConfig",
43
+ "CompassSensorConfig",
44
+ "GPSSensorConfig",
45
+ "PointGoalWithGPSCompassSensorConfig",
46
+ "HumanoidDetectorSensorConfig",
47
+ "ArmDepthBBoxSensorConfig",
48
+ "SpotHeadStereoDepthSensorConfig",
49
+ # REARRANGEMENT ACTIONS
50
+ "EmptyActionConfig",
51
+ "ArmActionConfig",
52
+ "BaseVelocityActionConfig",
53
+ "HumanoidJointActionConfig",
54
+ "HumanoidPickActionConfig",
55
+ "RearrangeStopActionConfig",
56
+ "OracleNavActionConfig",
57
+ "SelectBaseOrArmActionConfig",
58
+ # REARRANGEMENT LAB SENSORS
59
+ "RelativeRestingPositionSensorConfig",
60
+ "IsHoldingSensorConfig",
61
+ "EEPositionSensorConfig",
62
+ "JointSensorConfig",
63
+ "HumanoidJointSensorConfig",
64
+ "TargetStartSensorConfig",
65
+ "GoalSensorConfig",
66
+ "TargetStartGpsCompassSensorConfig",
67
+ "InitialGpsCompassSensorConfig",
68
+ "TargetGoalGpsCompassSensorConfig",
69
+ # REARRANGEMENT MEASUREMENTS
70
+ "EndEffectorToRestDistanceMeasurementConfig",
71
+ "RobotForceMeasurementConfig",
72
+ "DoesWantTerminateMeasurementConfig",
73
+ "ForceTerminateMeasurementConfig",
74
+ "ObjectToGoalDistanceMeasurementConfig",
75
+ "ObjAtGoalMeasurementConfig",
76
+ "ArtObjAtDesiredStateMeasurementConfig",
77
+ "RotDistToGoalMeasurementConfig",
78
+ "PddlStageGoalsMeasurementConfig",
79
+ "NavToPosSuccMeasurementConfig",
80
+ "SocialNavStatsMeasurementConfig",
81
+ "NavSeekSuccessMeasurementConfig",
82
+ # REARRANGEMENT MEASUREMENTS TASK REWARDS AND MEASURES
83
+ "RearrangePickSuccessMeasurementConfig",
84
+ "RearrangePickRewardMeasurementConfig",
85
+ "PlaceSuccessMeasurementConfig",
86
+ "PlaceRewardMeasurementConfig",
87
+ "ArtObjSuccessMeasurementConfig",
88
+ "ArtObjRewardMeasurementConfig",
89
+ "NavToObjSuccessMeasurementConfig",
90
+ "NavToObjRewardMeasurementConfig",
91
+ "PddlSuccessMeasurementConfig",
92
+ # PROFILING MEASURES
93
+ "RuntimePerfStatsMeasurementConfig",
94
+ ]
95
+
96
+
97
+ @dataclass
98
+ class HabitatBaseConfig:
99
+ pass
100
+
101
+
102
+ @dataclass
103
+ class IteratorOptionsConfig(HabitatBaseConfig):
104
+ cycle: bool = True
105
+ shuffle: bool = True
106
+ group_by_scene: bool = True
107
+ num_episode_sample: int = -1
108
+ max_scene_repeat_episodes: int = -1
109
+ max_scene_repeat_steps: int = int(1e4)
110
+ step_repetition_range: float = 0.2
111
+
112
+
113
+ @dataclass
114
+ class EnvironmentConfig(HabitatBaseConfig):
115
+ r"""
116
+ Some habitat environment configurations.
117
+
118
+ :property max_episode_steps: The maximum number of environment steps before the episode ends.
119
+ :property max_episode_seconds: The maximum number of wall-clock seconds before the episode ends.
120
+ """
121
+ max_episode_steps: int = 1000
122
+ max_episode_seconds: int = 10000000
123
+ iterator_options: IteratorOptionsConfig = IteratorOptionsConfig()
124
+
125
+
126
+ # -----------------------------------------------------------------------------
127
+ # # Actions
128
+ # -----------------------------------------------------------------------------
129
+ @dataclass
130
+ class ActionConfig(HabitatBaseConfig):
131
+ type: str = MISSING
132
+
133
+
134
+ @dataclass
135
+ class StopActionConfig(ActionConfig):
136
+ r"""
137
+ In Navigation tasks only, the stop action is a discrete action. When called, the Agent
138
+ will request to stop the navigation task. Note that this action is needed to
139
+ succeed in a Navigation task since the Success is determined by the Agent calling
140
+ the stop action within range of the target.
141
+ Note that this is different from the RearrangeStopActionConfig that works for
142
+ Rearrangement tasks only instead of the Navigation tasks.
143
+ """
144
+ type: str = "StopAction"
145
+
146
+
147
+ @dataclass
148
+ class EmptyActionConfig(ActionConfig):
149
+ r"""
150
+ In Navigation tasks only, the pass action. The robot will do nothing.
151
+ """
152
+ type: str = "EmptyAction"
153
+
154
+
155
+ # -----------------------------------------------------------------------------
156
+ # # NAVIGATION actions
157
+ # -----------------------------------------------------------------------------
158
+
159
+
160
+ @dataclass
161
+ class DiscreteNavigationActionConfig(ActionConfig):
162
+ tilt_angle: int = 15 # angle to tilt the camera up or down in degrees
163
+
164
+
165
+ @dataclass
166
+ class MoveForwardActionConfig(DiscreteNavigationActionConfig):
167
+ r"""
168
+ In Navigation tasks only, this discrete action will move the robot forward by
169
+ a fixed amount determined by the SimulatorConfig.forward_step_size amount.
170
+ """
171
+ type: str = "MoveForwardAction"
172
+
173
+
174
+ @dataclass
175
+ class TurnLeftActionConfig(DiscreteNavigationActionConfig):
176
+ r"""
177
+ In Navigation tasks only, this discrete action will rotate the robot to the left
178
+ by a fixed amount determined by the SimulatorConfig.turn_angle amount.
179
+ """
180
+ type: str = "TurnLeftAction"
181
+
182
+
183
+ @dataclass
184
+ class TurnRightActionConfig(DiscreteNavigationActionConfig):
185
+ r"""
186
+ In Navigation tasks only, this discrete action will rotate the robot to the right
187
+ by a fixed amount determined by the SimulatorConfig.turn_angle amount.
188
+ """
189
+ type: str = "TurnRightAction"
190
+
191
+
192
+ @dataclass
193
+ class LookUpActionConfig(DiscreteNavigationActionConfig):
194
+ r"""
195
+ In Navigation tasks only, this discrete action will rotate the robot's camera up
196
+ by a fixed amount determined by the SimulatorConfig.tilt_angle amount.
197
+ """
198
+ type: str = "LookUpAction"
199
+
200
+
201
+ @dataclass
202
+ class LookDownActionConfig(DiscreteNavigationActionConfig):
203
+ r"""
204
+ In Navigation tasks only, this discrete action will rotate the robot's camera down
205
+ by a fixed amount determined by the SimulatorConfig.tilt_angle amount.
206
+ """
207
+ type: str = "LookDownAction"
208
+
209
+
210
+ @dataclass
211
+ class TeleportActionConfig(ActionConfig):
212
+ type: str = "TeleportAction"
213
+
214
+
215
+ @dataclass
216
+ class VelocityControlActionConfig(ActionConfig):
217
+ type: str = "VelocityAction"
218
+ # meters/sec
219
+ lin_vel_range: List[float] = field(default_factory=lambda: [0.0, 0.25])
220
+ # deg/sec
221
+ ang_vel_range: List[float] = field(default_factory=lambda: [-10.0, 10.0])
222
+ min_abs_lin_speed: float = 0.025 # meters/sec
223
+ min_abs_ang_speed: float = 1.0 # # deg/sec
224
+ time_step: float = 1.0 # seconds
225
+
226
+
227
+ # -----------------------------------------------------------------------------
228
+ # # REARRANGE actions
229
+ # -----------------------------------------------------------------------------
230
+ @dataclass
231
+ class ArmActionConfig(ActionConfig):
232
+ r"""
233
+ In Rearrangement tasks only, the action that will move the robot arm around. The action represents to delta angle (in radians) of each joint.
234
+
235
+ :property grasp_thresh_dist: The grasp action will only work on the closest object if its distance to the end effector is smaller than this value. Only for `MagicGraspAction` grip_controller.
236
+ :property grip_controller: Can either be None, `MagicGraspAction` or `SuctionGraspAction`. If None, the arm will be unable to grip object. Magic grasp will grasp the object if the end effector is within grasp_thresh_dist of an object, with `SuctionGraspAction`, the object needs to be in contact with the end effector.
237
+ :property arm_joint_limit: If the user specify the joint limits. The dimension needs to be the same as arm_joint_dimensionality. Format: [[min_limit, max_limit]]
238
+ :property gaze_distance_range: The gaze action will only work on the closet object if its distance to the end effector is smaller than this value. Only for `GazeGraspAction` grip_controller.
239
+ :property center_cone_angle_threshold: The threshold angle between the line of sight and center_cone_vector. Only for `GazeGraspAction` grip_controller.
240
+ :property center_cone_vector: The vector that the camera's line of sight should be when grasping the object. Only for `GazeGraspAction` grip_controller.
241
+ """
242
+ type: str = "ArmAction"
243
+ arm_controller: str = "ArmRelPosAction"
244
+ grip_controller: Optional[str] = None
245
+ arm_joint_mask: Optional[List[int]] = None
246
+ arm_joint_dimensionality: int = 7
247
+ arm_joint_limit: Optional[List[float]] = None
248
+ grasp_thresh_dist: float = 0.15
249
+ disable_grip: bool = False
250
+ delta_pos_limit: float = 0.0125
251
+ ee_ctrl_lim: float = 0.015
252
+ should_clip: bool = False
253
+ render_ee_target: bool = False
254
+ gaze_distance_range: Optional[List[float]] = None
255
+ center_cone_angle_threshold: float = 0.0
256
+ center_cone_vector: Optional[List[float]] = None
257
+ auto_grasp: bool = False
258
+
259
+
260
+ @dataclass
261
+ class BaseVelocityActionConfig(ActionConfig):
262
+ r"""
263
+ In Rearrangement only. Corresponds to the base velocity. Contains two continuous actions, the first one controls forward and backward motion, the second the rotation.
264
+ """
265
+ type: str = "BaseVelAction"
266
+ lin_speed: float = 10.0
267
+ ang_speed: float = 10.0
268
+ allow_dyn_slide: bool = True
269
+ allow_back: bool = True
270
+
271
+
272
+ @dataclass
273
+ class BaseVelocityNonCylinderActionConfig(ActionConfig):
274
+ r"""
275
+ In Rearrangement only for the non cylinder shape of the robot. Corresponds to the base velocity. Contains two continuous actions, the first one controls forward and backward motion, the second the rotation.
276
+ """
277
+ type: str = "BaseVelNonCylinderAction"
278
+ # The max longitudinal and lateral linear speeds of the robot
279
+ lin_speed: float = 10.0
280
+ longitudinal_lin_speed: float = 10.0
281
+ lateral_lin_speed: float = 10.0
282
+ # The max angular speed of the robot
283
+ ang_speed: float = 10.0
284
+ # If we want to do sliding or not
285
+ allow_dyn_slide: bool = False
286
+ # If we allow the robot to move back or not
287
+ allow_back: bool = True
288
+ # There is a collision if the difference between the clamped NavMesh position and target position
289
+ # is more than collision_threshold for any point.
290
+ collision_threshold: float = 1e-5
291
+ # If we allow the robot to move laterally.
292
+ enable_lateral_move: bool = False
293
+ # If the condition of sliding includes the checking of rotation
294
+ enable_rotation_check_for_dyn_slide: bool = True
295
+
296
+
297
+ @dataclass
298
+ class HumanoidJointActionConfig(ActionConfig):
299
+ r"""
300
+ In Rearrangement only. Corresponds to actions to change the humanoid joints. Contains the parameter num_joints, indicating the joints that can be modified.
301
+ """
302
+ type: str = "HumanoidJointAction"
303
+ num_joints: int = 54
304
+
305
+
306
+ @dataclass
307
+ class HumanoidPickActionConfig(ActionConfig):
308
+ r"""
309
+ In rearrangement tasks only. Config for humanoid to reach objects using IK. For now only contains the number of joints. May be extended with duration of action
310
+ """
311
+ type: str = "HumanoidPickAction"
312
+ # Number of joints in the humanoid body, 54 for SMPL-X, 17 for SMPL
313
+ num_joints: int = 54
314
+ # The amount we should move on every call to humanoid pick action
315
+ dist_move_per_step: float = 0.04
316
+ # The distance at which we will snap/desnap an object, and start retracting the hand
317
+ dist_to_snap: float = 0.02
318
+
319
+
320
+ @dataclass
321
+ class RearrangeStopActionConfig(ActionConfig):
322
+ r"""
323
+ In rearrangement tasks only, if the robot calls this action, the task will end.
324
+ """
325
+ type: str = "RearrangeStopAction"
326
+
327
+
328
+ @dataclass
329
+ class PddlApplyActionConfig(ActionConfig):
330
+ type: str = "PddlApplyAction"
331
+
332
+
333
+ @dataclass
334
+ class OracleNavActionConfig(ActionConfig):
335
+ """
336
+ Rearrangement Only, Oracle navigation action.
337
+ This action takes as input a discrete ID which refers to an object in the
338
+ PDDL domain. The oracle navigation controller then computes the actions to
339
+ navigate to that desired object.
340
+ """
341
+
342
+ type: str = "OracleNavAction"
343
+ # Whether the motion is in the form of base_velocity or human_joints
344
+ motion_control: str = "base_velocity"
345
+ num_joints: int = 17
346
+ turn_velocity: float = 1.0
347
+ forward_velocity: float = 1.0
348
+ turn_thresh: float = 0.1
349
+ dist_thresh: float = 0.2
350
+ lin_speed: float = 10.0
351
+ ang_speed: float = 10.0
352
+ allow_dyn_slide: bool = True
353
+ allow_back: bool = True
354
+ spawn_max_dist_to_obj: float = 2.0
355
+ num_spawn_attempts: int = 200
356
+ # For social nav training only. It controls the distance threshold
357
+ # between the robot and the human and decide if the human wants to walk or not
358
+ human_stop_and_walk_to_robot_distance_threshold: float = -1.0
359
+
360
+
361
+ @dataclass
362
+ class SelectBaseOrArmActionConfig(ActionConfig):
363
+ r"""
364
+ In rearrangement tasks only, if the robot calls this action, the task will end.
365
+ """
366
+ type: str = "SelectBaseOrArmAction"
367
+
368
+
369
+ # -----------------------------------------------------------------------------
370
+ # # EQA actions
371
+ # -----------------------------------------------------------------------------
372
+ @dataclass
373
+ class AnswerActionConfig(ActionConfig):
374
+ type: str = "AnswerAction"
375
+
376
+
377
+ # -----------------------------------------------------------------------------
378
+ # # TASK_SENSORS
379
+ # -----------------------------------------------------------------------------
380
+ @dataclass
381
+ class LabSensorConfig(HabitatBaseConfig):
382
+ type: str = MISSING
383
+
384
+
385
+ @dataclass
386
+ class PointGoalSensorConfig(LabSensorConfig):
387
+ type: str = "PointGoalSensor"
388
+ goal_format: str = "POLAR"
389
+ dimensionality: int = 2
390
+
391
+
392
+ @dataclass
393
+ class PointGoalWithGPSCompassSensorConfig(PointGoalSensorConfig):
394
+ """
395
+ Indicates the position of the point goal in the frame of reference of the robot.
396
+ """
397
+
398
+ type: str = "PointGoalWithGPSCompassSensor"
399
+
400
+
401
+ @dataclass
402
+ class HumanoidDetectorSensorConfig(LabSensorConfig):
403
+ r"""
404
+ Check if the human is in frame
405
+ """
406
+ type: str = "HumanoidDetectorSensor"
407
+ # The default human id is 100
408
+ human_id: int = 100
409
+ # How many pixels needed to consider that human is in frame
410
+ human_pixel_threshold: int = 1000
411
+ # Image based or binary based
412
+ return_image: bool = False
413
+ # Is the return image bounding box or not
414
+ is_return_image_bbox: bool = False
415
+
416
+
417
+ @dataclass
418
+ class ArmDepthBBoxSensorConfig(LabSensorConfig):
419
+ r"""
420
+ Bounding box sensor to check if the object is in frame
421
+ """
422
+ type: str = "ArmDepthBBoxSensor"
423
+ height: int = 480
424
+ width: int = 640
425
+
426
+
427
+ @dataclass
428
+ class SpotHeadStereoDepthSensorConfig(LabSensorConfig):
429
+ r"""
430
+ For Spot only. Sensor fusion for inputs of Spot stereo pair depth sensor
431
+ """
432
+ type: str = "SpotHeadStereoDepthSensor"
433
+ height: int = 240
434
+ width: int = 228
435
+
436
+
437
+ @dataclass
438
+ class ObjectGoalSensorConfig(LabSensorConfig):
439
+ r"""
440
+ For Object Navigation tasks only. Generates a discrete observation containing
441
+ the id of the goal object for the episode.
442
+
443
+ :property goal_spec: A string that can take the value TASK_CATEGORY_ID or OBJECT_ID. If the value is TASK_CATEGORY_ID, then the observation will be the id of the `episode.object_category` attribute, if the value is OBJECT_ID, then the observation will be the id of the first goal object.
444
+ :property goal_spec_max_val: If the `goal_spec` is OBJECT_ID, then `goal_spec_max_val` is the total number of different objects that can be goals. Note that this value must be greater than the largest episode goal category id.
445
+ """
446
+ type: str = "ObjectGoalSensor"
447
+ goal_spec: str = "TASK_CATEGORY_ID"
448
+ goal_spec_max_val: int = 50
449
+
450
+
451
+ @dataclass
452
+ class ImageGoalSensorConfig(LabSensorConfig):
453
+ type: str = "ImageGoalSensor"
454
+
455
+
456
+ @dataclass
457
+ class InstanceImageGoalSensorConfig(LabSensorConfig):
458
+ r"""
459
+ Used only by the InstanceImageGoal Navigation task. The observation is a rendered
460
+ image of the goal object within the scene.
461
+ """
462
+ type: str = "InstanceImageGoalSensor"
463
+
464
+
465
+ @dataclass
466
+ class InstanceImageGoalHFOVSensorConfig(LabSensorConfig):
467
+ r"""
468
+ Used only by the InstanceImageGoal Navigation task. The observation is a single
469
+ float value corresponding to the Horizontal field of view (HFOV) in degrees of
470
+ the image provided by the `InstanceImageGoalSensor`.
471
+ """
472
+ type: str = "InstanceImageGoalHFOVSensor"
473
+
474
+
475
+ @dataclass
476
+ class HeadingSensorConfig(LabSensorConfig):
477
+ type: str = "HeadingSensor"
478
+
479
+
480
+ @dataclass
481
+ class CompassSensorConfig(LabSensorConfig):
482
+ r"""
483
+ For Navigation tasks only. The observation of the
484
+ `EpisodicCompassSensor` is a single float value corresponding to
485
+ the angle difference in radians between the current rotation of the robot and the
486
+ start rotation of the robot along the vertical axis.
487
+ """
488
+ type: str = "CompassSensor"
489
+
490
+
491
+ @dataclass
492
+ class GPSSensorConfig(LabSensorConfig):
493
+ r"""
494
+ For Navigation tasks only. The observation of the EpisodicGPSSensor are two float values
495
+ corresponding to the vector difference in the horizontal plane between the current position
496
+ and the start position of the robot (in meters).
497
+ """
498
+ type: str = "GPSSensor"
499
+ dimensionality: int = 2
500
+
501
+
502
+ @dataclass
503
+ class ProximitySensorConfig(LabSensorConfig):
504
+ type: str = "ProximitySensor"
505
+ max_detection_radius: float = 2.0
506
+
507
+
508
+ @dataclass
509
+ class JointSensorConfig(LabSensorConfig):
510
+ r"""
511
+ Rearrangement only. Returns the joint positions of the robot.
512
+ """
513
+ type: str = "JointSensor"
514
+ dimensionality: int = 7
515
+ arm_joint_mask: Optional[List[int]] = None
516
+
517
+
518
+ @dataclass
519
+ class HumanoidJointSensorConfig(LabSensorConfig):
520
+ r"""
521
+ Rearrangement only. Returns the joint positions of the robot.
522
+ """
523
+ type: str = "HumanoidJointSensor"
524
+ dimensionality: int = 17 * 4
525
+
526
+
527
+ @dataclass
528
+ class EEPositionSensorConfig(LabSensorConfig):
529
+ r"""
530
+ Rearrangement only. the cartesian coordinates (3 floats) of the arm's end effector in the frame of reference of the robot's base.
531
+ """
532
+ type: str = "EEPositionSensor"
533
+
534
+
535
+ @dataclass
536
+ class IsHoldingSensorConfig(LabSensorConfig):
537
+ r"""
538
+ Rearrangement only. A single float sensor with value 1.0 if the robot is grasping any object and 0.0 otherwise.
539
+ """
540
+ type: str = "IsHoldingSensor"
541
+
542
+
543
+ @dataclass
544
+ class RelativeRestingPositionSensorConfig(LabSensorConfig):
545
+ r"""
546
+ Rearrangement only. Sensor for the relative position of the end-effector's resting position, relative to the end-effector's current position.
547
+ The three values correspond to the cartesian coordinates of the resting position in the frame of reference of the end effector.
548
+ The desired resting position is determined by the habitat.task.desired_resting_position coordinates relative to the robot's base.
549
+ """
550
+
551
+ type: str = "RelativeRestingPositionSensor"
552
+
553
+
554
+ @dataclass
555
+ class JointVelocitySensorConfig(LabSensorConfig):
556
+ type: str = "JointVelocitySensor"
557
+ dimensionality: int = 7
558
+
559
+
560
+ @dataclass
561
+ class OracleNavigationActionSensorConfig(LabSensorConfig):
562
+ type: str = "OracleNavigationActionSensor"
563
+
564
+
565
+ @dataclass
566
+ class RestingPositionSensorConfig(LabSensorConfig):
567
+ type: str = "RestingPositionSensor"
568
+
569
+
570
+ @dataclass
571
+ class ArtJointSensorConfig(LabSensorConfig):
572
+ type: str = "ArtJointSensor"
573
+
574
+
575
+ @dataclass
576
+ class NavGoalSensorConfig(LabSensorConfig):
577
+ type: str = "NavGoalSensor"
578
+
579
+
580
+ @dataclass
581
+ class ArtJointSensorNoVelSensorConfig(LabSensorConfig):
582
+ type: str = "ArtJointSensorNoVel" # TODO: add "Sensor" suffix
583
+
584
+
585
+ @dataclass
586
+ class MarkerRelPosSensorConfig(LabSensorConfig):
587
+ type: str = "MarkerRelPosSensor"
588
+
589
+
590
+ @dataclass
591
+ class TargetStartSensorConfig(LabSensorConfig):
592
+ r"""
593
+ Rearrangement only. Returns the relative position from end effector to a target object that needs to be picked up.
594
+ """
595
+ type: str = "TargetStartSensor"
596
+ goal_format: str = "CARTESIAN"
597
+ dimensionality: int = 3
598
+
599
+
600
+ @dataclass
601
+ class TargetCurrentSensorConfig(LabSensorConfig):
602
+ type: str = "TargetCurrentSensor"
603
+ goal_format: str = "CARTESIAN"
604
+ dimensionality: int = 3
605
+
606
+
607
+ @dataclass
608
+ class GoalSensorConfig(LabSensorConfig):
609
+ """
610
+ Rearrangement only. Returns the relative position from end effector to a goal position in which the agent needs to place an object.
611
+ """
612
+
613
+ type: str = "GoalSensor"
614
+ goal_format: str = "CARTESIAN"
615
+ dimensionality: int = 3
616
+
617
+
618
+ @dataclass
619
+ class NavGoalPointGoalSensorConfig(LabSensorConfig):
620
+ type: str = "NavGoalPointGoalSensor"
621
+ goal_is_human: bool = False
622
+ human_agent_idx: int = 1
623
+
624
+
625
+ @dataclass
626
+ class GlobalPredicatesSensorConfig(LabSensorConfig):
627
+ type: str = "GlobalPredicatesSensor"
628
+
629
+
630
+ @dataclass
631
+ class MultiAgentGlobalPredicatesSensorConfig(LabSensorConfig):
632
+ type: str = "MultiAgentGlobalPredicatesSensor"
633
+
634
+
635
+ @dataclass
636
+ class AreAgentsWithinThresholdConfig(LabSensorConfig):
637
+ type: str = "AreAgentsWithinThreshold"
638
+ x_len: Optional[float] = None
639
+ y_len: Optional[float] = None
640
+ agent_idx: int = 0
641
+
642
+
643
+ @dataclass
644
+ class HasFinishedOracleNavSensorConfig(LabSensorConfig):
645
+ type: str = "HasFinishedOracleNavSensor"
646
+
647
+
648
+ @dataclass
649
+ class HasFinishedHumanoidPickSensorConfig(LabSensorConfig):
650
+ type: str = "HasFinishedHumanoidPickSensor"
651
+
652
+
653
+ @dataclass
654
+ class OtherAgentGpsConfig(LabSensorConfig):
655
+ type: str = "OtherAgentGps"
656
+
657
+
658
+ @dataclass
659
+ class TargetStartGpsCompassSensorConfig(LabSensorConfig):
660
+ r"""
661
+ Rearrangement only. Returns the initial position of every object that needs to be rearranged in composite tasks, in 2D polar coordinates.
662
+ """
663
+ type: str = "TargetStartGpsCompassSensor"
664
+
665
+
666
+ @dataclass
667
+ class InitialGpsCompassSensorConfig(LabSensorConfig):
668
+ r"""
669
+ Rearrangement only. Returns the relative distance to the initial starting location of the agent in 2D polar coordinates.
670
+ """
671
+ type: str = "InitialGpsCompassSensor"
672
+
673
+
674
+ @dataclass
675
+ class TargetGoalGpsCompassSensorConfig(LabSensorConfig):
676
+ r"""
677
+ Rearrangement only. Returns the desired goal position of every object that needs to be rearranged in composite tasks, in 2D polar coordinates.
678
+ """
679
+ type: str = "TargetGoalGpsCompassSensor"
680
+
681
+
682
+ @dataclass
683
+ class NavToSkillSensorConfig(LabSensorConfig):
684
+ type: str = "NavToSkillSensor"
685
+ num_skills: int = 8
686
+
687
+
688
+ @dataclass
689
+ class AbsTargetStartSensorConfig(LabSensorConfig):
690
+ type: str = "AbsTargetStartSensor"
691
+ goal_format: str = "CARTESIAN"
692
+ dimensionality: int = 3
693
+
694
+
695
+ @dataclass
696
+ class AbsGoalSensorConfig(LabSensorConfig):
697
+ type: str = "AbsGoalSensor"
698
+ goal_format: str = "CARTESIAN"
699
+ dimensionality: int = 3
700
+
701
+
702
+ @dataclass
703
+ class DistToNavGoalSensorConfig(LabSensorConfig):
704
+ type: str = "DistToNavGoalSensor"
705
+
706
+
707
+ @dataclass
708
+ class LocalizationSensorConfig(LabSensorConfig):
709
+ type: str = "LocalizationSensor"
710
+
711
+
712
+ @dataclass
713
+ class QuestionSensorConfig(LabSensorConfig):
714
+ type: str = "QuestionSensor"
715
+
716
+
717
+ @dataclass
718
+ class InstructionSensorConfig(LabSensorConfig):
719
+ type: str = "InstructionSensor"
720
+ instruction_sensor_uuid: str = "instruction"
721
+
722
+
723
+ # -----------------------------------------------------------------------------
724
+ # Measurements
725
+ # -----------------------------------------------------------------------------
726
+ @dataclass
727
+ class MeasurementConfig(HabitatBaseConfig):
728
+ type: str = MISSING
729
+
730
+
731
+ @dataclass
732
+ class SuccessMeasurementConfig(MeasurementConfig):
733
+ r"""
734
+ For Navigation tasks only, Measures 1.0 if the robot reached a success and 0 otherwise.
735
+ A success is defined as calling the `StopAction` when the `DistanceToGoal`
736
+ Measure is smaller than `success_distance`.
737
+
738
+ :property success_distance: The minimal distance the robot must be to the goal for a success.
739
+ """
740
+ type: str = "Success"
741
+ success_distance: float = 0.2
742
+
743
+
744
+ @dataclass
745
+ class SPLMeasurementConfig(MeasurementConfig):
746
+ r"""
747
+ For Navigation tasks only, Measures the SPL (Success weighted by Path Length)
748
+ ref: On Evaluation of Embodied Agents - Anderson et. al
749
+ https://arxiv.org/pdf/1807.06757.pdf
750
+ Measure is always 0 except at success where it will be
751
+ the ratio of the optimal distance from start to goal over the total distance
752
+ traveled by the agent. Maximum value is 1.
753
+ SPL = success * optimal_distance_to_goal / distance_traveled_so_far
754
+ """
755
+ type: str = "SPL"
756
+
757
+
758
+ @dataclass
759
+ class SoftSPLMeasurementConfig(MeasurementConfig):
760
+ r"""
761
+ For Navigation tasks only, Similar to SPL, but instead of a boolean,
762
+ success is now calculated as 1 - (ratio of distance covered to target).
763
+ SoftSPL = max(0, 1 - distance_to_goal / optimal_distance_to_goal) * optimal_distance_to_goal / distance_traveled_so_far
764
+ """
765
+ type: str = "SoftSPL"
766
+
767
+
768
+ @dataclass
769
+ class FogOfWarConfig:
770
+ draw: bool = True
771
+ visibility_dist: float = 5.0
772
+ fov: int = 90
773
+
774
+
775
+ @dataclass
776
+ class TopDownMapMeasurementConfig(MeasurementConfig):
777
+ type: str = "TopDownMap"
778
+ max_episode_steps: int = (
779
+ EnvironmentConfig().max_episode_steps
780
+ ) # TODO : Use OmegaConf II()
781
+ map_padding: int = 3
782
+ map_resolution: int = 1024
783
+ draw_source: bool = True
784
+ draw_border: bool = True
785
+ draw_shortest_path: bool = True
786
+ draw_view_points: bool = True
787
+ draw_goal_positions: bool = True
788
+ # axes aligned bounding boxes
789
+ draw_goal_aabbs: bool = True
790
+ fog_of_war: FogOfWarConfig = FogOfWarConfig()
791
+
792
+
793
+ @dataclass
794
+ class CollisionsMeasurementConfig(MeasurementConfig):
795
+ type: str = "Collisions"
796
+
797
+
798
+ @dataclass
799
+ class RuntimePerfStatsMeasurementConfig(MeasurementConfig):
800
+ """
801
+ If added to the measurements, this will time various sections of code in
802
+ the simulator and task logic. If using with a multi-environment trainer
803
+ (like DD-PPO) it is recommended to only log this stat for one environment
804
+ since this metric can include many numbers.
805
+ """
806
+
807
+ type: str = "RuntimePerfStats"
808
+ disable_logging: bool = False
809
+
810
+
811
+ @dataclass
812
+ class RobotForceMeasurementConfig(MeasurementConfig):
813
+ r"""
814
+ The amount of force in newton's applied by the robot. It computes both the instant and accumulated.
815
+ """
816
+ type: str = "RobotForce"
817
+ min_force: float = 20.0
818
+
819
+
820
+ @dataclass
821
+ class ForceTerminateMeasurementConfig(MeasurementConfig):
822
+ r"""
823
+ If the force is greater than a certain threshold, this measure will be 1.0 and 0.0 otherwise.
824
+ Note that if the measure is 1.0, the task will end as a result.
825
+
826
+ :property max_accum_force: The threshold for the accumulated force. -1 is no threshold.
827
+ :property max_instant_force: The threshold for the current, instant force. -1 is no threshold.
828
+ """
829
+ type: str = "ForceTerminate"
830
+ max_accum_force: float = -1.0
831
+ max_instant_force: float = -1.0
832
+
833
+
834
+ @dataclass
835
+ class RobotCollisionsMeasurementConfig(MeasurementConfig):
836
+ type: str = "RobotCollisions"
837
+
838
+
839
+ @dataclass
840
+ class ObjectToGoalDistanceMeasurementConfig(MeasurementConfig):
841
+ r"""
842
+ In rearrangement only. The distance between the target object and the goal position for the object.
843
+ """
844
+ type: str = "ObjectToGoalDistance"
845
+
846
+
847
+ @dataclass
848
+ class EndEffectorToObjectDistanceMeasurementConfig(MeasurementConfig):
849
+ type: str = "EndEffectorToObjectDistance"
850
+ # Normally, we compute the L2 distance between the gripper and the object. However,
851
+ # sometimes we also want to make sure that the gripper is facing the object with a right angle/orientation.
852
+ # For instance, the gripper could face vertically on top of the object.
853
+ if_consider_gaze_angle: bool = False
854
+ # The vector that the camera's line of sight should be when grasping the object.
855
+ center_cone_vector: Optional[List[float]] = None
856
+ # Normally, you want the L2 distance between the gripper and the object as small as possible.
857
+ # However, there are cases where you want to constrain the distance to be close to a specific value.
858
+ desire_distance_between_gripper_object: float = 0.0
859
+
860
+
861
+ @dataclass
862
+ class BaseToObjectDistanceMeasurementConfig(MeasurementConfig):
863
+ """L2 distance between the base and the object"""
864
+
865
+ type: str = "BaseToObjectDistance"
866
+
867
+
868
+ @dataclass
869
+ class EndEffectorToRestDistanceMeasurementConfig(MeasurementConfig):
870
+ """
871
+ Rearrangement only. Distance between current end effector position
872
+ and the resting position of the end effector. Requires that the
873
+ RelativeRestingPositionSensor is attached to the agent.
874
+ """
875
+
876
+ type: str = "EndEffectorToRestDistance"
877
+
878
+
879
+ @dataclass
880
+ class EndEffectorToGoalDistanceMeasurementConfig(MeasurementConfig):
881
+ type: str = "EndEffectorToGoalDistance"
882
+
883
+
884
+ @dataclass
885
+ class ArtObjAtDesiredStateMeasurementConfig(MeasurementConfig):
886
+ r"""
887
+ Rearrangement open/close container tasks only. Whether the articulated object (fridge or cabinet door) towards a desired state (open or closed) as defined by the task.
888
+ """
889
+ type: str = "ArtObjAtDesiredState"
890
+ use_absolute_distance: bool = True
891
+ success_dist_threshold: float = 0.05
892
+
893
+
894
+ @dataclass
895
+ class GfxReplayMeasureMeasurementConfig(MeasurementConfig):
896
+ type: str = "GfxReplayMeasure"
897
+
898
+
899
+ @dataclass
900
+ class EndEffectorDistToMarkerMeasurementConfig(MeasurementConfig):
901
+ type: str = "EndEffectorDistToMarker"
902
+
903
+
904
+ @dataclass
905
+ class ArtObjStateMeasurementConfig(MeasurementConfig):
906
+ type: str = "ArtObjState"
907
+
908
+
909
+ @dataclass
910
+ class ArtObjSuccessMeasurementConfig(MeasurementConfig):
911
+ r"""
912
+ Rearrangement open/close container tasks only. Requires art_obj_at_desired_state. Is 1.0 if the articulated object is in desired state and the end effector is within rest_dist_threshold of the resting position. If must_call_stop is True, the robot must also call the rearrange_stop action.
913
+ """
914
+ type: str = "ArtObjSuccess"
915
+ rest_dist_threshold: float = 0.15
916
+ must_call_stop: bool = True
917
+
918
+
919
+ @dataclass
920
+ class ArtObjRewardMeasurementConfig(MeasurementConfig):
921
+ r"""
922
+ Rearrangement open/close container tasks only. Requires art_obj_at_desired_state.
923
+
924
+ :property dist_reward: At each step, the measure adds dist_reward times the distance the end effector moved towards the articulated object.
925
+ :property wrong_grasp_end: If true, the task will end if the robot picks the wrong articulated object.
926
+ :property wrong_grasp_pen: The penalty for picking the wrong articulated object.
927
+ :property art_dist_reward: At each step, increments the reward by the amount the articulated moved in the correct direction.
928
+ :property art_at_desired_state_reward: The reward for putting the articulated object in the right state.
929
+ :property grasp_reward: The reward for grasping the correct articulated object.
930
+ """
931
+ type: str = "ArtObjReward"
932
+ dist_reward: float = 1.0
933
+ wrong_grasp_end: bool = False
934
+ wrong_grasp_pen: float = 5.0
935
+ art_dist_reward: float = 10.0
936
+ ee_dist_reward: float = 10.0
937
+ marker_dist_reward: float = 0.0
938
+ art_at_desired_state_reward: float = 5.0
939
+ grasp_reward: float = 0.0
940
+ # General Rearrange Reward config
941
+ constraint_violate_pen: float = 10.0
942
+ force_pen: float = 0.0
943
+ max_force_pen: float = 1.0
944
+ force_end_pen: float = 10.0
945
+ count_coll_pen: float = -1.0
946
+ max_count_colls: int = -1
947
+ count_coll_end_pen: float = 1.0
948
+
949
+
950
+ @dataclass
951
+ class RotDistToGoalMeasurementConfig(MeasurementConfig):
952
+ r"""
953
+ Rearrangement Navigation task only. The angle between the forward direction of the agent and the direction to the goal location.
954
+ """
955
+ type: str = "RotDistToGoal"
956
+
957
+
958
+ @dataclass
959
+ class DistToGoalMeasurementConfig(MeasurementConfig):
960
+ type: str = "DistToGoal"
961
+
962
+
963
+ @dataclass
964
+ class BadCalledTerminateMeasurementConfig(MeasurementConfig):
965
+ type: str = "BadCalledTerminate"
966
+ bad_term_pen: float = 0.0
967
+ decay_bad_term: bool = False
968
+
969
+
970
+ @dataclass
971
+ class NavToPosSuccMeasurementConfig(MeasurementConfig):
972
+ r"""
973
+ Rearrangement Navigation task only. The value is 1.0 if the robot is within success_distance of the goal position.
974
+ """
975
+ type: str = "NavToPosSucc"
976
+ success_distance: float = 1.5
977
+
978
+
979
+ @dataclass
980
+ class SocialNavStatsMeasurementConfig(MeasurementConfig):
981
+ r"""
982
+ Social nav stats computation
983
+ """
984
+ type: str = "SocialNavStats"
985
+ # Check if the human is inside the frame or not
986
+ check_human_in_frame: bool = False
987
+ # The safety distance
988
+ min_dis_human: float = 1.0
989
+ max_dis_human: float = 2.0
990
+ # The human id
991
+ human_id: int = 100
992
+ # The pixel needed
993
+ human_detect_pixel_threshold: int = 1000
994
+ # The total number of steps
995
+ total_steps: int = 1500
996
+ # If we want to compute the shortest path to human
997
+ enable_shortest_path_computation: bool = False
998
+ # The min distance for considering backup and yield motions
999
+ dis_threshold_for_backup_yield: float = 1.5
1000
+ # The min vel for considering yield motion
1001
+ min_abs_vel_for_yield: float = 1.0
1002
+ # The dot product value for considering that the robot is facing human
1003
+ robot_face_human_threshold: float = 0.5
1004
+ # Agent ids
1005
+ robot_idx: int = 0
1006
+ human_idx: int = 1
1007
+
1008
+
1009
+ @dataclass
1010
+ class NavSeekSuccessMeasurementConfig(MeasurementConfig):
1011
+ r"""
1012
+ Social nav seek success measurement
1013
+ """
1014
+ type: str = "SocialNavSeekSuccess"
1015
+ # If the robot needs to look at the target
1016
+ must_look_at_targ: bool = True
1017
+ must_call_stop: bool = True
1018
+ # distance in radians.
1019
+ success_angle_dist: float = 0.261799
1020
+ # distance
1021
+ following_step_succ_threshold: int = 800
1022
+ safe_dis_min: float = 1.0
1023
+ safe_dis_max: float = 2.0
1024
+ need_to_face_human: bool = False
1025
+ use_geo_distance: bool = False
1026
+ facing_threshold: float = 0.5
1027
+ # Set the agent ids
1028
+ robot_idx: int = 0
1029
+ human_idx: int = 1
1030
+
1031
+
1032
+ @dataclass
1033
+ class NavToObjRewardMeasurementConfig(MeasurementConfig):
1034
+ r"""
1035
+ Rearrangement Navigation task only. The reward for rearrangement navigation.
1036
+
1037
+ :property dist_reward: At each step, the measure adds dist_reward times the distance the robot's base moved towards the goal position.
1038
+ :property should_reward_turn: If true, the robot receives a reward for turning towards the target position.
1039
+ :property angle_dist_reward: The reward multiplier for the robot turning towards the goal position.
1040
+ """
1041
+ type: str = "NavToObjReward"
1042
+ # reward the agent for facing the object?
1043
+ should_reward_turn: bool = True
1044
+ # what distance do we start giving the reward for facing the object?
1045
+ turn_reward_dist: float = 3.0
1046
+ # multiplier on the angle distance to the goal.
1047
+ angle_dist_reward: float = 1.0
1048
+ dist_reward: float = 1.0
1049
+ constraint_violate_pen: float = 1.0
1050
+ force_pen: float = 0.0001
1051
+ max_force_pen: float = 0.01
1052
+ force_end_pen: float = 1.0
1053
+ count_coll_pen: float = -1.0
1054
+ max_count_colls: int = -1
1055
+ count_coll_end_pen: float = 1.0
1056
+
1057
+
1058
+ @dataclass
1059
+ class NavToObjSuccessMeasurementConfig(MeasurementConfig):
1060
+ r"""
1061
+ Rearrangement Navigation only. Takes the value 1.0 when the Robot successfully navigated to the target object. Depends on nav_to_pos_succ.
1062
+
1063
+ :property must_look_at_targ: If true, the robot must be facing the correct object in addition to being close to it.
1064
+ :property must_call_stop: If true, the robot must in addition, call the rearrange_stop action for this measure to be a success.
1065
+ :property success_angle_dist: When the robot must look at the target, this is the maximum angle in radians the robot can have when facing the object.
1066
+ """
1067
+ type: str = "NavToObjSuccess"
1068
+ must_look_at_targ: bool = True
1069
+ must_call_stop: bool = True
1070
+ # distance in radians.
1071
+ success_angle_dist: float = 0.261799
1072
+
1073
+
1074
+ @dataclass
1075
+ class RearrangeReachRewardMeasurementConfig(MeasurementConfig):
1076
+ type: str = "RearrangeReachReward"
1077
+ scale: float = 1.0
1078
+ diff_reward: bool = True
1079
+ sparse_reward: bool = False
1080
+
1081
+
1082
+ @dataclass
1083
+ class RearrangeReachSuccessMeasurementConfig(MeasurementConfig):
1084
+ type: str = "RearrangeReachSuccess"
1085
+ succ_thresh: float = 0.2
1086
+
1087
+
1088
+ @dataclass
1089
+ class NumStepsMeasurementConfig(MeasurementConfig):
1090
+ r"""
1091
+ In both Navigation and Rearrangement tasks, counts the number of steps since
1092
+ the start of the episode.
1093
+ """
1094
+ type: str = "NumStepsMeasure"
1095
+
1096
+
1097
+ @dataclass
1098
+ class ZeroMeasurementConfig(MeasurementConfig):
1099
+ r"""
1100
+ Always returns 0. Can we used for a sparse reward or a task without any
1101
+ success criteria.
1102
+ """
1103
+ type: str = "ZeroMeasure"
1104
+
1105
+
1106
+ @dataclass
1107
+ class DidPickObjectMeasurementConfig(MeasurementConfig):
1108
+ type: str = "DidPickObjectMeasure"
1109
+
1110
+
1111
+ @dataclass
1112
+ class DidViolateHoldConstraintMeasurementConfig(MeasurementConfig):
1113
+ type: str = "DidViolateHoldConstraintMeasure"
1114
+
1115
+
1116
+ @dataclass
1117
+ class MoveObjectsRewardMeasurementConfig(MeasurementConfig):
1118
+ type: str = "MoveObjectsReward"
1119
+ pick_reward: float = 1.0
1120
+ success_dist: float = 0.15
1121
+ single_rearrange_reward: float = 1.0
1122
+ dist_reward: float = 1.0
1123
+ constraint_violate_pen: float = 10.0
1124
+ force_pen: float = 0.001
1125
+ max_force_pen: float = 1.0
1126
+ force_end_pen: float = 10.0
1127
+ count_coll_pen: float = -1.0
1128
+ max_count_colls: int = -1
1129
+ count_coll_end_pen: float = 1.0
1130
+
1131
+
1132
+ @dataclass
1133
+ class RearrangePickRewardMeasurementConfig(MeasurementConfig):
1134
+ r"""
1135
+ Rearrangement Only. Requires the end_effector_sensor lab sensor. The reward for the pick task.
1136
+
1137
+ :property dist_reward: At each step, the measure adds dist_reward times the distance the end effector moved towards the target.
1138
+ :property pick_reward: If the robot picks the target object, it receives pick_reward reward.
1139
+ :property drop_pen: The penalty for dropping the object.
1140
+ :property wrong_pick_pen: The penalty for picking the wrong object.
1141
+ :property force_pen: At each step, adds a penalty of force_pen times the current force on the robot.
1142
+ :property drop_obj_should_end: If true, the task will end if the robot drops the object.
1143
+ :property wrong_pick_should_end: If true, the task will end if the robot picks the wrong object.
1144
+ :property max_target_distance: default: -1. If it is positive, then we terminate the episode if the robot distance to object is above this value.
1145
+ :property max_target_distance_pen: If the robot is too far away, then we terminate the episode by giving the penality.
1146
+ :property non_desire_ee_local_pos_dis: default: -1. If positive, we terminate the episode if the robot moves the arm below this threshold
1147
+ :property non_desire_ee_local_pos_pen: If the robot moves the arm there, then we terminate the episode by giving the penality.
1148
+ :property non_desire_ee_local_pos: If given, we do not want the robot to move the arm there
1149
+ :property camera_looking_down_angle: default: -1. If positive, we check the robot camera looking angle to the ground
1150
+ :property camera_looking_down_pen: If the robot camera looking angle is too small (the robot looks down), we terminate the episode and with this much penality
1151
+ """
1152
+ type: str = "RearrangePickReward"
1153
+ dist_reward: float = 2.0
1154
+ pick_reward: float = 2.0
1155
+ constraint_violate_pen: float = 1.0
1156
+ drop_pen: float = 0.5
1157
+ wrong_pick_pen: float = 0.5
1158
+ force_pen: float = 0.0001
1159
+ max_force_pen: float = 0.01
1160
+ force_end_pen: float = 1.0
1161
+ use_diff: bool = True
1162
+ drop_obj_should_end: bool = True
1163
+ wrong_pick_should_end: bool = True
1164
+ count_coll_pen: float = -1.0
1165
+ max_count_colls: int = -1
1166
+ count_coll_end_pen: float = 1.0
1167
+ max_target_distance: float = -1.0
1168
+ max_target_distance_pen: float = 1.0
1169
+ non_desire_ee_local_pos_dis: float = -1.0
1170
+ non_desire_ee_local_pos_pen: float = 1.0
1171
+ non_desire_ee_local_pos: Optional[List[float]] = None
1172
+ camera_looking_down_angle: float = -1.0
1173
+ camera_looking_down_pen: float = 1.0
1174
+
1175
+
1176
+ @dataclass
1177
+ class RearrangePickSuccessMeasurementConfig(MeasurementConfig):
1178
+ r"""
1179
+ Rearrangement Only. Requires the end_effector_sensor lab sensor. 1.0 if the robot picked the target object.
1180
+
1181
+ :property ee_resting_success_threshold: -1 if we do not consider resetting the arm to the resting location
1182
+ """
1183
+ type: str = "RearrangePickSuccess"
1184
+ ee_resting_success_threshold: float = 0.15
1185
+
1186
+
1187
+ @dataclass
1188
+ class ObjAtGoalMeasurementConfig(MeasurementConfig):
1189
+ r"""
1190
+ The measure is a dictionary of target indexes to float. The values are 1 if the object is within succ_thresh of the goal position for that object.
1191
+
1192
+ :property succ_thresh: The threshold distance below which an object is considered at the goal location.
1193
+ """
1194
+ type: str = "ObjAtGoal"
1195
+ succ_thresh: float = 0.15
1196
+
1197
+
1198
+ @dataclass
1199
+ class PlaceRewardMeasurementConfig(MeasurementConfig):
1200
+ r"""
1201
+ Rearrangement Only. Requires the end_effector_sensor lab sensor. The reward for the place task.
1202
+
1203
+ :property dist_reward: At each step, the measure adds dist_reward times the distance the end effector moved towards the target.
1204
+ :property place_reward: If the robot placed the target object correctly, it receives place_reward reward.
1205
+ :property drop_pen: The penalty for dropping the object.
1206
+ :property force_pen: At each step, adds a penalty of force_pen times the current force on the robot.
1207
+ :property wrong_drop_should_end: If true, the task will end if the robot drops the object.
1208
+ """
1209
+ type: str = "PlaceReward"
1210
+ dist_reward: float = 2.0
1211
+ place_reward: float = 5.0
1212
+ drop_pen: float = 0.0
1213
+ use_diff: bool = True
1214
+ use_ee_dist: bool = False
1215
+ wrong_drop_should_end: bool = True
1216
+ constraint_violate_pen: float = 0.0
1217
+ force_pen: float = 0.0001
1218
+ max_force_pen: float = 0.0
1219
+ force_end_pen: float = 1.0
1220
+ min_dist_to_goal: float = 0.15
1221
+ count_coll_pen: float = -1.0
1222
+ max_count_colls: int = -1
1223
+ count_coll_end_pen: float = 1.0
1224
+
1225
+
1226
+ @dataclass
1227
+ class PlaceSuccessMeasurementConfig(MeasurementConfig):
1228
+ r"""
1229
+ Rearrangement Only. Requires the end_effector_sensor lab sensor. 1.0 if the robot placed the target object on the goal position and has its end effector within ee_resting_success_threshold of its resting position.
1230
+ """
1231
+ type: str = "PlaceSuccess"
1232
+ ee_resting_success_threshold: float = 0.15
1233
+
1234
+
1235
+ @dataclass
1236
+ class PddlStageGoalsMeasurementConfig(MeasurementConfig):
1237
+ r"""
1238
+ PDDL Rearrangement only. 1.0 if the agent complete a particular stage defined in `stage_goals` and 0.0 otherwise. Stage goals are specified in the `pddl` task description.
1239
+ """
1240
+ type: str = "PddlStageGoals"
1241
+
1242
+
1243
+ @dataclass
1244
+ class PddlSuccessMeasurementConfig(MeasurementConfig):
1245
+ r"""
1246
+ PDDL rearrangement tasks only (rearrange, set_table, tidy_house). It uses a goal pddl expression to validate the success.
1247
+
1248
+ :property must_call_stop: If true, the robot must in addition, call the rearrange_stop action for this measure to be a success.
1249
+ """
1250
+ type: str = "PddlSuccess"
1251
+ must_call_stop: bool = True
1252
+
1253
+
1254
+ @dataclass
1255
+ class PddlSubgoalReward(MeasurementConfig):
1256
+ type: str = "PddlSubgoalReward"
1257
+ stage_sparse_reward: float = 1.0
1258
+
1259
+
1260
+ @dataclass
1261
+ class DidAgentsCollideConfig(MeasurementConfig):
1262
+ type: str = "DidAgentsCollide"
1263
+
1264
+
1265
+ @dataclass
1266
+ class NumAgentsCollideConfig(MeasurementConfig):
1267
+ type: str = "NumAgentsCollide"
1268
+
1269
+
1270
+ @dataclass
1271
+ class RearrangeCooperateRewardConfig(PddlSubgoalReward):
1272
+ type: str = "RearrangeCooperateReward"
1273
+ stage_sparse_reward: float = 1.0
1274
+ end_on_collide: bool = True
1275
+ # Positive penalty means give negative reward.
1276
+ collide_penalty: float = 1.0
1277
+
1278
+
1279
+ @dataclass
1280
+ class CooperateSubgoalRewardConfig(PddlSubgoalReward):
1281
+ type: str = "CooperateSubgoalReward"
1282
+ stage_sparse_reward: float = 1.0
1283
+ end_on_collide: bool = True
1284
+ # Positive penalty means give negative reward.
1285
+ collide_penalty: float = 1.0
1286
+
1287
+
1288
+ @dataclass
1289
+ class SocialNavReward(MeasurementConfig):
1290
+ r"""
1291
+ The reward for the social navigation tasks.
1292
+ """
1293
+ type: str = "SocialNavReward"
1294
+ # The safety distance between the robot and the human
1295
+ safe_dis_min: float = 1.0
1296
+ safe_dis_max: float = 2.0
1297
+ # If the safety distance is within the threshold, then
1298
+ # the agent receives this amount of reward
1299
+ safe_dis_reward: float = 2.0
1300
+ # If the distance is below this threshold, the robot
1301
+ # starts receiving an additional orientation reward
1302
+ facing_human_dis: float = 3.0
1303
+ # -1 means that there is no facing_human_reward
1304
+ facing_human_reward: float = -1.0
1305
+ # toward_human_reward default is 1.0
1306
+ toward_human_reward: float = 1.0
1307
+ # -1 means that there is no near_human_bonus
1308
+ near_human_bonus: float = -1.0
1309
+ # -1 means that there is no exploration reward
1310
+ explore_reward: float = -1.0
1311
+ # If we want to use geo distance to measure the distance
1312
+ # between the robot and the human
1313
+ use_geo_distance: bool = False
1314
+ # Set the id of the agent
1315
+ robot_idx: int = 0
1316
+ human_idx: int = 1
1317
+ constraint_violate_pen: float = 10.0
1318
+ force_pen: float = 0.0
1319
+ max_force_pen: float = 1.0
1320
+ force_end_pen: float = 10.0
1321
+ # Collision based penality for kinematic simulation
1322
+ count_coll_pen: float = -1.0
1323
+ max_count_colls: int = -1
1324
+ count_coll_end_pen: float = 1.0
1325
+ collide_penalty: float = 1.0
1326
+
1327
+
1328
+ @dataclass
1329
+ class DoesWantTerminateMeasurementConfig(MeasurementConfig):
1330
+ r"""
1331
+ Rearrangement Only. Measures 1 if the agent has called the stop action and 0 otherwise.
1332
+ """
1333
+ type: str = "DoesWantTerminate"
1334
+
1335
+
1336
+ @dataclass
1337
+ class CorrectAnswerMeasurementConfig(MeasurementConfig):
1338
+ type: str = "CorrectAnswer"
1339
+
1340
+
1341
+ @dataclass
1342
+ class EpisodeInfoMeasurementConfig(MeasurementConfig):
1343
+ type: str = "EpisodeInfo"
1344
+
1345
+
1346
+ @dataclass
1347
+ class DistanceToGoalMeasurementConfig(MeasurementConfig):
1348
+ r"""
1349
+ In Navigation tasks only, measures the geodesic distance to the goal.
1350
+
1351
+ :property distance_to: If 'POINT' measures the distance to the closest episode goal. If 'VIEW_POINTS' measures the distance to the episode's goal's viewpoint.
1352
+ """
1353
+ type: str = "DistanceToGoal"
1354
+ distance_to: str = "POINT"
1355
+
1356
+
1357
+ @dataclass
1358
+ class DistanceToGoalRewardMeasurementConfig(MeasurementConfig):
1359
+ r"""
1360
+ In Navigation tasks only, measures a reward based on the distance towards the goal.
1361
+ The reward is `- (new_distance - previous_distance)` i.e. the
1362
+ decrease of distance to the goal.
1363
+ """
1364
+ type: str = "DistanceToGoalReward"
1365
+
1366
+
1367
+ @dataclass
1368
+ class AnswerAccuracyMeasurementConfig(MeasurementConfig):
1369
+ type: str = "AnswerAccuracy"
1370
+
1371
+
1372
+ @dataclass
1373
+ class TaskConfig(HabitatBaseConfig):
1374
+ r"""
1375
+ The definition of the task in Habitat.
1376
+
1377
+ :property type: The registered task that will be used. For example : `InstanceImageNav-v1` or `ObjectNav-v1`
1378
+ :property physics_target_sps: The size of each simulator physics update will be 1 / physics_target_sps.
1379
+ :property reward_measure: The name of the Measurement that will correspond to the reward of the robot. This value must be a key present in the dictionary of Measurements in the habitat configuration. For example, `distance_to_goal_reward` for navigation or `place_reward` for the rearrangement place task.
1380
+ :property success_measure: The name of the Measurement that will correspond to the success criteria of the robot. This value must be a key present in the dictionary of Measurements in the habitat configuration. If the measurement has a non-zero value, the episode is considered a success.
1381
+ :property end_on_success: If True, the episode will end when the success measure indicates success. Otherwise the episode will go on (this is useful when doing hierarchical learning and the robot has to explicitly decide when to change policies)
1382
+ :property task_spec: When doing the `RearrangePddlTask-v0` only, will look for a pddl plan of that name to determine the sequence of tasks that need to be completed. The format of the pddl plans files is undocumented.
1383
+ :property task_spec_base_path: When doing the `RearrangePddlTask-v0` only, the relative path where the task_spec file will be searched.
1384
+ :property spawn_max_dists_to_obj: For `RearrangePickTask-v0` task only. Controls the maximum distance the robot can be spawned from the target object.
1385
+ :property base_angle_noise: For Rearrangement tasks only. Controls the standard deviation of the random normal noise applied to the base's rotation angle at the start of an episode.
1386
+ :property base_noise: For Rearrangement tasks only. Controls the standard deviation of the random normal noise applied to the base's position at the start of an episode.
1387
+
1388
+ There are many different Tasks determined by the `habitat.task.type` config:
1389
+
1390
+ - Point navigation : `Nav-0`
1391
+ - Image navigation : `Nav-0`
1392
+ - Instance image navigation:`InstanceImageNav-v1`
1393
+ - Object navigation : `ObjectNav-v1`
1394
+ - Rearrangement close drawer: `RearrangeCloseDrawerTask-v0`
1395
+ - Rearrangement open drawer: `RearrangeOpenDrawerTask-v0`
1396
+ - Rearrangement close fridge : `RearrangeCloseFridgeTask-v0`
1397
+ - Rearrangement open fridge : `RearrangeOpenFridgeTask-v0`
1398
+ - Rearrangement navigate to object : `NavToObjTask-v0`
1399
+ - Rearrangement pick : `RearrangePickTask-v0`
1400
+ - Rearrangement place : `RearrangePlaceTask-v0`
1401
+ - Rearrangement do nothing : `RearrangeEmptyTask-v0`
1402
+ - Rearrangement reach : `RearrangeReachTask-v0`
1403
+ - Rearrangement composite tasks : `RearrangePddlTask-v0`
1404
+ """
1405
+ physics_target_sps: float = 60.0
1406
+ reward_measure: Optional[str] = None
1407
+ success_measure: Optional[str] = None
1408
+ success_reward: float = 2.5
1409
+ slack_reward: float = -0.01
1410
+ end_on_success: bool = False
1411
+ # NAVIGATION task
1412
+ type: str = "Nav-v0"
1413
+ # Temporary structure for sensors
1414
+ lab_sensors: Dict[str, LabSensorConfig] = field(default_factory=dict)
1415
+ measurements: Dict[str, MeasurementConfig] = field(default_factory=dict)
1416
+ # Measures to only construct in the first environment of the first rank for
1417
+ # vectorized environments.
1418
+ rank0_env0_measure_names: List[str] = field(
1419
+ default_factory=lambda: ["habitat_perf"]
1420
+ )
1421
+ # Measures to only record in the first rank for vectorized environments.
1422
+ rank0_measure_names: List[str] = field(default_factory=list)
1423
+ goal_sensor_uuid: str = "pointgoal"
1424
+ # REARRANGE task
1425
+ count_obj_collisions: bool = True
1426
+ settle_steps: int = 5
1427
+ constraint_violation_ends_episode: bool = True
1428
+ constraint_violation_drops_object: bool = False
1429
+ # Forced to regenerate the starts even if they are already cached
1430
+ force_regenerate: bool = False
1431
+ # Saves the generated starts to a cache if they are not already generated
1432
+ should_save_to_cache: bool = False
1433
+ object_in_hand_sample_prob: float = 0.167
1434
+ min_start_distance: float = 3.0
1435
+ gfx_replay_dir = "data/replays"
1436
+ render_target: bool = True
1437
+ # Spawn parameters
1438
+ filter_colliding_states: bool = True
1439
+ num_spawn_attempts: int = 200
1440
+ spawn_max_dist_to_obj: float = 2.0
1441
+ base_angle_noise: float = 0.523599
1442
+ spawn_max_dist_to_obj_delta: float = 0.02
1443
+ # Factor to shrink the receptacle sampling volume when predicates place
1444
+ # objects on top of receptacles.
1445
+ recep_place_shrink_factor: float = 0.8
1446
+ # EE sample parameters
1447
+ ee_sample_factor: float = 0.2
1448
+ ee_exclude_region: float = 0.0
1449
+ base_noise: float = 0.05
1450
+ spawn_region_scale: float = 0.2
1451
+ joint_max_impulse: float = -1.0
1452
+ desired_resting_position: List[float] = field(
1453
+ default_factory=lambda: [0.5, 0.0, 1.0]
1454
+ )
1455
+ use_marker_t: bool = True
1456
+ cache_robot_init: bool = False
1457
+ success_state: float = 0.0
1458
+ # Measurements for composite tasks.
1459
+ should_enforce_target_within_reach: bool = False
1460
+ # COMPOSITE task CONFIG
1461
+ task_spec_base_path: str = "habitat/task/rearrange/pddl/"
1462
+ task_spec: str = ""
1463
+ # PDDL domain params
1464
+ pddl_domain_def: str = "replica_cad"
1465
+ obj_succ_thresh: float = 0.3
1466
+ # Disable drop except for when the object is at its goal.
1467
+ enable_safe_drop: bool = False
1468
+ art_succ_thresh: float = 0.15
1469
+ robot_at_thresh: float = 2.0
1470
+
1471
+ # The minimum distance between the agents at start. If < 0
1472
+ # there is no minimal distance
1473
+ min_distance_start_agents: float = -1.0
1474
+ actions: Dict[str, ActionConfig] = MISSING
1475
+
1476
+
1477
+ @dataclass
1478
+ class SimulatorSensorConfig(HabitatBaseConfig):
1479
+ type: str = MISSING
1480
+ height: int = 480
1481
+ width: int = 640
1482
+ position: List[float] = field(default_factory=lambda: [0.0, 1.25, 0.0])
1483
+ # Euler's angles:
1484
+ orientation: List[float] = field(default_factory=lambda: [0.0, 0.0, 0.0])
1485
+
1486
+
1487
+ @dataclass
1488
+ class SimulatorCameraSensorConfig(SimulatorSensorConfig):
1489
+ hfov: int = 90 # horizontal field of view in degrees
1490
+ sensor_subtype: str = "PINHOLE"
1491
+ noise_model: str = "None"
1492
+ noise_model_kwargs: Dict[str, Any] = field(default_factory=dict)
1493
+
1494
+
1495
+ @dataclass
1496
+ class SimulatorDepthSensorConfig(SimulatorSensorConfig):
1497
+ min_depth: float = 0.0
1498
+ max_depth: float = 10.0
1499
+ normalize_depth: bool = True
1500
+
1501
+
1502
+ @dataclass
1503
+ class HabitatSimRGBSensorConfig(SimulatorCameraSensorConfig):
1504
+ type: str = "HabitatSimRGBSensor"
1505
+
1506
+
1507
+ @dataclass
1508
+ class HabitatSimDepthSensorConfig(SimulatorCameraSensorConfig):
1509
+ type: str = "HabitatSimDepthSensor"
1510
+ min_depth: float = 0.0
1511
+ max_depth: float = 10.0
1512
+ normalize_depth: bool = True
1513
+
1514
+
1515
+ @dataclass
1516
+ class HabitatSimSemanticSensorConfig(SimulatorCameraSensorConfig):
1517
+ type: str = "HabitatSimSemanticSensor"
1518
+
1519
+
1520
+ @dataclass
1521
+ class HabitatSimEquirectangularRGBSensorConfig(SimulatorSensorConfig):
1522
+ type: str = "HabitatSimEquirectangularRGBSensor"
1523
+
1524
+
1525
+ @dataclass
1526
+ class HabitatSimEquirectangularDepthSensorConfig(SimulatorDepthSensorConfig):
1527
+ type: str = "HabitatSimEquirectangularDepthSensor"
1528
+
1529
+
1530
+ @dataclass
1531
+ class HabitatSimEquirectangularSemanticSensorConfig(SimulatorSensorConfig):
1532
+ type: str = "HabitatSimEquirectangularSemanticSensor"
1533
+
1534
+
1535
+ @dataclass
1536
+ class SimulatorFisheyeSensorConfig(SimulatorSensorConfig):
1537
+ type: str = "HabitatSimFisheyeSensor"
1538
+ height: int = SimulatorSensorConfig().width
1539
+ # The default value (alpha, xi) is set to match the lens "GoPro" found in
1540
+ # Table 3 of this paper: Vladyslav Usenko, Nikolaus Demmel and
1541
+ # Daniel Cremers: The Double Sphere Camera Model,
1542
+ # The International Conference on 3D Vision (3DV), 2018
1543
+ # You can find the intrinsic parameters for the other lenses
1544
+ # in the same table as well.
1545
+ xi: float = -0.27
1546
+ alpha: float = 0.57
1547
+ focal_length: List[float] = field(default_factory=lambda: [364.84, 364.86])
1548
+ # Place camera at center of screen
1549
+ # Can be specified, otherwise is calculated automatically.
1550
+ # principal_point_offset defaults to (h/2,w/2)
1551
+ principal_point_offset: Optional[List[float]] = None
1552
+ sensor_model_type: str = "DOUBLE_SPHERE"
1553
+
1554
+
1555
+ @dataclass
1556
+ class HabitatSimFisheyeRGBSensorConfig(SimulatorFisheyeSensorConfig):
1557
+ type: str = "HabitatSimFisheyeRGBSensor"
1558
+
1559
+
1560
+ @dataclass
1561
+ class SimulatorFisheyeDepthSensorConfig(SimulatorFisheyeSensorConfig):
1562
+ type: str = "HabitatSimFisheyeDepthSensor"
1563
+ min_depth: float = SimulatorDepthSensorConfig().min_depth
1564
+ max_depth: float = SimulatorDepthSensorConfig().max_depth
1565
+ normalize_depth: bool = SimulatorDepthSensorConfig().normalize_depth
1566
+
1567
+
1568
+ @dataclass
1569
+ class HabitatSimFisheyeSemanticSensorConfig(SimulatorFisheyeSensorConfig):
1570
+ type: str = "HabitatSimFisheyeSemanticSensor"
1571
+
1572
+
1573
+ @dataclass
1574
+ class HeadRGBSensorConfig(HabitatSimRGBSensorConfig):
1575
+ uuid: str = "head_rgb"
1576
+ width: int = 256
1577
+ height: int = 256
1578
+
1579
+
1580
+ @dataclass
1581
+ class HeadDepthSensorConfig(HabitatSimDepthSensorConfig):
1582
+ uuid: str = "head_depth"
1583
+ width: int = 256
1584
+ height: int = 256
1585
+
1586
+
1587
+ @dataclass
1588
+ class HeadStereoLeftDepthSensorConfig(HabitatSimDepthSensorConfig):
1589
+ uuid: str = "head_stereo_left_depth"
1590
+ width: int = 256
1591
+ height: int = 256
1592
+
1593
+
1594
+ @dataclass
1595
+ class HeadStereoRightDepthSensorConfig(HabitatSimDepthSensorConfig):
1596
+ uuid: str = "head_stereo_right_depth"
1597
+ width: int = 256
1598
+ height: int = 256
1599
+
1600
+
1601
+ @dataclass
1602
+ class HeadPanopticSensorConfig(HabitatSimSemanticSensorConfig):
1603
+ uuid: str = "head_panoptic"
1604
+ width: int = 256
1605
+ height: int = 256
1606
+
1607
+
1608
+ @dataclass
1609
+ class ArmPanopticSensorConfig(HabitatSimSemanticSensorConfig):
1610
+ uuid: str = "articulated_agent_arm_panoptic"
1611
+ width: int = 256
1612
+ height: int = 256
1613
+
1614
+
1615
+ @dataclass
1616
+ class JawPanopticSensorConfig(HabitatSimSemanticSensorConfig):
1617
+ uuid: str = "articulated_agent_jaw_panoptic"
1618
+ width: int = 256
1619
+ height: int = 256
1620
+
1621
+
1622
+ @dataclass
1623
+ class ArmRGBSensorConfig(HabitatSimRGBSensorConfig):
1624
+ uuid: str = "articulated_agent_arm_rgb"
1625
+ width: int = 256
1626
+ height: int = 256
1627
+
1628
+
1629
+ @dataclass
1630
+ class ArmDepthSensorConfig(HabitatSimDepthSensorConfig):
1631
+ uuid: str = "articulated_agent_arm_depth"
1632
+ width: int = 256
1633
+ height: int = 256
1634
+
1635
+
1636
+ @dataclass
1637
+ class JawRGBSensorConfig(HabitatSimRGBSensorConfig):
1638
+ uuid: str = "articulated_agent_jaw_rgb"
1639
+ width: int = 256
1640
+ height: int = 256
1641
+
1642
+
1643
+ @dataclass
1644
+ class JawDepthSensorConfig(HabitatSimDepthSensorConfig):
1645
+ uuid: str = "articulated_agent_jaw_depth"
1646
+ width: int = 256
1647
+ height: int = 256
1648
+
1649
+
1650
+ @dataclass
1651
+ class ThirdRGBSensorConfig(HabitatSimRGBSensorConfig):
1652
+ uuid: str = "third_rgb"
1653
+ width: int = 512
1654
+ height: int = 512
1655
+
1656
+
1657
+ @dataclass
1658
+ class ThirdDepthSensorConfig(HabitatSimDepthSensorConfig):
1659
+ uuid: str = "third_depth" # TODO: third_rgb on the main branch
1660
+ # check if it won't cause any errors
1661
+
1662
+
1663
+ @dataclass
1664
+ class AgentConfig(HabitatBaseConfig):
1665
+ height: float = 1.5
1666
+ radius: float = 0.1
1667
+ max_climb: float = 0.2
1668
+ max_slope: float = 45.0
1669
+ grasp_managers: int = 1
1670
+ sim_sensors: Dict[str, Any] = field(default_factory=dict)
1671
+ is_set_start_state: bool = False
1672
+ start_position: List[float] = field(default_factory=lambda: [0, 0, 0])
1673
+ start_rotation: List[float] = field(default_factory=lambda: [0, 0, 0, 1])
1674
+ joint_start_noise: float = 0.1
1675
+ joint_that_can_control: Optional[List[int]] = None
1676
+ # Hard-code the robot joint start. `joint_start_noise` still applies.
1677
+ joint_start_override: Optional[List[float]] = None
1678
+ articulated_agent_urdf: Optional[str] = None
1679
+ articulated_agent_type: Optional[str] = None
1680
+ ik_arm_urdf: Optional[str] = None
1681
+ # File to motion data, used to play pre-recorded motions
1682
+ motion_data_path: str = ""
1683
+ auto_update_sensor_transform: bool = True
1684
+ """
1685
+ If `True`, the agent's sensor transforms are automatically updated every frame.
1686
+ """
1687
+ # TODO: Remove this flag once sensors are decoupled from agents.
1688
+
1689
+
1690
+ @dataclass
1691
+ class RendererConfig(HabitatBaseConfig):
1692
+ r"""Configuration for the renderer.
1693
+
1694
+ :property enable_batch_renderer: [Experimental] Enables batch rendering, which accelerates rendering for concurrent environments. See env_batch_renderer.py for details.
1695
+ :property composite_files: List of composite GLTF files to be pre-loaded by the batch renderer.
1696
+ :property classic_replay_renderer: For debugging. Create a ClassicReplayRenderer instead of BatchReplayRenderer when enable_batch_renderer is active.
1697
+ """
1698
+
1699
+ enable_batch_renderer: bool = False
1700
+ composite_files: Optional[List[str]] = None
1701
+ classic_replay_renderer: bool = False
1702
+
1703
+
1704
+ @dataclass
1705
+ class HabitatSimV0Config(HabitatBaseConfig):
1706
+ gpu_device_id: int = 0
1707
+ # Use Habitat-Sim's GPU->GPU copy mode to return rendering results in
1708
+ # pytorch tensors. Requires Habitat-Sim to be built with --with-cuda.
1709
+ # This will generally imply sharing cuda tensors between processes.
1710
+ # Read here:
1711
+ # https://pytorch.org/docs/stable/multiprocessing.html#sharing-cuda-tensors
1712
+ # for the caveats that results in
1713
+ gpu_gpu: bool = False
1714
+ # Whether the agent slides on collisions
1715
+ allow_sliding: bool = True
1716
+ frustum_culling: bool = True
1717
+ enable_physics: bool = False
1718
+ enable_hbao: bool = False
1719
+ physics_config_file: str = "./data/default.physics_config.json"
1720
+ # Possibly unstable optimization for extra performance
1721
+ # with concurrent rendering
1722
+ leave_context_with_background_renderer: bool = False
1723
+ enable_gfx_replay_save: bool = False
1724
+
1725
+
1726
+ @dataclass
1727
+ class SimulatorConfig(HabitatBaseConfig):
1728
+ type: str = "Sim-v0"
1729
+ forward_step_size: float = 0.25 # in metres
1730
+ turn_angle: int = 10 # angle to rotate left or right in degrees
1731
+ create_renderer: bool = False
1732
+ requires_textures: bool = True
1733
+ # Sleep options
1734
+ auto_sleep: bool = False
1735
+ step_physics: bool = True
1736
+ concur_render: bool = False
1737
+ # If markers should be updated at every step:
1738
+ needs_markers: bool = True
1739
+ # If the articulated_agent camera positions should be updated at every step:
1740
+ update_articulated_agent: bool = True
1741
+ scene: str = "data/scene_datasets/habitat-test-scenes/van-gogh-room.glb"
1742
+ # The scene dataset to load in the metadatamediator,
1743
+ # should contain simulator.scene:
1744
+ scene_dataset: str = "default"
1745
+ # A list of directory or config paths to search in addition to the dataset
1746
+ # for object configs. should match the generated episodes for the task:
1747
+ additional_object_paths: List[str] = field(default_factory=list)
1748
+ # Use config.seed (can't reference Config.seed) or define via code
1749
+ # otherwise it leads to circular references:
1750
+ #
1751
+ seed: int = II("habitat.seed")
1752
+ default_agent_id: int = 0
1753
+ debug_render: bool = False
1754
+ debug_render_articulated_agent: bool = False
1755
+ kinematic_mode: bool = False
1756
+ # If False, will skip setting the semantic IDs of objects in
1757
+ # `rearrange_sim.py` (there is overhead to this operation so skip if not
1758
+ # using semantic information).
1759
+ should_setup_semantic_ids: bool = True
1760
+ # If in render mode a visualization of the rearrangement goal position
1761
+ # should also be displayed
1762
+ debug_render_goal: bool = True
1763
+ robot_joint_start_noise: float = 0.0
1764
+ # Rearrange agent setup
1765
+ ctrl_freq: float = 120.0
1766
+ ac_freq_ratio: int = 4
1767
+ load_objs: bool = True
1768
+ # Rearrange agent grasping
1769
+ hold_thresh: float = 0.15
1770
+ grasp_impulse: float = 10000.0
1771
+ # we assume agent(s) to be set explicitly
1772
+ agents: Dict[str, AgentConfig] = MISSING
1773
+ # agents_order specifies the order in which the agents
1774
+ # are stored on the habitat-sim side.
1775
+ # In other words, the order to return the observations and accept
1776
+ # the actions when using the environment API.
1777
+ # If the number of agents is greater than one,
1778
+ # then agents_order has to be set explicitly.
1779
+ agents_order: List[str] = MISSING
1780
+
1781
+ # Simulator should use default navmesh settings from agent config
1782
+ default_agent_navmesh: bool = True
1783
+ # if default navmesh is used, should it include static objects
1784
+ navmesh_include_static_objects: bool = False
1785
+
1786
+ habitat_sim_v0: HabitatSimV0Config = HabitatSimV0Config()
1787
+ # ep_info is added to the config in some rearrange tasks inside
1788
+ # merge_sim_episode_with_object_config
1789
+ ep_info: Optional[Any] = None
1790
+ # The offset id values for the object
1791
+ object_ids_start: int = 100
1792
+ # Configuration for rendering
1793
+ renderer: RendererConfig = RendererConfig()
1794
+
1795
+
1796
+ @dataclass
1797
+ class LocobotConfig(HabitatBaseConfig):
1798
+ actions: List[str] = field(
1799
+ default_factory=lambda: ["base_actions", "camera_actions"]
1800
+ )
1801
+ base_actions: List[str] = field(
1802
+ default_factory=lambda: ["go_to_relative", "go_to_absolute"]
1803
+ )
1804
+ camera_actions: List[str] = field(
1805
+ default_factory=lambda: ["set_pan", "set_tilt", "set_pan_tilt"]
1806
+ )
1807
+
1808
+
1809
+ @dataclass
1810
+ class DatasetConfig(HabitatBaseConfig):
1811
+ r"""Configuration for the dataset of the task.
1812
+
1813
+ :property type: The key for the dataset class that will be used. Examples of such keys are `PointNav-v1`, `ObjectNav-v1`, `InstanceImageNav-v1` or `RearrangeDataset-v0`. Different datasets have different properties so you should use the dataset that fits your task.
1814
+ :property scenes_dir: The path to the directory containing the scenes that will be used. You should put all your scenes in the same folder (example `data/scene_datasets`) to avoid having to change it.
1815
+ :property data_path: The path to the episode dataset. Episodes need to be compatible with the `type` argument (so they will load properly) and only use scenes that are present in the `scenes_dir`.
1816
+ :property split: `data_path` can have a `split` in the path. For example: "data/datasets/pointnav/habitat-test-scenes/v1/{split}/{split}.json.gz" the value in "{split}" will be replaced by the value of the `split` argument. This allows to easily swap between training, validation and test episodes by only changing the split argument.
1817
+ :property metadata: Optional. Additional information for interpreting the dataset.
1818
+
1819
+ A dataset consists of episodes
1820
+ (a start configuration for a task within a scene) and a scene dataset
1821
+ (with all the assets needed to instantiate the task)
1822
+ """
1823
+ type: str = "PointNav-v1"
1824
+ split: str = "train"
1825
+ scenes_dir: str = "data/scene_datasets"
1826
+ content_scenes: List[str] = field(default_factory=lambda: ["*"])
1827
+ data_path: str = (
1828
+ "data/datasets/pointnav/"
1829
+ "habitat-test-scenes/v1/{split}/{split}.json.gz"
1830
+ )
1831
+ # TODO: Make this field a structured dataclass.
1832
+ metadata: Optional[Any] = None
1833
+
1834
+
1835
+ @dataclass
1836
+ class GymConfig(HabitatBaseConfig):
1837
+ obs_keys: Optional[List[str]] = None
1838
+ action_keys: Optional[List[str]] = None
1839
+ achieved_goal_keys: List = field(default_factory=list)
1840
+ desired_goal_keys: List[str] = field(default_factory=list)
1841
+
1842
+
1843
+ @dataclass
1844
+ class HabitatConfig(HabitatBaseConfig):
1845
+ r"""
1846
+ The entry point for the configuration of Habitat. It holds the environment, simulator, task and dataset configurations.
1847
+
1848
+ :property seed: The seed the environment will be initialized with.
1849
+ :property env_task: Indicates wether the environment is a Habitat gym environment (`GymHabitatEnv`) or a generic gym environment (`GymRegistryEnv`).
1850
+ :property env_task_gym_id: if `env_task` is `GymRegistryEnv`, env_task_gym_id is the identifier of the generic gym environment
1851
+ """
1852
+ seed: int = 100
1853
+ # GymHabitatEnv works for all Habitat tasks, including Navigation and
1854
+ # Rearrange. To use a gym environment from the registry, use the
1855
+ # GymRegistryEnv. Any other environment needs to be created and registered.
1856
+ env_task: str = "GymHabitatEnv"
1857
+ # The dependencies for launching the GymRegistryEnv environments.
1858
+ # Modules listed here will be imported prior to making the environment with
1859
+ # gym.make()
1860
+ env_task_gym_dependencies: List = field(default_factory=list)
1861
+ # The key of the gym environment in the registry to use in GymRegistryEnv
1862
+ # for example: `Cartpole-v0`
1863
+ env_task_gym_id: str = ""
1864
+ environment: EnvironmentConfig = EnvironmentConfig()
1865
+ simulator: SimulatorConfig = SimulatorConfig()
1866
+ task: TaskConfig = MISSING
1867
+ dataset: DatasetConfig = MISSING
1868
+ gym: GymConfig = GymConfig()
1869
+
1870
+
1871
+ # -----------------------------------------------------------------------------
1872
+ # Register configs in the Hydra ConfigStore
1873
+ # -----------------------------------------------------------------------------
1874
+ cs = ConfigStore.instance()
1875
+
1876
+ cs.store(group="habitat", name="habitat_config_base", node=HabitatConfig)
1877
+ cs.store(
1878
+ group="habitat.environment",
1879
+ name="environment_config_schema",
1880
+ node=EnvironmentConfig,
1881
+ )
1882
+ cs.store(
1883
+ package="habitat.task",
1884
+ group="habitat/task",
1885
+ name="task_config_base",
1886
+ node=TaskConfig,
1887
+ )
1888
+
1889
+ # Agent Config
1890
+ cs.store(
1891
+ group="habitat/simulator/agents",
1892
+ name="agent_base",
1893
+ node=AgentConfig,
1894
+ )
1895
+
1896
+ cs.store(
1897
+ package="habitat.task.actions.stop",
1898
+ group="habitat/task/actions",
1899
+ name="stop",
1900
+ node=StopActionConfig,
1901
+ )
1902
+ cs.store(
1903
+ package="habitat.task.actions.move_forward",
1904
+ group="habitat/task/actions",
1905
+ name="move_forward",
1906
+ node=MoveForwardActionConfig,
1907
+ )
1908
+ cs.store(
1909
+ package="habitat.task.actions.turn_left",
1910
+ group="habitat/task/actions",
1911
+ name="turn_left",
1912
+ node=TurnLeftActionConfig,
1913
+ )
1914
+ cs.store(
1915
+ package="habitat.task.actions.turn_right",
1916
+ group="habitat/task/actions",
1917
+ name="turn_right",
1918
+ node=TurnRightActionConfig,
1919
+ )
1920
+ cs.store(
1921
+ package="habitat.task.actions.look_up",
1922
+ group="habitat/task/actions",
1923
+ name="look_up",
1924
+ node=LookUpActionConfig,
1925
+ )
1926
+ cs.store(
1927
+ package="habitat.task.actions.look_down",
1928
+ group="habitat/task/actions",
1929
+ name="look_down",
1930
+ node=LookDownActionConfig,
1931
+ )
1932
+ cs.store(
1933
+ package="habitat.task.actions.arm_action",
1934
+ group="habitat/task/actions",
1935
+ name="arm_action",
1936
+ node=ArmActionConfig,
1937
+ )
1938
+ cs.store(
1939
+ package="habitat.task.actions.base_velocity",
1940
+ group="habitat/task/actions",
1941
+ name="base_velocity",
1942
+ node=BaseVelocityActionConfig,
1943
+ )
1944
+ cs.store(
1945
+ package="habitat.task.actions.base_velocity_non_cylinder",
1946
+ group="habitat/task/actions",
1947
+ name="base_velocity_non_cylinder",
1948
+ node=BaseVelocityNonCylinderActionConfig,
1949
+ )
1950
+ cs.store(
1951
+ package="habitat.task.actions.humanoidjoint_action",
1952
+ group="habitat/task/actions",
1953
+ name="humanoidjoint_action",
1954
+ node=HumanoidJointActionConfig,
1955
+ )
1956
+ cs.store(
1957
+ package="habitat.task.actions.humanoid_pick_action",
1958
+ group="habitat/task/actions",
1959
+ name="humanoid_pick_action",
1960
+ node=HumanoidPickActionConfig,
1961
+ )
1962
+ cs.store(
1963
+ package="habitat.task.actions.velocity_control",
1964
+ group="habitat/task/actions",
1965
+ name="velocity_control",
1966
+ node=VelocityControlActionConfig,
1967
+ )
1968
+ cs.store(
1969
+ package="habitat.task.actions.empty",
1970
+ group="habitat/task/actions",
1971
+ name="empty",
1972
+ node=EmptyActionConfig,
1973
+ )
1974
+ cs.store(
1975
+ package="habitat.task.actions.rearrange_stop",
1976
+ group="habitat/task/actions",
1977
+ name="rearrange_stop",
1978
+ node=RearrangeStopActionConfig,
1979
+ )
1980
+ cs.store(
1981
+ package="habitat.task.actions.a_selection_of_base_or_arm",
1982
+ group="habitat/task/actions",
1983
+ name="a_selection_of_base_or_arm",
1984
+ node=SelectBaseOrArmActionConfig,
1985
+ )
1986
+ cs.store(
1987
+ package="habitat.task.actions.answer",
1988
+ group="habitat/task/actions",
1989
+ name="answer",
1990
+ node=AnswerActionConfig,
1991
+ )
1992
+ cs.store(
1993
+ package="habitat.task.actions.oracle_nav_action",
1994
+ group="habitat/task/actions",
1995
+ name="oracle_nav_action",
1996
+ node=OracleNavActionConfig,
1997
+ )
1998
+ cs.store(
1999
+ package="habitat.task.actions.pddl_apply_action",
2000
+ group="habitat/task/actions",
2001
+ name="pddl_apply_action",
2002
+ node=PddlApplyActionConfig,
2003
+ )
2004
+
2005
+ # Dataset Config Schema
2006
+ cs.store(
2007
+ package="habitat.dataset",
2008
+ group="habitat/dataset",
2009
+ name="dataset_config_schema",
2010
+ node=DatasetConfig,
2011
+ )
2012
+
2013
+ # Simulator Sensors
2014
+ cs.store(
2015
+ group="habitat/simulator/sim_sensors",
2016
+ name="rgb_sensor",
2017
+ node=HabitatSimRGBSensorConfig,
2018
+ )
2019
+
2020
+ cs.store(
2021
+ group="habitat/simulator/sim_sensors",
2022
+ name="depth_sensor",
2023
+ node=HabitatSimDepthSensorConfig,
2024
+ )
2025
+
2026
+ cs.store(
2027
+ group="habitat/simulator/sim_sensors",
2028
+ name="semantic_sensor",
2029
+ node=HabitatSimSemanticSensorConfig,
2030
+ )
2031
+
2032
+ cs.store(
2033
+ group="habitat/simulator/sim_sensors",
2034
+ name="equirect_rgb_sensor",
2035
+ node=HabitatSimEquirectangularRGBSensorConfig,
2036
+ )
2037
+
2038
+ cs.store(
2039
+ group="habitat/simulator/sim_sensors",
2040
+ name="equirect_depth_sensor",
2041
+ node=HabitatSimEquirectangularDepthSensorConfig,
2042
+ )
2043
+
2044
+ cs.store(
2045
+ group="habitat/simulator/sim_sensors",
2046
+ name="equirect_semantic_sensor",
2047
+ node=HabitatSimEquirectangularSemanticSensorConfig,
2048
+ )
2049
+
2050
+
2051
+ cs.store(
2052
+ group="habitat/simulator/sim_sensors",
2053
+ name="arm_depth_sensor",
2054
+ node=ArmDepthSensorConfig,
2055
+ )
2056
+
2057
+ cs.store(
2058
+ group="habitat/simulator/sim_sensors",
2059
+ name="arm_rgb_sensor",
2060
+ node=ArmRGBSensorConfig,
2061
+ )
2062
+
2063
+ cs.store(
2064
+ group="habitat/simulator/sim_sensors",
2065
+ name="jaw_depth_sensor",
2066
+ node=JawDepthSensorConfig,
2067
+ )
2068
+
2069
+ cs.store(
2070
+ group="habitat/simulator/sim_sensors",
2071
+ name="jaw_rgb_sensor",
2072
+ node=JawRGBSensorConfig,
2073
+ )
2074
+
2075
+ cs.store(
2076
+ group="habitat/simulator/sim_sensors",
2077
+ name="head_depth_sensor",
2078
+ node=HeadDepthSensorConfig,
2079
+ )
2080
+
2081
+ cs.store(
2082
+ group="habitat/simulator/sim_sensors",
2083
+ name="head_stereo_right_depth_sensor",
2084
+ node=HeadStereoRightDepthSensorConfig,
2085
+ )
2086
+
2087
+ cs.store(
2088
+ group="habitat/simulator/sim_sensors",
2089
+ name="head_stereo_left_depth_sensor",
2090
+ node=HeadStereoLeftDepthSensorConfig,
2091
+ )
2092
+
2093
+
2094
+ cs.store(
2095
+ group="habitat/simulator/sim_sensors",
2096
+ name="head_rgb_sensor",
2097
+ node=HeadRGBSensorConfig,
2098
+ )
2099
+
2100
+ cs.store(
2101
+ group="habitat/simulator/sim_sensors",
2102
+ name="head_panoptic_sensor",
2103
+ node=HeadPanopticSensorConfig,
2104
+ )
2105
+
2106
+ cs.store(
2107
+ group="habitat/simulator/sim_sensors",
2108
+ name="arm_panoptic_sensor",
2109
+ node=ArmPanopticSensorConfig,
2110
+ )
2111
+
2112
+ cs.store(
2113
+ group="habitat/simulator/sim_sensors",
2114
+ name="jaw_panoptic_sensor",
2115
+ node=JawPanopticSensorConfig,
2116
+ )
2117
+
2118
+ cs.store(
2119
+ group="habitat/simulator/sim_sensors",
2120
+ name="third_depth_sensor",
2121
+ node=ThirdDepthSensorConfig,
2122
+ )
2123
+
2124
+ cs.store(
2125
+ group="habitat/simulator/sim_sensors",
2126
+ name="third_rgb_sensor",
2127
+ node=ThirdRGBSensorConfig,
2128
+ )
2129
+
2130
+
2131
+ # Task Sensors
2132
+ cs.store(
2133
+ package="habitat.task.lab_sensors.gps_sensor",
2134
+ group="habitat/task/lab_sensors",
2135
+ name="gps_sensor",
2136
+ node=GPSSensorConfig,
2137
+ )
2138
+ cs.store(
2139
+ package="habitat.task.lab_sensors.compass_sensor",
2140
+ group="habitat/task/lab_sensors",
2141
+ name="compass_sensor",
2142
+ node=CompassSensorConfig,
2143
+ )
2144
+ cs.store(
2145
+ package="habitat.task.lab_sensors.pointgoal_with_gps_compass_sensor",
2146
+ group="habitat/task/lab_sensors",
2147
+ name="pointgoal_with_gps_compass_sensor",
2148
+ node=PointGoalWithGPSCompassSensorConfig,
2149
+ )
2150
+ cs.store(
2151
+ package="habitat.task.lab_sensors.humanoid_detector_sensor",
2152
+ group="habitat/task/lab_sensors",
2153
+ name="humanoid_detector_sensor",
2154
+ node=HumanoidDetectorSensorConfig,
2155
+ )
2156
+ cs.store(
2157
+ package="habitat.task.lab_sensors.arm_depth_bbox_sensor",
2158
+ group="habitat/task/lab_sensors",
2159
+ name="arm_depth_bbox_sensor",
2160
+ node=ArmDepthBBoxSensorConfig,
2161
+ )
2162
+ cs.store(
2163
+ package="habitat.task.lab_sensors.spot_head_stereo_depth_sensor",
2164
+ group="habitat/task/lab_sensors",
2165
+ name="spot_head_stereo_depth_sensor",
2166
+ node=SpotHeadStereoDepthSensorConfig,
2167
+ )
2168
+ cs.store(
2169
+ package="habitat.task.lab_sensors.objectgoal_sensor",
2170
+ group="habitat/task/lab_sensors",
2171
+ name="objectgoal_sensor",
2172
+ node=ObjectGoalSensorConfig,
2173
+ )
2174
+ cs.store(
2175
+ package="habitat.task.lab_sensors.imagegoal_sensor",
2176
+ group="habitat/task/lab_sensors",
2177
+ name="imagegoal_sensor",
2178
+ node=ImageGoalSensorConfig,
2179
+ )
2180
+ cs.store(
2181
+ package="habitat.task.lab_sensors.instance_imagegoal_sensor",
2182
+ group="habitat/task/lab_sensors",
2183
+ name="instance_imagegoal_sensor",
2184
+ node=InstanceImageGoalSensorConfig,
2185
+ )
2186
+ cs.store(
2187
+ package="habitat.task.lab_sensors.instance_imagegoal_hfov_sensor",
2188
+ group="habitat/task/lab_sensors",
2189
+ name="instance_imagegoal_hfov_sensor",
2190
+ node=InstanceImageGoalHFOVSensorConfig,
2191
+ )
2192
+ cs.store(
2193
+ package="habitat.task.lab_sensors.localization_sensor",
2194
+ group="habitat/task/lab_sensors",
2195
+ name="localization_sensor",
2196
+ node=LocalizationSensorConfig,
2197
+ )
2198
+ cs.store(
2199
+ package="habitat.task.lab_sensors.target_start_sensor",
2200
+ group="habitat/task/lab_sensors",
2201
+ name="target_start_sensor",
2202
+ node=TargetStartSensorConfig,
2203
+ )
2204
+ cs.store(
2205
+ package="habitat.task.lab_sensors.goal_sensor",
2206
+ group="habitat/task/lab_sensors",
2207
+ name="goal_sensor",
2208
+ node=GoalSensorConfig,
2209
+ )
2210
+ cs.store(
2211
+ package="habitat.task.lab_sensors.abs_target_start_sensor",
2212
+ group="habitat/task/lab_sensors",
2213
+ name="abs_target_start_sensor",
2214
+ node=AbsTargetStartSensorConfig,
2215
+ )
2216
+ cs.store(
2217
+ package="habitat.task.lab_sensors.abs_goal_sensor",
2218
+ group="habitat/task/lab_sensors",
2219
+ name="abs_goal_sensor",
2220
+ node=AbsGoalSensorConfig,
2221
+ )
2222
+ cs.store(
2223
+ package="habitat.task.lab_sensors.joint_sensor",
2224
+ group="habitat/task/lab_sensors",
2225
+ name="joint_sensor",
2226
+ node=JointSensorConfig,
2227
+ )
2228
+ cs.store(
2229
+ package="habitat.task.lab_sensors.humanoid_joint_sensor",
2230
+ group="habitat/task/lab_sensors",
2231
+ name="humanoid_joint_sensor",
2232
+ node=HumanoidJointSensorConfig,
2233
+ )
2234
+ cs.store(
2235
+ package="habitat.task.lab_sensors.end_effector_sensor",
2236
+ group="habitat/task/lab_sensors",
2237
+ name="end_effector_sensor",
2238
+ node=EEPositionSensorConfig,
2239
+ )
2240
+ cs.store(
2241
+ package="habitat.task.lab_sensors.is_holding_sensor",
2242
+ group="habitat/task/lab_sensors",
2243
+ name="is_holding_sensor",
2244
+ node=IsHoldingSensorConfig,
2245
+ )
2246
+ cs.store(
2247
+ package="habitat.task.lab_sensors.relative_resting_pos_sensor",
2248
+ group="habitat/task/lab_sensors",
2249
+ name="relative_resting_pos_sensor",
2250
+ node=RelativeRestingPositionSensorConfig,
2251
+ )
2252
+ cs.store(
2253
+ package="habitat.task.lab_sensors.instruction_sensor",
2254
+ group="habitat/task/lab_sensors",
2255
+ name="instruction_sensor",
2256
+ node=InstructionSensorConfig,
2257
+ )
2258
+ cs.store(
2259
+ package="habitat.task.lab_sensors.question_sensor",
2260
+ group="habitat/task/lab_sensors",
2261
+ name="question_sensor",
2262
+ node=QuestionSensorConfig,
2263
+ )
2264
+ cs.store(
2265
+ package="habitat.task.lab_sensors.object_sensor",
2266
+ group="habitat/task/lab_sensors",
2267
+ name="object_sensor",
2268
+ node=TargetCurrentSensorConfig,
2269
+ )
2270
+ cs.store(
2271
+ package="habitat.task.lab_sensors.joint_velocity_sensor",
2272
+ group="habitat/task/lab_sensors",
2273
+ name="joint_velocity_sensor",
2274
+ node=JointVelocitySensorConfig,
2275
+ )
2276
+ cs.store(
2277
+ package="habitat.task.lab_sensors.target_start_gps_compass_sensor",
2278
+ group="habitat/task/lab_sensors",
2279
+ name="target_start_gps_compass_sensor",
2280
+ node=TargetStartGpsCompassSensorConfig,
2281
+ )
2282
+ cs.store(
2283
+ package="habitat.task.lab_sensors.initial_gps_compass_sensor",
2284
+ group="habitat/task/lab_sensors",
2285
+ name="initial_gps_compass_sensor",
2286
+ node=InitialGpsCompassSensorConfig,
2287
+ )
2288
+ cs.store(
2289
+ package="habitat.task.lab_sensors.multi_agent_all_predicates",
2290
+ group="habitat/task/lab_sensors",
2291
+ name="multi_agent_all_predicates",
2292
+ node=MultiAgentGlobalPredicatesSensorConfig,
2293
+ )
2294
+
2295
+ cs.store(
2296
+ package="habitat.task.lab_sensors.agents_within_threshold",
2297
+ group="habitat/task/lab_sensors",
2298
+ name="agents_within_threshold",
2299
+ node=AreAgentsWithinThresholdConfig,
2300
+ )
2301
+ cs.store(
2302
+ package="habitat.task.lab_sensors.has_finished_oracle_nav",
2303
+ group="habitat/task/lab_sensors",
2304
+ name="has_finished_oracle_nav",
2305
+ node=HasFinishedOracleNavSensorConfig,
2306
+ )
2307
+ cs.store(
2308
+ package="habitat.task.lab_sensors.has_finished_humanoid_pick",
2309
+ group="habitat/task/lab_sensors",
2310
+ name="has_finished_humanoid_pick",
2311
+ node=HasFinishedHumanoidPickSensorConfig,
2312
+ )
2313
+ cs.store(
2314
+ package="habitat.task.lab_sensors.other_agent_gps",
2315
+ group="habitat/task/lab_sensors",
2316
+ name="other_agent_gps",
2317
+ node=OtherAgentGpsConfig,
2318
+ )
2319
+ cs.store(
2320
+ package="habitat.task.lab_sensors.target_goal_gps_compass_sensor",
2321
+ group="habitat/task/lab_sensors",
2322
+ name="target_goal_gps_compass_sensor",
2323
+ node=TargetGoalGpsCompassSensorConfig,
2324
+ )
2325
+ cs.store(
2326
+ package="habitat.task.lab_sensors.nav_to_skill_sensor",
2327
+ group="habitat/task/lab_sensors",
2328
+ name="nav_to_skill_sensor",
2329
+ node=NavToSkillSensorConfig,
2330
+ )
2331
+ cs.store(
2332
+ package="habitat.task.lab_sensors.nav_goal_sensor",
2333
+ group="habitat/task/lab_sensors",
2334
+ name="nav_goal_sensor",
2335
+ node=NavGoalPointGoalSensorConfig,
2336
+ )
2337
+ cs.store(
2338
+ package="habitat.task.lab_sensors.all_predicates",
2339
+ group="habitat/task/lab_sensors",
2340
+ name="all_predicates",
2341
+ node=GlobalPredicatesSensorConfig,
2342
+ )
2343
+
2344
+
2345
+ # Task Measurements
2346
+ cs.store(
2347
+ package="habitat.task.measurements.top_down_map",
2348
+ group="habitat/task/measurements",
2349
+ name="top_down_map",
2350
+ node=TopDownMapMeasurementConfig,
2351
+ )
2352
+ cs.store(
2353
+ package="habitat.task.measurements.distance_to_goal",
2354
+ group="habitat/task/measurements",
2355
+ name="distance_to_goal",
2356
+ node=DistanceToGoalMeasurementConfig,
2357
+ )
2358
+ cs.store(
2359
+ package="habitat.task.measurements.distance_to_goal_reward",
2360
+ group="habitat/task/measurements",
2361
+ name="distance_to_goal_reward",
2362
+ node=DistanceToGoalRewardMeasurementConfig,
2363
+ )
2364
+ cs.store(
2365
+ package="habitat.task.measurements.success",
2366
+ group="habitat/task/measurements",
2367
+ name="success",
2368
+ node=SuccessMeasurementConfig,
2369
+ )
2370
+ cs.store(
2371
+ package="habitat.task.measurements.spl",
2372
+ group="habitat/task/measurements",
2373
+ name="spl",
2374
+ node=SPLMeasurementConfig,
2375
+ )
2376
+ cs.store(
2377
+ package="habitat.task.measurements.soft_spl",
2378
+ group="habitat/task/measurements",
2379
+ name="soft_spl",
2380
+ node=SoftSPLMeasurementConfig,
2381
+ )
2382
+ cs.store(
2383
+ package="habitat.task.measurements.num_steps",
2384
+ group="habitat/task/measurements",
2385
+ name="num_steps",
2386
+ node=NumStepsMeasurementConfig,
2387
+ )
2388
+ cs.store(
2389
+ package="habitat.task.measurements.zero",
2390
+ group="habitat/task/measurements",
2391
+ name="zero",
2392
+ node=ZeroMeasurementConfig,
2393
+ )
2394
+ cs.store(
2395
+ package="habitat.task.measurements.articulated_agent_force",
2396
+ group="habitat/task/measurements",
2397
+ name="articulated_agent_force",
2398
+ node=RobotForceMeasurementConfig,
2399
+ )
2400
+ cs.store(
2401
+ package="habitat.task.measurements.force_terminate",
2402
+ group="habitat/task/measurements",
2403
+ name="force_terminate",
2404
+ node=ForceTerminateMeasurementConfig,
2405
+ )
2406
+ cs.store(
2407
+ package="habitat.task.measurements.end_effector_to_object_distance",
2408
+ group="habitat/task/measurements",
2409
+ name="end_effector_to_object_distance",
2410
+ node=EndEffectorToObjectDistanceMeasurementConfig,
2411
+ )
2412
+ cs.store(
2413
+ package="habitat.task.measurements.base_to_object_distance",
2414
+ group="habitat/task/measurements",
2415
+ name="base_to_object_distance",
2416
+ node=BaseToObjectDistanceMeasurementConfig,
2417
+ )
2418
+ cs.store(
2419
+ package="habitat.task.measurements.end_effector_to_rest_distance",
2420
+ group="habitat/task/measurements",
2421
+ name="end_effector_to_rest_distance",
2422
+ node=EndEffectorToRestDistanceMeasurementConfig,
2423
+ )
2424
+ cs.store(
2425
+ package="habitat.task.measurements.end_effector_to_goal_distance",
2426
+ group="habitat/task/measurements",
2427
+ name="end_effector_to_goal_distance",
2428
+ node=EndEffectorToGoalDistanceMeasurementConfig,
2429
+ )
2430
+ cs.store(
2431
+ package="habitat.task.measurements.did_pick_object",
2432
+ group="habitat/task/measurements",
2433
+ name="did_pick_object",
2434
+ node=DidPickObjectMeasurementConfig,
2435
+ )
2436
+ cs.store(
2437
+ package="habitat.task.measurements.did_violate_hold_constraint",
2438
+ group="habitat/task/measurements",
2439
+ name="did_violate_hold_constraint",
2440
+ node=DidViolateHoldConstraintMeasurementConfig,
2441
+ )
2442
+ cs.store(
2443
+ package="habitat.task.measurements.pick_reward",
2444
+ group="habitat/task/measurements",
2445
+ name="pick_reward",
2446
+ node=RearrangePickRewardMeasurementConfig,
2447
+ )
2448
+ cs.store(
2449
+ package="habitat.task.measurements.pick_success",
2450
+ group="habitat/task/measurements",
2451
+ name="pick_success",
2452
+ node=RearrangePickSuccessMeasurementConfig,
2453
+ )
2454
+ cs.store(
2455
+ package="habitat.task.measurements.answer_accuracy",
2456
+ group="habitat/task/measurements",
2457
+ name="answer_accuracy",
2458
+ node=AnswerAccuracyMeasurementConfig,
2459
+ )
2460
+ cs.store(
2461
+ package="habitat.task.measurements.episode_info",
2462
+ group="habitat/task/measurements",
2463
+ name="episode_info",
2464
+ node=EpisodeInfoMeasurementConfig,
2465
+ )
2466
+ cs.store(
2467
+ package="habitat.task.measurements.collisions",
2468
+ group="habitat/task/measurements",
2469
+ name="collisions",
2470
+ node=CollisionsMeasurementConfig,
2471
+ )
2472
+ cs.store(
2473
+ package="habitat.task.measurements.articulated_agent_colls",
2474
+ group="habitat/task/measurements",
2475
+ name="articulated_agent_colls",
2476
+ node=RobotCollisionsMeasurementConfig,
2477
+ )
2478
+ cs.store(
2479
+ package="habitat.task.measurements.object_to_goal_distance",
2480
+ group="habitat/task/measurements",
2481
+ name="object_to_goal_distance",
2482
+ node=ObjectToGoalDistanceMeasurementConfig,
2483
+ )
2484
+ cs.store(
2485
+ package="habitat.task.measurements.obj_at_goal",
2486
+ group="habitat/task/measurements",
2487
+ name="obj_at_goal",
2488
+ node=ObjAtGoalMeasurementConfig,
2489
+ )
2490
+ cs.store(
2491
+ package="habitat.task.measurements.place_success",
2492
+ group="habitat/task/measurements",
2493
+ name="place_success",
2494
+ node=PlaceSuccessMeasurementConfig,
2495
+ )
2496
+ cs.store(
2497
+ package="habitat.task.measurements.place_reward",
2498
+ group="habitat/task/measurements",
2499
+ name="place_reward",
2500
+ node=PlaceRewardMeasurementConfig,
2501
+ )
2502
+ cs.store(
2503
+ package="habitat.task.measurements.move_objects_reward",
2504
+ group="habitat/task/measurements",
2505
+ name="move_objects_reward",
2506
+ node=MoveObjectsRewardMeasurementConfig,
2507
+ )
2508
+ cs.store(
2509
+ package="habitat.task.measurements.does_want_terminate",
2510
+ group="habitat/task/measurements",
2511
+ name="does_want_terminate",
2512
+ node=DoesWantTerminateMeasurementConfig,
2513
+ )
2514
+ cs.store(
2515
+ package="habitat.task.measurements.pddl_subgoal_reward",
2516
+ group="habitat/task/measurements",
2517
+ name="pddl_subgoal_reward",
2518
+ node=PddlSubgoalReward,
2519
+ )
2520
+ cs.store(
2521
+ package="habitat.task.measurements.rearrange_cooperate_reward",
2522
+ group="habitat/task/measurements",
2523
+ name="rearrange_cooperate_reward",
2524
+ node=RearrangeCooperateRewardConfig,
2525
+ )
2526
+ cs.store(
2527
+ package="habitat.task.measurements.social_nav_reward",
2528
+ group="habitat/task/measurements",
2529
+ name="social_nav_reward",
2530
+ node=SocialNavReward,
2531
+ )
2532
+ cs.store(
2533
+ package="habitat.task.measurements.did_agents_collide",
2534
+ group="habitat/task/measurements",
2535
+ name="did_agents_collide",
2536
+ node=DidAgentsCollideConfig,
2537
+ )
2538
+ cs.store(
2539
+ package="habitat.task.measurements.num_agents_collide",
2540
+ group="habitat/task/measurements",
2541
+ name="num_agents_collide",
2542
+ node=NumAgentsCollideConfig,
2543
+ )
2544
+ cs.store(
2545
+ package="habitat.task.measurements.pddl_success",
2546
+ group="habitat/task/measurements",
2547
+ name="pddl_success",
2548
+ node=PddlSuccessMeasurementConfig,
2549
+ )
2550
+ cs.store(
2551
+ package="habitat.task.measurements.gfx_replay_measure",
2552
+ group="habitat/task/measurements",
2553
+ name="gfx_replay_measure",
2554
+ node=GfxReplayMeasureMeasurementConfig,
2555
+ )
2556
+ cs.store(
2557
+ package="habitat.task.measurements.pddl_stage_goals",
2558
+ group="habitat/task/measurements",
2559
+ name="composite_stage_goals",
2560
+ node=PddlStageGoalsMeasurementConfig,
2561
+ )
2562
+ cs.store(
2563
+ package="habitat.task.measurements.ee_dist_to_marker",
2564
+ group="habitat/task/measurements",
2565
+ name="ee_dist_to_marker",
2566
+ node=EndEffectorDistToMarkerMeasurementConfig,
2567
+ )
2568
+ cs.store(
2569
+ package="habitat.task.measurements.art_obj_at_desired_state",
2570
+ group="habitat/task/measurements",
2571
+ name="art_obj_at_desired_state",
2572
+ node=ArtObjAtDesiredStateMeasurementConfig,
2573
+ )
2574
+ cs.store(
2575
+ package="habitat.task.measurements.art_obj_state",
2576
+ group="habitat/task/measurements",
2577
+ name="art_obj_state",
2578
+ node=ArtObjStateMeasurementConfig,
2579
+ )
2580
+ cs.store(
2581
+ package="habitat.task.measurements.art_obj_success",
2582
+ group="habitat/task/measurements",
2583
+ name="art_obj_success",
2584
+ node=ArtObjSuccessMeasurementConfig,
2585
+ )
2586
+ cs.store(
2587
+ package="habitat.task.measurements.art_obj_reward",
2588
+ group="habitat/task/measurements",
2589
+ name="art_obj_reward",
2590
+ node=ArtObjRewardMeasurementConfig,
2591
+ )
2592
+ cs.store(
2593
+ package="habitat.task.measurements.nav_to_pos_succ",
2594
+ group="habitat/task/measurements",
2595
+ name="nav_to_pos_succ",
2596
+ node=NavToPosSuccMeasurementConfig,
2597
+ )
2598
+ cs.store(
2599
+ package="habitat.task.measurements.social_nav_stats",
2600
+ group="habitat/task/measurements",
2601
+ name="social_nav_stats",
2602
+ node=SocialNavStatsMeasurementConfig,
2603
+ )
2604
+ cs.store(
2605
+ package="habitat.task.measurements.social_nav_seek_success",
2606
+ group="habitat/task/measurements",
2607
+ name="social_nav_seek_success",
2608
+ node=NavSeekSuccessMeasurementConfig,
2609
+ )
2610
+ cs.store(
2611
+ package="habitat.task.measurements.rot_dist_to_goal",
2612
+ group="habitat/task/measurements",
2613
+ name="rot_dist_to_goal",
2614
+ node=RotDistToGoalMeasurementConfig,
2615
+ )
2616
+ cs.store(
2617
+ package="habitat.task.measurements.rearrange_nav_to_obj_success",
2618
+ group="habitat/task/measurements",
2619
+ name="rearrange_nav_to_obj_success",
2620
+ node=NavToObjSuccessMeasurementConfig,
2621
+ )
2622
+ cs.store(
2623
+ package="habitat.task.measurements.rearrange_nav_to_obj_reward",
2624
+ group="habitat/task/measurements",
2625
+ name="rearrange_nav_to_obj_reward",
2626
+ node=NavToObjRewardMeasurementConfig,
2627
+ )
2628
+ cs.store(
2629
+ package="habitat.task.measurements.bad_called_terminate",
2630
+ group="habitat/task/measurements",
2631
+ name="bad_called_terminate",
2632
+ node=BadCalledTerminateMeasurementConfig,
2633
+ )
2634
+ cs.store(
2635
+ package="habitat.task.measurements.dist_to_goal",
2636
+ group="habitat/task/measurements",
2637
+ name="dist_to_goal",
2638
+ node=DistToGoalMeasurementConfig,
2639
+ )
2640
+ cs.store(
2641
+ package="habitat.task.measurements.rearrange_reach_reward",
2642
+ group="habitat/task/measurements",
2643
+ name="rearrange_reach_reward",
2644
+ node=RearrangeReachRewardMeasurementConfig,
2645
+ )
2646
+ cs.store(
2647
+ package="habitat.task.measurements.rearrange_reach_success",
2648
+ group="habitat/task/measurements",
2649
+ name="rearrange_reach_success",
2650
+ node=RearrangeReachSuccessMeasurementConfig,
2651
+ )
2652
+ cs.store(
2653
+ package="habitat.task.measurements.habitat_perf",
2654
+ group="habitat/task/measurements",
2655
+ name="habitat_perf",
2656
+ node=RuntimePerfStatsMeasurementConfig,
2657
+ )
2658
+
2659
+
2660
+ from hydra.core.config_search_path import ConfigSearchPath
2661
+ from hydra.core.plugins import Plugins
2662
+ from hydra.plugins.search_path_plugin import SearchPathPlugin
2663
+
2664
+
2665
+ class HabitatConfigPlugin(SearchPathPlugin):
2666
+ def manipulate_search_path(self, search_path: ConfigSearchPath) -> None:
2667
+ search_path.append(
2668
+ provider="habitat",
2669
+ path="pkg://habitat/config/",
2670
+ )
2671
+
2672
+
2673
+ def register_hydra_plugin(plugin) -> None:
2674
+ """Hydra users should call this function before invoking @hydra.main"""
2675
+ Plugins.instance().register(plugin)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/eqa/mp3d.yaml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+
4
+ defaults:
5
+ - /habitat/dataset: dataset_config_schema
6
+ - _self_
7
+
8
+ type: MP3DEQA-v1
9
+ split: train
10
+ data_path: "data/datasets/eqa/mp3d/v1/{split}/{split}.json.gz"
11
+ scenes_dir: "data/scene_datasets/"
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/imagenav/gibson.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/gibson/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/imagenav/mp3d.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/mp3d/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/instance_imagenav/hm3d_v1.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: InstanceImageNav-v1
8
+ split: train
9
+ data_path: data/datasets/instance_imagenav/hm3d/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/instance_imagenav/hm3d_v2.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: InstanceImageNav-v1
8
+ split: train
9
+ data_path: data/datasets/instance_imagenav/hm3d/v2/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/hm3d.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+ defaults:
3
+ - /habitat/dataset: dataset_config_schema
4
+ - _self_
5
+
6
+ type: ObjectNav-v1
7
+ split: train
8
+ data_path: data/datasets/objectnav/hm3d/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/hssd-hab.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+ defaults:
3
+ - /habitat/dataset: dataset_config_schema
4
+ - _self_
5
+
6
+ type: ObjectNav-v1
7
+ split: train
8
+ data_path: data/datasets/objectnav/hssd-hab/{split}/{split}.json.gz
9
+ scenes_dir: data/scene_datasets/hssd-hab/scenes
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/mp3d.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+ defaults:
3
+ - /habitat/dataset: dataset_config_schema
4
+ - _self_
5
+
6
+ type: ObjectNav-v1
7
+ split: train
8
+ data_path: data/datasets/objectnav/mp3d/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/objectnav/procthor-hab.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+ defaults:
3
+ - /habitat/dataset: dataset_config_schema
4
+ - _self_
5
+
6
+ type: ObjectNav-v1
7
+ split: train
8
+ data_path: data/datasets/objectnav/procthor-hab/{split}/{split}.json.gz
9
+ scenes_dir: data/scene_datasets/ai2thor-hab/ai2thor-hab/configs/scenes/ProcTHOR/
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/gibson.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/gibson/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/gibson_0_plus.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train_extra_large
9
+ data_path: data/datasets/pointnav/gibson/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/gibson_v2.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/gibson/v2/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/habitat_test.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/habitat-test-scenes/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/hm3d.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/hm3d/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/pointnav/mp3d.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: PointNav-v1
8
+ split: train
9
+ data_path: data/datasets/pointnav/mp3d/v1/{split}/{split}.json.gz
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/rearrangement/hssd.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: RearrangeDataset-v0
8
+ split: train
9
+ data_path: data/datasets/rearrange_pick/replica_cad/v0/{split}/{split}_counter_L_analysis_5000_500.json.gz
10
+ scenes_dir: "data/scene_datasets/hssd-hab"
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/rearrangement/replica_cad.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+
3
+ defaults:
4
+ - /habitat/dataset: dataset_config_schema
5
+ - _self_
6
+
7
+ type: RearrangeDataset-v0
8
+ split: train
9
+ data_path: data/datasets/rearrange_pick/replica_cad/v0/{split}/{split}_counter_L_analysis_5000_500.json.gz
10
+ scenes_dir: "data/replica_cad/"
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/dataset/vln/mp3d_r2r.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.dataset
2
+ defaults:
3
+ - /habitat/dataset: dataset_config_schema
4
+ - _self_
5
+
6
+
7
+ type: R2RVLN-v1
8
+ split: train
9
+ data_path: "data/datasets/vln/mp3d/r2r/v1/{split}/{split}.json.gz"
10
+ scenes_dir: "data/scene_datasets/"
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/simulator/rearrange_sim.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.simulator
2
+ type: RearrangeSim-v0
3
+ additional_object_paths:
4
+ - data/objects/ycb/configs/
5
+ debug_render_goal: False
6
+ concur_render: True
7
+ auto_sleep: True
8
+ habitat_sim_v0:
9
+ allow_sliding: False
10
+ enable_physics: True
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/simulator/sensor_setups/rgbd_head_agent.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # @package habitat.simulator.agents.rgb_head_agent
2
+
3
+ defaults:
4
+ - /habitat/simulator/sim_sensors@sim_sensors.head_rgb_sensor: head_rgb_sensor
5
+ - /habitat/simulator/sim_sensors@sim_sensors.head_depth_sensor: head_depth_sensor
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/eqa.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ defaults:
2
+ - task_config_base
3
+ - actions:
4
+ - move_forward
5
+ - turn_left
6
+ - turn_right
7
+ - answer
8
+ - measurements:
9
+ - distance_to_goal
10
+ - episode_info
11
+ - answer_accuracy
12
+ - lab_sensors:
13
+ - question_sensor
14
+ - _self_
15
+
16
+ type: EQA-v0
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/imagenav.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ defaults:
2
+ - task_config_base
3
+ - actions:
4
+ - stop
5
+ - move_forward
6
+ - turn_left
7
+ - turn_right
8
+ - measurements:
9
+ - distance_to_goal
10
+ - success
11
+ - spl
12
+ - distance_to_goal_reward
13
+ - top_down_map
14
+ - lab_sensors:
15
+ - imagegoal_sensor
16
+ - _self_
17
+
18
+ type: Nav-v0
19
+ end_on_success: True
20
+ reward_measure: "distance_to_goal_reward"
21
+ success_measure: "spl"
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/instance_imagenav.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ defaults:
2
+ - task_config_base
3
+ - actions:
4
+ - stop
5
+ - move_forward
6
+ - turn_left
7
+ - turn_right
8
+ - look_up
9
+ - look_down
10
+ - measurements:
11
+ - num_steps
12
+ - distance_to_goal
13
+ - success
14
+ - spl
15
+ - soft_spl
16
+ - distance_to_goal_reward
17
+ - lab_sensors:
18
+ - instance_imagegoal_sensor
19
+ - instance_imagegoal_hfov_sensor
20
+ - compass_sensor
21
+ - gps_sensor
22
+ - _self_
23
+
24
+
25
+ actions:
26
+ look_up:
27
+ tilt_angle: 30
28
+ look_down:
29
+ tilt_angle: 30
30
+ type: InstanceImageNav-v1
31
+ end_on_success: True
32
+ reward_measure: distance_to_goal_reward
33
+ success_measure: spl
34
+ goal_sensor_uuid: instance_imagegoal
35
+ measurements:
36
+ distance_to_goal:
37
+ distance_to: VIEW_POINTS
38
+ success:
39
+ success_distance: 0.1
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/objectnav.yaml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ defaults:
3
+ - task_config_base
4
+ - actions:
5
+ - stop
6
+ - move_forward
7
+ - turn_left
8
+ - turn_right
9
+ - look_up
10
+ - look_down
11
+ - measurements:
12
+ - distance_to_goal
13
+ - success
14
+ - spl
15
+ - soft_spl
16
+ - distance_to_goal_reward
17
+ - lab_sensors:
18
+ - objectgoal_sensor
19
+ - compass_sensor
20
+ - gps_sensor
21
+ - _self_
22
+
23
+ actions:
24
+ look_up:
25
+ tilt_angle: 30
26
+ look_down:
27
+ tilt_angle: 30
28
+
29
+ type: ObjectNav-v1
30
+ end_on_success: True
31
+ reward_measure: "distance_to_goal_reward"
32
+ success_measure: "spl"
33
+
34
+
35
+ goal_sensor_uuid: objectgoal
36
+
37
+ measurements:
38
+ distance_to_goal:
39
+ distance_to: VIEW_POINTS
40
+ success:
41
+ success_distance: 0.1
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/pointnav.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ defaults:
2
+ - task_config_base
3
+ - actions:
4
+ - stop
5
+ - move_forward
6
+ - turn_left
7
+ - turn_right
8
+ - measurements:
9
+ - distance_to_goal
10
+ - success
11
+ - spl
12
+ - distance_to_goal_reward
13
+ - lab_sensors:
14
+ - pointgoal_with_gps_compass_sensor
15
+ - _self_
16
+
17
+ type: Nav-v0
18
+ end_on_success: True
19
+ reward_measure: "distance_to_goal_reward"
20
+ success_measure: "spl"
21
+ goal_sensor_uuid: pointgoal_with_gps_compass
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/pointnav_franka.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ defaults:
2
+ - task_config_base
3
+ - actions:
4
+ - stop
5
+ - move_forward
6
+ - turn_left
7
+ - turn_right
8
+ - measurements:
9
+ - distance_to_goal
10
+ - success
11
+ - spl
12
+ - lab_sensors:
13
+ - pointgoal_with_gps_compass_sensor
14
+ - _self_
15
+
16
+ type: Nav-v0
17
+ goal_sensor_uuid: pointgoal_with_gps_compass
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - arm_action
5
+ - _self_
6
+ arm_action:
7
+ grip_controller: SuctionGraspAction
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm_base.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - arm_action
5
+ - base_velocity
6
+ - _self_
7
+ arm_action:
8
+ grip_controller: SuctionGraspAction
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm_base_empty.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - arm_action
5
+ - base_velocity
6
+ - rearrange_stop
7
+ - empty
8
+ - _self_
9
+ arm_action:
10
+ grip_controller: SuctionGraspAction
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_arm_base_stop.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - arm_action
5
+ - base_velocity
6
+ - rearrange_stop
7
+ - _self_
8
+ arm_action:
9
+ grip_controller: SuctionGraspAction
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/fetch_suction_base_stop.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - base_velocity
5
+ - rearrange_stop
6
+ - _self_
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/spot_base_arm_empty.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - base_velocity_non_cylinder
5
+ - arm_action
6
+ - empty
7
+ - _self_
8
+ arm_action:
9
+ type: "ArmAction"
10
+ arm_controller: "ArmRelPosMaskAction"
11
+ grip_controller: "GazeGraspAction"
12
+ arm_joint_mask: [1,1,0,1,0,1,0]
13
+ arm_joint_dimensionality: 4
14
+ grasp_thresh_dist: 0.15
15
+ disable_grip: False
16
+ delta_pos_limit: 0.0872665
17
+ ee_ctrl_lim: 0.015
18
+ gaze_distance_range: [0.3, 0.75]
19
+ center_cone_angle_threshold: 20.0
20
+ base_velocity_non_cylinder:
21
+ allow_dyn_slide: False
22
+ # There is a collision if the difference between the clamped NavMesh position and target position
23
+ # is more than than collision_threshold for any point
24
+ collision_threshold: 1e-5
25
+ # If we allow the robot to move laterally
26
+ enable_lateral_move: False
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/actions/stretch_base_arm_empty.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package habitat.task.actions
2
+ defaults:
3
+ - /habitat/task/actions:
4
+ - arm_action
5
+ - _self_
6
+ arm_action:
7
+ type: "ArmAction"
8
+ arm_controller: "ArmRelPosKinematicReducedActionStretch"
9
+ grip_controller: "GazeGraspAction"
10
+ arm_joint_mask: [1,0,0,0,1,1,1,1,1,1]
11
+ arm_joint_dimensionality: 10
12
+ grasp_thresh_dist: 0.15
13
+ disable_grip: False
14
+ delta_pos_limit: 0.0125
15
+ ee_ctrl_lim: 0.015
16
+ gaze_distance_range: [0.1, 3.0]
17
+ center_cone_angle_threshold: 20.0
18
+ center_cone_vector: [0.0, 1.0, 0.0]
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/prepare_groceries.yaml ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ init:
2
+ - closed_cab(cab_push_point_4)
3
+ - closed_cab(cab_push_point_5)
4
+ - closed_cab(cab_push_point_6)
5
+ - closed_cab(cab_push_point_7)
6
+ - opened_fridge(fridge_push_point)
7
+
8
+ goal:
9
+ expr_type: AND
10
+ sub_exprs:
11
+ - object_at(obj0_target|0,TARGET_obj0_target|0)
12
+ - object_at(obj1_target|1,TARGET_obj1_target|1)
13
+ - object_at(obj2_target|2,TARGET_obj2_target|2)
14
+ - not_holding(robot_0)
15
+
16
+ objects:
17
+ - name: obj0_target|0
18
+ expr_type: movable_entity_type
19
+ - name: TARGET_obj0_target|0
20
+ expr_type: goal_entity_type
21
+
22
+ - name: obj1_target|1
23
+ expr_type: movable_entity_type
24
+ - name: TARGET_obj1_target|1
25
+ expr_type: goal_entity_type
26
+
27
+ - name: obj2_target|2
28
+ expr_type: movable_entity_type
29
+ - name: TARGET_obj2_target|2
30
+ expr_type: goal_entity_type
31
+
32
+ - name: robot_0
33
+ expr_type: robot_entity_type
34
+
35
+ stage_goals:
36
+ stage_0_5:
37
+ expr_type: AND
38
+ sub_exprs:
39
+ - holding(obj0_target|0, robot_0)
40
+ stage_1:
41
+ expr_type: AND
42
+ sub_exprs:
43
+ - object_at(obj0_target|0,TARGET_obj0_target|0)
44
+ - not_holding(robot_0)
45
+ stage_1_5:
46
+ expr_type: AND
47
+ sub_exprs:
48
+ - object_at(obj0_target|0,TARGET_obj0_target|0)
49
+ - holding(obj1_target|1, robot_0)
50
+ stage_2:
51
+ expr_type: AND
52
+ sub_exprs:
53
+ - object_at(obj0_target|0,TARGET_obj0_target|0)
54
+ - object_at(obj1_target|1,TARGET_obj1_target|1)
55
+ - not_holding(robot_0)
56
+ stage_2_5:
57
+ expr_type: AND
58
+ sub_exprs:
59
+ - object_at(obj0_target|0,TARGET_obj0_target|0)
60
+ - object_at(obj1_target|1,TARGET_obj1_target|1)
61
+ - holding(obj2_target|2, robot_0)
62
+ stage_3:
63
+ expr_type: AND
64
+ sub_exprs:
65
+ - object_at(obj0_target|0,TARGET_obj0_target|0)
66
+ - object_at(obj1_target|1,TARGET_obj1_target|1)
67
+ - object_at(obj2_target|2,TARGET_obj2_target|2)
68
+
69
+ solution:
70
+ - nav(obj0_target|0, robot_0)
71
+ - pick(obj0_target|0, robot_0)
72
+ - nav(TARGET_obj0_target|0, robot_0)
73
+ - place(obj0_target|0,TARGET_obj0_target|0, robot_0)
74
+
75
+ - nav(obj1_target|1, robot_0)
76
+ - pick(obj1_target|1, robot_0)
77
+ - nav(TARGET_obj1_target|1, robot_0)
78
+ - place(obj1_target|1,TARGET_obj1_target|1, robot_0)
79
+
80
+ - nav(obj2_target|2, robot_0)
81
+ - pick(obj2_target|2, robot_0)
82
+ - nav(TARGET_obj2_target|2, robot_0)
83
+ - place(obj2_target|2,TARGET_obj2_target|2, robot_0)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/rearrange.yaml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ objects:
2
+ - name: goal0|0
3
+ expr_type: movable_entity_type
4
+ - name: TARGET_goal0|0
5
+ expr_type: goal_entity_type
6
+ - name: robot_0
7
+ expr_type: robot_entity_type
8
+
9
+ goal:
10
+ expr_type: AND
11
+ sub_exprs:
12
+ - object_at(goal0|0,TARGET_goal0|0)
13
+ - not_holding(robot_0)
14
+
15
+ stage_goals:
16
+ stage_0_5:
17
+ expr_type: AND
18
+ sub_exprs:
19
+ - holding(goal0|0, robot_0)
20
+ stage_1:
21
+ expr_type: AND
22
+ sub_exprs:
23
+ - object_at(goal0|0,TARGET_goal0|0)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/rearrange_easy.yaml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ objects:
2
+ - name: goal0|0
3
+ expr_type: movable_entity_type
4
+ - name: TARGET_goal0|0
5
+ expr_type: goal_entity_type
6
+ - name: robot_0
7
+ expr_type: robot_entity_type
8
+
9
+ goal:
10
+ expr_type: AND
11
+ sub_exprs:
12
+ - object_at(goal0|0,TARGET_goal0|0)
13
+ - not_holding(robot_0)
14
+
15
+ stage_goals:
16
+ stage_0_5:
17
+ expr_type: AND
18
+ sub_exprs:
19
+ - holding(goal0|0, robot_0)
20
+ stage_1:
21
+ expr_type: AND
22
+ sub_exprs:
23
+ - object_at(goal0|0,TARGET_goal0|0)
24
+
25
+ solution:
26
+ - nav(goal0|0, robot_0)
27
+ - pick(goal0|0, robot_0)
28
+ - nav(TARGET_goal0|0, robot_0)
29
+ - place(goal0|0, TARGET_goal0|0, robot_0)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/set_table.yaml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ objects:
2
+ - name: bowl_target|0
3
+ expr_type: movable_entity_type
4
+ - name: TARGET_bowl_target|0
5
+ expr_type: goal_entity_type
6
+ - name: fruit_target|1
7
+ expr_type: movable_entity_type
8
+ - name: TARGET_fruit_target|1
9
+ expr_type: goal_entity_type
10
+ - name: robot_0
11
+ expr_type: robot_entity_type
12
+
13
+ init:
14
+ - closed_fridge(fridge_push_point)
15
+ - closed_cab(cab_push_point_4)
16
+ - closed_cab(cab_push_point_5)
17
+ - closed_cab(cab_push_point_6)
18
+ - closed_cab(cab_push_point_7)
19
+
20
+ goal:
21
+ expr_type: AND
22
+ sub_exprs:
23
+ - object_at(bowl_target|0,TARGET_bowl_target|0)
24
+ - object_at(fruit_target|1,TARGET_fruit_target|1)
25
+ - not_holding(robot_0)
26
+ stage_goals:
27
+ stage_0_5:
28
+ expr_type: AND
29
+ sub_exprs:
30
+ - holding(bowl_target|0, robot_0)
31
+ stage_1:
32
+ expr_type: AND
33
+ sub_exprs:
34
+ - object_at(bowl_target|0,TARGET_bowl_target|0)
35
+ - not_holding(robot_0)
36
+ stage_1_5:
37
+ expr_type: AND
38
+ sub_exprs:
39
+ - object_at(bowl_target|0,TARGET_bowl_target|0)
40
+ - holding(fruit_target|1, robot_0)
41
+ stage_2:
42
+ expr_type: AND
43
+ sub_exprs:
44
+ - object_at(bowl_target|0,TARGET_bowl_target|0)
45
+ - object_at(fruit_target|1,TARGET_fruit_target|1)
46
+
47
+ solution:
48
+ - nav_to_receptacle(cab_push_point_5,bowl_target|0, robot_0)
49
+ - open_cab(cab_push_point_5,bowl_target|0, robot_0)
50
+ - pick(bowl_target|0, robot_0)
51
+ - nav(TARGET_bowl_target|0, robot_0)
52
+ - place(bowl_target|0,TARGET_bowl_target|0, robot_0)
53
+
54
+ - nav_to_receptacle(fridge_push_point,fruit_target|1, robot_0)
55
+ - open_fridge(fridge_push_point, fruit_target|1, robot_0)
56
+ - nav(fruit_target|1, robot_0)
57
+ - pick(fruit_target|1, robot_0)
58
+ - nav(TARGET_fruit_target|1, robot_0)
59
+ - place(fruit_target|1,TARGET_fruit_target|1, robot_0)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/tidy_house.yaml ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ objects:
2
+ - name: any_targets|0
3
+ expr_type: movable_entity_type
4
+ - name: TARGET_any_targets|0
5
+ expr_type: goal_entity_type
6
+ - name: any_targets|1
7
+ expr_type: movable_entity_type
8
+ - name: TARGET_any_targets|1
9
+ expr_type: goal_entity_type
10
+ - name: any_targets|2
11
+ expr_type: movable_entity_type
12
+ - name: TARGET_any_targets|2
13
+ expr_type: goal_entity_type
14
+ - name: any_targets|3
15
+ expr_type: movable_entity_type
16
+ - name: TARGET_any_targets|3
17
+ expr_type: goal_entity_type
18
+ - name: any_targets|4
19
+ expr_type: movable_entity_type
20
+ - name: TARGET_any_targets|4
21
+ expr_type: goal_entity_type
22
+ - name: robot_0
23
+ expr_type: robot_entity_type
24
+
25
+
26
+ init:
27
+ - closed_fridge(fridge_push_point)
28
+
29
+
30
+ goal:
31
+ expr_type: AND
32
+ sub_exprs:
33
+ - object_at(any_targets|0,TARGET_any_targets|0)
34
+ - object_at(any_targets|1,TARGET_any_targets|1)
35
+ - object_at(any_targets|2,TARGET_any_targets|2)
36
+ - object_at(any_targets|3,TARGET_any_targets|3)
37
+ - object_at(any_targets|4,TARGET_any_targets|4)
38
+ - not_holding(robot_0)
39
+
40
+ stage_goals:
41
+ stage_0_5:
42
+ expr_type: AND
43
+ sub_exprs:
44
+ - holding(any_targets|0, robot_0)
45
+ stage_1:
46
+ expr_type: AND
47
+ sub_exprs:
48
+ - object_at(any_targets|0,TARGET_any_targets|0)
49
+ - not_holding(robot_0)
50
+ stage_1_5:
51
+ expr_type: AND
52
+ sub_exprs:
53
+ - object_at(any_targets|0,TARGET_any_targets|0)
54
+ - holding(any_targets|1, robot_0)
55
+ stage_2:
56
+ expr_type: AND
57
+ sub_exprs:
58
+ - object_at(any_targets|0,TARGET_any_targets|0)
59
+ - object_at(any_targets|1,TARGET_any_targets|1)
60
+ - not_holding(robot_0)
61
+ stage_2_5:
62
+ expr_type: AND
63
+ sub_exprs:
64
+ - object_at(any_targets|0,TARGET_any_targets|0)
65
+ - object_at(any_targets|1,TARGET_any_targets|1)
66
+ - holding(any_targets|2, robot_0)
67
+ stage_3:
68
+ expr_type: AND
69
+ sub_exprs:
70
+ - object_at(any_targets|0,TARGET_any_targets|0)
71
+ - object_at(any_targets|1,TARGET_any_targets|1)
72
+ - object_at(any_targets|2,TARGET_any_targets|2)
73
+ - not_holding(robot_0)
74
+ stage_3_5:
75
+ expr_type: AND
76
+ sub_exprs:
77
+ - object_at(any_targets|0,TARGET_any_targets|0)
78
+ - object_at(any_targets|1,TARGET_any_targets|1)
79
+ - object_at(any_targets|2,TARGET_any_targets|2)
80
+ - holding(any_targets|3, robot_0)
81
+ stage_4:
82
+ expr_type: AND
83
+ sub_exprs:
84
+ - object_at(any_targets|0,TARGET_any_targets|0)
85
+ - object_at(any_targets|1,TARGET_any_targets|1)
86
+ - object_at(any_targets|2,TARGET_any_targets|2)
87
+ - object_at(any_targets|3,TARGET_any_targets|3)
88
+ - not_holding(robot_0)
89
+ stage_4_5:
90
+ expr_type: AND
91
+ sub_exprs:
92
+ - object_at(any_targets|0,TARGET_any_targets|0)
93
+ - object_at(any_targets|1,TARGET_any_targets|1)
94
+ - object_at(any_targets|2,TARGET_any_targets|2)
95
+ - object_at(any_targets|3,TARGET_any_targets|3)
96
+ - object_at(any_targets|4,TARGET_any_targets|4)
97
+
98
+ solution:
99
+ - nav(any_targets|0, robot_0)
100
+ - pick(any_targets|0, robot_0)
101
+ - nav(TARGET_any_targets|0, robot_0)
102
+ - place(any_targets|0,TARGET_any_targets|0, robot_0)
103
+ - nav(any_targets|1, robot_0)
104
+ - pick(any_targets|1, robot_0)
105
+ - nav(TARGET_any_targets|1, robot_0)
106
+ - place(any_targets|1,TARGET_any_targets|1, robot_0)
107
+ - nav(any_targets|2, robot_0)
108
+ - pick(any_targets|2, robot_0)
109
+ - nav(TARGET_any_targets|2, robot_0)
110
+ - place(any_targets|2,TARGET_any_targets|2, robot_0)
111
+ - nav(any_targets|3, robot_0)
112
+ - pick(any_targets|3, robot_0)
113
+ - nav(TARGET_any_targets|3, robot_0)
114
+ - place(any_targets|3,TARGET_any_targets|3, robot_0)
115
+ - nav(any_targets|4, robot_0)
116
+ - pick(any_targets|4, robot_0)
117
+ - nav(TARGET_any_targets|4, robot_0)
118
+ - place(any_targets|4,TARGET_any_targets|4, robot_0)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/rearrange/pddl/tidy_house_2obj.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ objects:
2
+ - name: any_targets|0
3
+ expr_type: movable_entity_type
4
+ - name: TARGET_any_targets|0
5
+ expr_type: goal_entity_type
6
+ - name: any_targets|1
7
+ expr_type: movable_entity_type
8
+ - name: TARGET_any_targets|1
9
+ expr_type: goal_entity_type
10
+ - name: robot_0
11
+ expr_type: robot_entity_type
12
+
13
+ goal:
14
+ expr_type: AND
15
+ sub_exprs:
16
+ - object_at(any_targets|0,TARGET_any_targets|0)
17
+ - object_at(any_targets|1,TARGET_any_targets|1)
18
+ - not_holding(robot_0)
19
+
20
+ stage_goals:
21
+ stage_1_1:
22
+ expr_type: AND
23
+ sub_exprs:
24
+ - holding(any_targets|0, robot_0)
25
+ stage_1_2:
26
+ expr_type: AND
27
+ sub_exprs:
28
+ - object_at(any_targets|0,TARGET_any_targets|0)
29
+ stage_2_1:
30
+ expr_type: AND
31
+ sub_exprs:
32
+ - holding(any_targets|1, robot_0)
33
+ stage_2_2:
34
+ expr_type: AND
35
+ sub_exprs:
36
+ - object_at(any_targets|1,TARGET_any_targets|1)
37
+ solution:
38
+ - nav_to_goal(any_targets|0, robot_0)
39
+ - pick(any_targets|0, robot_0)
40
+ - nav_to_obj(TARGET_any_targets|0, robot_0)
41
+ - place(any_targets|0,TARGET_any_targets|0, robot_0)
42
+ - nav_to_goal(any_targets|1, robot_0)
43
+ - pick(any_targets|1, robot_0)
44
+ - nav_to_obj(TARGET_any_targets|1, robot_0)
45
+ - place(any_targets|1,TARGET_any_targets|1, robot_0)
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/habitat/task/vln_r2r.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ defaults:
2
+ - task_config_base
3
+ - actions:
4
+ - stop
5
+ - move_forward
6
+ - turn_left
7
+ - turn_right
8
+ - measurements:
9
+ - distance_to_goal
10
+ - success
11
+ - spl
12
+ - lab_sensors:
13
+ - instruction_sensor
14
+ - _self_
15
+
16
+
17
+ type: VLN-v0
world-in-world/src/habitat-baselines/habitat-lab/habitat/config/read_write.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Meta Platforms, Inc. and its affiliates.
2
+ # This source code is licensed under the MIT license found in the
3
+ # LICENSE file in the root directory of this source tree.
4
+
5
+ from contextlib import contextmanager
6
+ from typing import Any, Generator
7
+
8
+ from omegaconf import Container, OmegaConf
9
+ from omegaconf.base import Node
10
+
11
+
12
+ @contextmanager
13
+ def read_write(config: Any) -> Generator[Node, None, None]:
14
+ r"""
15
+ Temporarily authorizes the modification of a OmegaConf configuration
16
+ within a context. Use the 'with' statement to enter the context.
17
+
18
+ :param config: The configuration object that should get writing access
19
+ """
20
+ assert isinstance(config, Container)
21
+ prev_state_readonly = config._get_node_flag("readonly")
22
+ prev_state_struct = config._get_node_flag("struct")
23
+ try:
24
+ OmegaConf.set_struct(config, False)
25
+ OmegaConf.set_readonly(config, False)
26
+ yield config
27
+ finally:
28
+ OmegaConf.set_readonly(config, prev_state_readonly)
29
+ OmegaConf.set_struct(config, prev_state_struct)
world-in-world/src/habitat-baselines/habitat-lab/habitat/py.typed ADDED
@@ -0,0 +1 @@
 
 
1
+ # Marker file for PEP 561. This tells mypy that the package uses inline types.
world-in-world/src/habitat-baselines/habitat-lab/habitat/version.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ # Copyright (c) Meta Platforms, Inc. and its affiliates.
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ VERSION = "0.3.3"