Skip to content

Commit

Permalink
allow physics config passthrough in Habitat backend
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith committed May 4, 2020
1 parent be3b5f2 commit 5a92b12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyrobot/habitat/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ class HabitatSim(object):
"""Class that interfaces with Habitat sim"""

def __init__(
self, configs, scene_path=None, seed=0
self, configs, scene_path=None, physics_config=None, seed=0
): # TODO: extend the arguments of constructor
self.sim_config = copy.deepcopy(configs.COMMON.SIMULATOR)
self.sim_config.defrost()
if scene_path is not None:
self.sim_config.SCENE_ID = scene_path
if physics_config is not None:
self.sim_config.PHYSICS_CONFIG_FILE = physics_config
self.sim_config.PHYSICS = True
self.sim = habitat_sim.Simulator(make_cfg(self.sim_config))
self.set_seed(seed) # TODO: Not working!! Check with abhishek
print(self.sim_config)
Expand Down

0 comments on commit 5a92b12

Please sign in to comment.