internutopia.core.sensor.camera#
camera#
- class internutopia.core.sensor.camera.ICamera[source]#
- abstract cleanup() None [source]#
Operations that need to be cleaned up before switching scenes (or resetting)
- classmethod create(simulator_type: str = 'isaac_sim', name: str = 'camera', prim_path: str | None = None, rgba: bool | None = True, distance_to_image_plane: bool | None = False, bounding_box_2d_tight: bool | None = False, camera_params: bool | None = False, resolution: Tuple[int, int] | None = None, position: Tuple[float, float, float] | None = None, translation: Tuple[float, float, float] | None = None, orientation: Tuple[float, float, float, float] | None = None) ICamera [source]#
Factory method to create ICamera instances based on simulator_type.
- Parameters:
simulator_type (str) – simulator type.
name (str) – The unique identifier for the camera.
prim_path (Optional[str]) – The primary path associated with the camera.
rgba (Optional[bool], default=False) – Whether to get rgba from the camera or not.
distance_to_image_plane (Optional[bool], default=False) – Whether to get distance_to_image_plane from the camera or not.
bounding_box_2d_tight (Optional[bool], default=False) – Whether to get bounding_box_2d_tight from the camera or not.
camera_params (Optional[bool], default=False) – Whether to get camera_params from the camera or not.
resolution (Optional[Tuple[int, int]], optional) – resolution of the camera (width, height). Defaults to None.
position (Optional[Tuple[float, float, float]], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.
translation (Optional[Tuple[float, float, float]], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.
orientation (Optional[Tuple[float, float, float, float]], optional) – quaternion orientation in the world/ local frame of the prim (depends if translation or position is specified). quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.
- abstract get_bounding_box_2d_tight() ndarray [source]#
- Returns:
Outputs a ‘tight’ 2d bounding box of each entity with semantics in the camera’s viewport. Tight bounding boxes bound only the visible pixels of entities. Completely occluded entities are omitted.
- abstract get_camera_params() ndarray [source]#
- Returns:
The Camera Parameters annotator returns the camera details for the camera corresponding to the render product to which the annotator is attached.