Skip to main content

intrinsic.solutions.perception.Camera

Convenience wrapper for Camera.

channel

The grpc channel to the respective camera server.

handle

Resource handle for the camera.

resource_registry

Resource registry to fetch camera resources from.

executive

The executive for checking the state.

is_simulated

Whether or not the world is being simulated.

Methods

capture

View source

Performs grpc request to capture sensor images from the camera.

If the camera handle is no longer valid (eg, if the server returns a NOT_FOUND status), the camera will be reopened (once) on the camera server; if re-opening the camera fails an exception is raised.

Args

timeout

Timeout duration for Capture() service calls.

sensor_ids

List of selected sensor identifiers for Capture() service calls.

Returns

The acquired list of sensor images.

Raises

grpc.RpcError from the camera or resource service.

get_frame

View source

Performs grpc request to retrieve a frame from the camera.

If the camera handle is no longer valid (eg, if the server returns a NOT_FOUND status), the camera will be reopened (once) on the camera server; if re-opening the camera fails an exception is raised.

Args

timeout

Timeout duration for GetFrame() service calls.

skip_undistortion

If set to true the returned frame will be distorted.

encoding

The encoding of the image (UNSPECIFIED, PNG, JPEG, WEPB). If not set defaults to uncompressed.

Returns

The acquired frame.

Raises

grpc.RpcError from the camera or resource service.

show_capture

View source

Acquires and plots all sensor images from a capture call in a grid plot.

Args

figsize

Size of grid plot. It is defined as a (width, height) tuple with the dimensions in inches.

show_depth_frame

View source

Acquires and plots depth frame.

show_rgb_frame

View source

Acquires and plots frame.