Public API for module isaacsim.sensors.camera:#

Classes#

  • class Camera(BaseSensor)

    • def init(self, prim_path: str, name: str = ‘camera’, frequency: int | None = None, dt: float | None = None, resolution: tuple[int, int] | None = None, position: np.ndarray | None = None, orientation: np.ndarray | None = None, translation: np.ndarray | None = None, render_product_path: str = None, annotator_device: str = None)

    • def destroy(self)

    • [property] def supported_annotators(self) -> list[str]

    • def get_render_product_path(self) -> str

    • def set_frequency(self, value: int)

    • def get_frequency(self) -> float

    • def set_dt(self, value: float)

    • def get_dt(self) -> float

    • def get_current_frame(self, clone: bool = False) -> dict

    • def initialize(self, physics_sim_view: object = None, attach_rgb_annotator: bool = True)

    • def post_reset(self)

    • def resume(self)

    • def pause(self)

    • def is_paused(self) -> bool

    • def set_resolution(self, value: tuple[int, int], maintain_square_pixels: bool = True)

    • def get_resolution(self) -> tuple[int, int]

    • def get_aspect_ratio(self) -> float

    • def get_world_pose(self, camera_axes: str = ‘world’) -> tuple[np.ndarray, np.ndarray]

    • def set_world_pose(self, position: Sequence[float] | None = None, orientation: Sequence[float] | None = None, camera_axes: str = ‘world’)

    • def get_local_pose(self, camera_axes: str = ‘world’) -> tuple[np.ndarray, np.ndarray]

    • def set_local_pose(self, translation: Sequence[float] | None = None, orientation: Sequence[float] | None = None, camera_axes: str = ‘world’)

    • def attach_annotator(self, annotator_name: str, **kwargs: object)

    • def detach_annotator(self, annotator_name: str)

    • def add_rgb_to_frame(self, init_params: dict | None = None)

    • def remove_rgb_from_frame(self)

    • def add_normals_to_frame(self, init_params: dict | None = None)

    • def remove_normals_from_frame(self)

    • def add_motion_vectors_to_frame(self, init_params: dict | None = None)

    • def remove_motion_vectors_from_frame(self)

    • def add_occlusion_to_frame(self, init_params: dict | None = None)

    • def remove_occlusion_from_frame(self)

    • def add_distance_to_image_plane_to_frame(self, init_params: dict | None = None)

    • def remove_distance_to_image_plane_from_frame(self)

    • def add_distance_to_camera_to_frame(self, init_params: dict | None = None)

    • def remove_distance_to_camera_from_frame(self)

    • def add_bounding_box_2d_tight_to_frame(self, init_params: dict | None = None)

    • def remove_bounding_box_2d_tight_from_frame(self)

    • def add_bounding_box_2d_loose_to_frame(self, init_params: dict | None = None)

    • def remove_bounding_box_2d_loose_from_frame(self)

    • def add_bounding_box_3d_to_frame(self, init_params: dict | None = None)

    • def remove_bounding_box_3d_from_frame(self)

    • def add_semantic_segmentation_to_frame(self, init_params: dict | None = None)

    • def remove_semantic_segmentation_from_frame(self)

    • def add_instance_id_segmentation_to_frame(self, init_params: dict | None = None)

    • def remove_instance_id_segmentation_from_frame(self)

    • def add_instance_segmentation_to_frame(self, init_params: dict | None = None)

    • def remove_instance_segmentation_from_frame(self)

    • def add_pointcloud_to_frame(self, include_unlabelled: bool = True, init_params: dict | None = None)

    • def remove_pointcloud_from_frame(self)

    • def get_rgba(self, device: str = None) -> np.ndarray | wp.array

    • def get_rgb(self, device: str = None) -> np.ndarray | wp.array

    • def get_depth(self, device: str = None) -> np.ndarray | wp.array

    • def get_pointcloud(self, device: str = None, world_frame: bool = True) -> np.ndarray | wp.array

    • def get_focal_length(self) -> float

    • def set_focal_length(self, value: float)

    • def get_focus_distance(self) -> float

    • def set_focus_distance(self, value: float)

    • def get_lens_aperture(self) -> float

    • def set_lens_aperture(self, value: float)

    • def get_horizontal_aperture(self) -> float

    • def set_horizontal_aperture(self, value: float, maintain_square_pixels: bool = True)

    • def get_vertical_aperture(self) -> float

    • def set_vertical_aperture(self, value: float, maintain_square_pixels: bool = True)

    • def get_clipping_range(self) -> tuple[float, float]

    • def set_clipping_range(self, near_distance: float | None = None, far_distance: float | None = None)

    • def get_projection_type(self) -> str

    • def set_projection_type(self, value: str)

    • def get_lens_distortion_model(self) -> str

    • def set_lens_distortion_model(self, value: str)

    • def get_projection_mode(self) -> str

    • def set_projection_mode(self, value: str)

    • def get_stereo_role(self) -> str

    • def set_stereo_role(self, value: str)

    • def set_fisheye_polynomial_properties(self, nominal_width: float | None, nominal_height: float | None, optical_centre_x: float | None, optical_centre_y: float | None, max_fov: float | None, polynomial: Sequence[float] | None)

    • def set_matching_fisheye_polynomial_properties(self, nominal_width: float, nominal_height: float, optical_centre_x: float, optical_centre_y: float, max_fov: float | None, distortion_model: Sequence[float], distortion_fn: Callable)

    • def set_rational_polynomial_properties(self, nominal_width: float, nominal_height: float, optical_centre_x: float, optical_centre_y: float, max_fov: float | None, distortion_model: Sequence[float])

    • def set_kannala_brandt_properties(self, nominal_width: float, nominal_height: float, optical_centre_x: float, optical_centre_y: float, max_fov: float | None, distortion_model: Sequence[float])

    • def get_fisheye_polynomial_properties(self) -> tuple[float, float, float, float, float, list]

    • def set_shutter_properties(self, delay_open: float | None = None, delay_close: float | None = None)

    • def get_shutter_properties(self) -> tuple[float, float]

    • def get_view_matrix_ros(self, device: str = None, backend_utils_cls: type = None) -> np.ndarray | torch.Tensor | wp.array

    • def get_intrinsics_matrix(self, device: str = None, backend_utils_cls: type = None) -> np.ndarray | torch.Tensor | wp.array

    • def get_image_coords_from_world_points(self, points_3d: np.ndarray) -> np.ndarray

    • def get_camera_points_from_image_coords(self, points_2d: object, depth: object, device: str = None, backend_utils_cls: type = None) -> np.ndarray | torch.Tensor | wp.array

    • def get_world_points_from_image_coords(self, points_2d: object, depth: object, device: str = None, backend_utils_cls: type = None) -> np.ndarray | torch.Tensor | wp.array

    • def get_horizontal_fov(self) -> float

    • def get_vertical_fov(self) -> float

    • def set_ftheta_properties(self, nominal_height: float | None = None, nominal_width: float | None = None, optical_center: tuple[float, float] | None = None, max_fov: float | None = None, distortion_coefficients: Sequence[float] | None = None)

    • def get_ftheta_properties(self) -> tuple[float, float, tuple[float, float], float, list[float]]

    • def set_kannala_brandt_k3_properties(self, nominal_height: float | None = None, nominal_width: float | None = None, optical_center: tuple[float, float] | None = None, max_fov: float | None = None, distortion_coefficients: Sequence[float] | None = None)

    • def get_kannala_brandt_k3_properties(self) -> tuple[float, float, tuple[float, float], float, list[float]]

    • def set_rad_tan_thin_prism_properties(self, nominal_height: float | None = None, nominal_width: float | None = None, optical_center: tuple[float, float] | None = None, max_fov: float | None = None, distortion_coefficients: Sequence[float] | None = None)

    • def get_rad_tan_thin_prism_properties(self) -> tuple[float, float, tuple[float, float], float, list[float]]

    • def set_lut_properties(self, nominal_height: float | None = None, nominal_width: float | None = None, optical_center: tuple[float, float] | None = None, ray_enter_direction_texture: str | None = None, ray_exit_position_texture: str | None = None)

    • def get_lut_properties(self) -> tuple[float, float, tuple[float, float], str, str]

    • def set_opencv_pinhole_properties(self, cx: float | None = None, cy: float | None = None, fx: float | None = None, fy: float | None = None, pinhole: list[float] | None = None)

    • def get_opencv_pinhole_properties(self) -> tuple[float, float, float, float, list]

    • def set_opencv_fisheye_properties(self, cx: float | None = None, cy: float | None = None, fx: float | None = None, fy: float | None = None, fisheye: list[float] | None = None)

    • def get_opencv_fisheye_properties(self) -> tuple[float, float, float, float, list]

  • class CameraView(XFormPrim)

    • def init(self, prim_paths_expr: str = None, name: str = ‘camera_prim_view’, camera_resolution: tuple[int, int] = (256, 256), output_annotators: list[str] | None = None, positions: np.ndarray | torch.Tensor | wp.array | None = None, translations: np.ndarray | torch.Tensor | wp.array | None = None, orientations: np.ndarray | torch.Tensor | wp.array | None = None, scales: np.ndarray | torch.Tensor | wp.array | None = None, visibilities: np.ndarray | torch.Tensor | wp.array | None = None, reset_xform_properties: bool = True)

    • def destroy(self)

    • def get_render_product_path(self) -> str

    • def set_resolutions(self, resolution: tuple[int, int])

    • def get_resolutions(self) -> tuple[int, int]

    • def get_aspect_ratios(self) -> float

    • def get_world_poses(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None, camera_axes: str = ‘world’, usd: bool = True) -> tuple[np.ndarray, np.ndarray] | tuple[torch.Tensor, torch.Tensor] | tuple[wp.indexedarray, wp.indexedarray]

    • def set_world_poses(self, positions: np.ndarray | torch.Tensor | wp.array | None = None, orientations: np.ndarray | torch.Tensor | wp.array | None = None, indices: np.ndarray | list | torch.Tensor | wp.array | None = None, camera_axes: str = ‘world’, usd: bool = True)

    • def get_local_poses(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None, camera_axes: str = ‘world’) -> tuple[np.ndarray, np.ndarray] | tuple[torch.Tensor, torch.Tensor] | tuple[wp.indexedarray, wp.indexedarray]

    • def set_local_poses(self, positions: np.ndarray | torch.Tensor | wp.array | None = None, orientations: np.ndarray | torch.Tensor | wp.array | None = None, indices: np.ndarray | list | torch.Tensor | wp.array | None = None, camera_axes: str = ‘world’)

    • def get_data(self, annotator_type: str) -> tuple[wp.array, dict[str, Any]]

    • def get_rgb_tiled(self, out: object = None, device: str = ‘cpu’) -> np.ndarray | torch.Tensor

    • def get_depth_tiled(self, out: object = None, device: str = ‘cpu’) -> np.ndarray | torch.Tensor

    • def get_rgb(self, out: object = None) -> torch.Tensor

    • def get_depth(self, out: object = None) -> torch.Tensor

    • def get_focal_lengths(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[float]

    • def set_focal_lengths(self, values: list[float], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_focus_distances(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[float]

    • def set_focus_distances(self, values: list[float], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_lens_apertures(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[float]

    • def set_lens_apertures(self, values: list[float], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_horizontal_apertures(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[float]

    • def set_horizontal_apertures(self, values: list[float], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_vertical_apertures(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[float]

    • def set_vertical_apertures(self, values: list[float], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_projection_types(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[str]

    • def set_projection_types(self, values: list[str], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_projection_modes(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[str]

    • def set_projection_modes(self, values: list[str], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_stereo_roles(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[str]

    • def set_stereo_roles(self, values: list[str], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)

    • def get_shutter_properties(self, indices: np.ndarray | list | torch.Tensor | wp.array | None = None) -> list[tuple[float, float]]

    • def set_shutter_properties(self, values: list[tuple[float, float]], indices: np.ndarray | list | torch.Tensor | wp.array | None = None)