Skip to content

Commit 9684547

Browse files
authored
Merge pull request #1218 from StanfordVL/feat/data-collection
Data collection features and bug fixes
2 parents e0b8eb6 + 6bc110b commit 9684547

File tree

122 files changed

+19477
-5952
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+19477
-5952
lines changed

docs/modules/scenes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Every `Environment` instance includes a scene, defined by its config that is pas
2727
not_load_object_categories: null
2828
load_room_types: null
2929
load_room_instances: null
30-
seg_map_resolution: 0.1
30+
seg_map_resolution: 1.0
3131
```
3232

3333
Alternatively, a scene can be directly imported at runtime by first creating the scene class instance (e.g.: `scene = InteractiveTraversableScene(...)`) and then importing it via `og.sim.import_scene(obj)`. This can be useful for iteratively prototyping a desired scene configuration. Note that a scene _must_ be imported before any additional objects are imported!
@@ -49,7 +49,7 @@ The scene keeps track of and organizes all imported objects via its owned `scene
4949

5050
Similarly, systems can be queried via `scene.system_registry`.
5151

52-
In addition, a scene can always be reset by calling `reset()`. The scene's initial state is cached when the scene is first imported, but can manually be updated by calling `scene.update_initial_state(state)`, where `state` can either be a desired state (output of `og.sim.dump_state()`) or `None`, corresponding to the current sim state.
52+
In addition, a scene can always be reset by calling `reset()`. The scene's initial state is cached when the scene is first imported, but can manually be updated by calling `scene.update_initial_file(scene_file)`, where `scene_file` can either be a desired file (output of `scene.save()`) or `None`, corresponding to the current scene file.
5353

5454
## Types
5555
**`OmniGibson`** currently supports two types of scenes. The basic scene class `Scene` implements a minimal scene setup, which can optionally include a skybox and / or ground plane. The second scene class `InteractiveTraversableScene` represents a pre-cached, curated scene exclusively populated with fully-interactive objects from the BEHAVIOR-1K dataset. This scene type additionally includes traversability and semantic maps of the scene floorplan. For a breakdown of all the available scenes and the corresponding objects included in each scene, please refer our [Knowledgebase Dashboard](https://behavior.stanford.edu/knowledgebase/). Below, we provide brief snapshots of each of our 50 BEHAVIOR-1K scenes:

docs/modules/simulator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The simulator can be manually stepped, with or without physics / rendering (`sim
2626

2727
??? warning annotate "Cycling the sim can cause unexpected behavior"
2828

29-
If the simulator is playing and then suddenly stopped, all objects are immediately teleported back to their "canonical poses" -- i.e.: the corresponding global poses that were set _before_ the sim started playing. Thus, if `og.sim.play()` is immediately called after, the objects will _not_ teleport back to their respective pre-stopped poses. You can think of the canonical poses as a sort of "initial states", and we recommend explicitly setting a desired initial sim state configuration via `scene.update_initial_state()` and then calling `scene.reset()` after `og.sim.play()`.
29+
If the simulator is playing and then suddenly stopped, all objects are immediately teleported back to their "canonical poses" -- i.e.: the corresponding global poses that were set _before_ the sim started playing. Thus, if `og.sim.play()` is immediately called after, the objects will _not_ teleport back to their respective pre-stopped poses. You can think of the canonical poses as a sort of "initial states", and we recommend explicitly setting a desired initial sim scene file configuration via `scene.update_initial_file()` and then calling `scene.reset()` after `og.sim.play()`.
3030

3131
#### Modifying Physics
3232
If necessary, low-level physics behavior can also be set as well, via the physics interface (`sim.pi`), physics simulation interface (`sim.psi`), physics scene query interface (`sim.psqi`), and physics context (`sim.get_physics_context()`). The simulation timesteps can also be directly set via `sim.set_simulation_dt(...)`.

omnigibson/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import signal
66
import tempfile
77

8-
import nest_asyncio
9-
108
from omnigibson.controllers import REGISTERED_CONTROLLERS
119
from omnigibson.envs import Environment, VectorEnvironment
1210
from omnigibson.macros import gm
@@ -25,10 +23,7 @@
2523
os.getenv("ISAAC_JUPYTER_KERNEL") is not None
2624
) # We set this in the kernel.json file
2725

28-
# Always enable nest_asyncio because MaterialPrim calls asyncio.run()
29-
nest_asyncio.apply()
30-
31-
__version__ = "1.1.1"
26+
__version__ = "1.2.0-alpha"
3227

3328
root_path = os.path.dirname(os.path.realpath(__file__))
3429

omnigibson/action_primitives/starter_semantic_action_primitives.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
DifferentialDriveController,
3232
)
3333
from omnigibson.macros import create_module_macros
34+
from omnigibson.macros import macros
3435
from omnigibson.objects.object_base import BaseObject
3536
from omnigibson.robots import (
3637
R1,
@@ -231,6 +232,10 @@ def __init__(
231232
self._curobo_batch_size = curobo_batch_size
232233
self.debug_visual_marker = debug_visual_marker
233234

235+
# Action primitives uses assisted grasping; we ignore delayed AG here
236+
with macros.unlocked():
237+
macros.robots.manipulation_robot.GRASP_WINDOW = 0.0
238+
234239
@property
235240
def arm(self):
236241
assert isinstance(self.robot, ManipulationRobot), "Cannot use arm for non-manipulation robot"

omnigibson/action_primitives/symbolic_semantic_action_primitives.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ def _release(self):
195195
"Cannot release an object if you're not already holding an object",
196196
)
197197

198-
self.robot.release_grasp_immediately()
198+
for arm in self.robot.arm_names:
199+
self.robot.release_grasp_immediately(arm=arm)
199200
yield from self._settle_robot()
200201

201202
def _toggle(self, obj, value):

0 commit comments

Comments
 (0)