robosuite.renderers.igibson package
Submodules
robosuite.renderers.igibson.igibson_renderer module
robosuite.renderers.igibson.igibson_utils module
- class robosuite.renderers.igibson.igibson_utils.MujocoCamera(camera_link_name, offset_pos=array([0, 0, 0]), offset_ori=array([0, 0, 0, 1]), fov=45, active=True, modes=None, camera_name=None, mujoco_env=None)
Bases:
object
Camera class to define camera locations and its activation state (to render from them or not)
- activate()
- deactivate()
- get_pose()
- is_active()
- switch()
- class robosuite.renderers.igibson.igibson_utils.MujocoRobot
Bases:
object
- class robosuite.renderers.igibson.igibson_utils.TensorObservable(name, sensor, corrupter=None, filter=None, delayer=None, sampling_rate=20, enabled=True, active=True)
Bases:
robosuite.utils.observables.Observable
Extends observable class to handle torch tensors.
- update(timestep, obs_cache, force)
Updates internal values for this observable, if enabled.
- Parameters
timestep (float) – Amount of simulation time (in sec) that has passed since last call.
obs_cache (dict) – Observation cache mapping observable names to pre-computed values to pass to sensor. This will be updated in-place during this call.
force (bool) – If True, will force the observable to update its internal value to the newest value.
- robosuite.renderers.igibson.igibson_utils.adjust_convention(img, convention)
Inverts (could) the image according to the given convention
- Parameters
img (np.ndarray) – Image numpy array
convention (int) – -1 or 1 depending on macros.IMAGE_CONVENTION
- Returns
Inverted or non inverted (vertically) image.
- Return type
np.ndarray
- robosuite.renderers.igibson.igibson_utils.get_texture_id(intensity, name, self, resolution=1)
Create dummy png or size resolution from intensity values and load the texture in renderer.
- Parameters
intensity (float, np.ndarray) – Could be any intensity value
name (string) – name which will be used to save the file
resolution (int, optional) – Resolution at which dummy texture file is written. Defaults to 1.
- Returns
texture_id of iG renderer.
- Return type
int
- robosuite.renderers.igibson.igibson_utils.load_object(renderer, geom, geom_name, geom_type, geom_orn, geom_pos, geom_rgba, geom_size, geom_scale, geom_material, parent_body, class_id, visual_objects, meshes)
Function that initializes the meshes in the memeory with appropriate materials.
- robosuite.renderers.igibson.igibson_utils.random_string()
Generate a random string.
robosuite.renderers.igibson.parser module
- class robosuite.renderers.igibson.parser.Parser(renderer, env, segmentation_type)
Bases:
robosuite.renderers.base_parser.BaseParser
- create_class_mapping()
Create class name to index mapping for both semantic and instance segmentation.
- get_class_id(geom_index, element_id)
Given index of the geom object get the class id based on self.segmentation type.
- parse_cameras()
Parse cameras and initialize the cameras.
- parse_geometries()
Iterate through each goemetry and load it in the iGibson renderer.
- parse_materials()
Parse all materials and use texture mapping to initialize materials
- parse_meshes()
Create mapping of meshes.
- parse_textures()
Parse and load all textures and store them