diff --git a/omnigibson/envs/env_base.py b/omnigibson/envs/env_base.py index bae61a23f..51ebda492 100644 --- a/omnigibson/envs/env_base.py +++ b/omnigibson/envs/env_base.py @@ -538,7 +538,7 @@ def scene_config(self): Returns: dict: Scene-specific configuration kwargs """ - return dict(self.config["scene"], robot_config_override=self.config["robots"]) + return self.config["scene"] @property def robots_config(self): diff --git a/omnigibson/scenes/interactive_traversable_scene.py b/omnigibson/scenes/interactive_traversable_scene.py index cf014742b..d261cfb3d 100644 --- a/omnigibson/scenes/interactive_traversable_scene.py +++ b/omnigibson/scenes/interactive_traversable_scene.py @@ -34,7 +34,6 @@ def __init__( load_task_relevant_only=False, seg_map_resolution=0.1, include_robots=True, - override_robot_config=None ): """ Args: @@ -56,7 +55,6 @@ def __init__( load_task_relevant_only (bool): Whether only task relevant objects (and building structure) should be loaded seg_map_resolution (float): room segmentation map resolution include_robots (bool): whether to also include the robot(s) defined in the scene - override_robot_config (None or dict): if specified, this will override the robot config defined in the scene """ # Store attributes from inputs @@ -97,7 +95,6 @@ def __init__( num_waypoints=num_waypoints, waypoint_resolution=waypoint_resolution, use_floor_plane=False, - override_robot_config=override_robot_config, ) def get_scene_loading_info(self, scene_model, scene_instance=None): diff --git a/omnigibson/scenes/scene_base.py b/omnigibson/scenes/scene_base.py index 0620114bd..c4ff28fd2 100644 --- a/omnigibson/scenes/scene_base.py +++ b/omnigibson/scenes/scene_base.py @@ -40,7 +40,6 @@ def __init__( floor_plane_visible=True, use_skybox=True, floor_plane_color=(1.0, 1.0, 1.0), - override_robot_config=None, ): """ Args: @@ -50,7 +49,6 @@ def __init__( floor_plane_visible (bool): whether to render the additionally added floor plane floor_plane_color (3-array): if @floor_plane_visible is True, this determines the (R,G,B) color assigned to the generated floor plane - override_robot_config (None or dict): if specified, this will override the robot config defined in the scene """ # Store internal variables self.scene_file = scene_file @@ -63,7 +61,6 @@ def __init__( self._use_floor_plane = use_floor_plane self._floor_plane_visible = floor_plane_visible self._floor_plane_color = floor_plane_color - self._override_robot_config = override_robot_config self._floor_plane = None self._use_skybox = use_skybox self._skybox = None diff --git a/omnigibson/scenes/traversable_scene.py b/omnigibson/scenes/traversable_scene.py index b1c196461..f57f125bf 100644 --- a/omnigibson/scenes/traversable_scene.py +++ b/omnigibson/scenes/traversable_scene.py @@ -25,7 +25,6 @@ def __init__( use_floor_plane=True, floor_plane_visible=True, floor_plane_color=(1.0, 1.0, 1.0), - override_robot_config=None ): """ Args: @@ -42,7 +41,6 @@ def __init__( floor_plane_visible (bool): whether to render the additionally added floor plane floor_plane_color (3-array): if @floor_plane_visible is True, this determines the (R,G,B) color assigned to the generated floor plane - override_robot_config (None or dict): if specified, this will override the robot config defined in the scene """ log.info("TraversableScene model: {}".format(scene_model)) self.scene_model = scene_model @@ -62,7 +60,6 @@ def __init__( use_floor_plane=use_floor_plane, floor_plane_visible=floor_plane_visible, floor_plane_color=floor_plane_color, - override_robot_config=override_robot_config ) @property diff --git a/omnigibson/utils/python_utils.py b/omnigibson/utils/python_utils.py index d00c51d5d..7fcdf146c 100644 --- a/omnigibson/utils/python_utils.py +++ b/omnigibson/utils/python_utils.py @@ -131,25 +131,18 @@ def get_init_info(self): return self._init_info -def create_object_from_init_info(init_info, override_robot_config=None): +def create_object_from_init_info(init_info): """ Create a new object based on given init info. Args: init_info (dict): Nested dictionary that contains an object's init information. - override_robot_config (None or dict): If specified, will override the robot config specified in @init_info Returns: any: Newly created object. """ - from omnigibson.robots.robot_base import BaseRobot - module = import_module(init_info["class_module"]) cls = getattr(module, init_info["class_name"]) - - if issubclass(cls, BaseRobot) and override_robot_config: - return cls(**override_robot_config) - return cls(**init_info["args"], **init_info.get("kwargs", {}))