Viam C++ SDK current
|
gRPC client implementation of a Camera
component.
More...
#include <camera_client.hpp>
Public Types | |
using | interface_type = Camera |
Public Types inherited from viam::sdk::Camera | |
using | mime_types = std::vector<std::string> |
The supported mime types of the camera— a type alias. | |
using | depth_map = xt::xarray<uint16_t> |
Public Member Functions | |
CameraClient (std::string name, std::shared_ptr< grpc::Channel > channel) | |
AttributeMap | do_command (const AttributeMap &command) override |
Send/receive arbitrary commands to the resource. | |
raw_image | get_image (std::string mime_type, const AttributeMap &extra) override |
Get the next image from the camera as a raw image. | |
image_collection | get_images () override |
Get the next images from the camera as a vector of raw images with names and metadata. | |
point_cloud | get_point_cloud (std::string mime_type, const AttributeMap &extra) override |
Get the next point_cloud from the camera. | |
properties | get_properties () override |
Get the camera's properties. | |
std::vector< GeometryConfig > | get_geometries (const AttributeMap &extra) override |
Returns GeometryConfig s associated with the calling camera. | |
std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfig s associated with the calling camera. | |
virtual std::vector< GeometryConfig > | get_geometries (const AttributeMap &extra)=0 |
Returns GeometryConfig s associated with the calling camera. | |
raw_image | get_image (std::string mime_type) |
Get the next image from the camera as a raw image. | |
virtual raw_image | get_image (std::string mime_type, const AttributeMap &extra)=0 |
Get the next image from the camera as a raw image. | |
point_cloud | get_point_cloud (std::string mime_type) |
Get the next point_cloud from the camera. | |
virtual point_cloud | get_point_cloud (std::string mime_type, const AttributeMap &extra)=0 |
Get the next point_cloud from the camera. | |
Public Member Functions inherited from viam::sdk::Camera | |
raw_image | get_image (std::string mime_type) |
Get the next image from the camera as a raw image. | |
point_cloud | get_point_cloud (std::string mime_type) |
Get the next point_cloud from the camera. | |
std::vector< GeometryConfig > | get_geometries () |
Returns GeometryConfig s associated with the calling camera. | |
API | api () const override |
Returns the API associated with a particular resource. | |
Public Member Functions inherited from viam::sdk::Component | |
viam::common::v1::ResourceName | get_resource_name (std::string name) const override |
Returns a ResourceName for a particular resource name. | |
Public Member Functions inherited from viam::sdk::Resource | |
Resource (std::string name) | |
virtual std::string | name () const |
Return the resource's name. | |
Protected Member Functions | |
CameraClient (std::string name, std::unique_ptr< viam::component::camera::v1::CameraService::StubInterface > stub) | |
Protected Member Functions inherited from viam::sdk::Camera | |
Camera (std::string name) | |
Protected Member Functions inherited from viam::sdk::Component | |
Component (std::string name) | |
Additional Inherited Members | |
Static Public Member Functions inherited from viam::sdk::Camera | |
static std::vector< unsigned char > | encode_depth_map (const Camera::depth_map &m) |
static Camera::depth_map | decode_depth_map (const std::vector< unsigned char > &data) |
static std::string | normalize_mime_type (const std::string &str) |
remove any extra suffix's from the mime type string. | |
static std::string | format_to_MIME_string (viam::component::camera::v1::Format format) |
convert a protobuf format enum with a MIME type string. | |
static viam::component::camera::v1::Format | MIME_string_to_format (const std::string &mime_string) |
convert a MIME type string with a protobuf format enum. | |
static raw_image | from_proto (const viam::component::camera::v1::GetImageResponse &proto) |
Creates a raw_image struct from its proto representation. | |
static image_collection | from_proto (const viam::component::camera::v1::GetImagesResponse &proto) |
Creates a image_collection struct from its proto representation. | |
static point_cloud | from_proto (const viam::component::camera::v1::GetPointCloudResponse &proto) |
Creates a point_cloud struct from its proto representation. | |
static intrinsic_parameters | from_proto (const viam::component::camera::v1::IntrinsicParameters &proto) |
creates an intrinsic_parameters struct from its proto representation. | |
static distortion_parameters | from_proto (const viam::component::camera::v1::DistortionParameters &proto) |
creats a distortion_parameters struct from its proto representation. | |
static properties | from_proto (const viam::component::camera::v1::GetPropertiesResponse &proto) |
creates a properties struct from its proto representation. | |
static viam::component::camera::v1::DistortionParameters | to_proto (const distortion_parameters &) |
converts a distortion_parameters struct to its proto representation. | |
static viam::component::camera::v1::IntrinsicParameters | to_proto (const intrinsic_parameters &) |
converts an intrinsic_parameters struct to its proto representation. | |
Static Public Attributes inherited from viam::sdk::Camera | |
static const std::string | lazy_suffix |
gRPC client implementation of a Camera
component.
|
overridevirtual |
Send/receive arbitrary commands to the resource.
Command | the command to execute. |
Implements viam::sdk::Camera.
|
inline |
Returns GeometryConfig
s associated with the calling camera.
GeometryConfig
s associated with the component.
|
overridevirtual |
Returns GeometryConfig
s associated with the calling camera.
extra | Any additional arguments to the method. |
GeometryConfig
s associated with the component. Implements viam::sdk::Camera.
|
virtual |
Returns GeometryConfig
s associated with the calling camera.
extra | Any additional arguments to the method. |
GeometryConfig
s associated with the component. Implements viam::sdk::Camera.
|
inline |
Get the next image from the camera as a raw image.
mime_type | the desired mime_type of the image (does not guarantee output type). |
raw_image
.
|
overridevirtual |
Get the next image from the camera as a raw image.
mime_type | the desired mime_type of the image (does not guarantee output type). |
extra | any additional arguments to the method. |
raw_image
. Implements viam::sdk::Camera.
|
virtual |
Get the next image from the camera as a raw image.
mime_type | the desired mime_type of the image (does not guarantee output type). |
extra | any additional arguments to the method. |
raw_image
. Implements viam::sdk::Camera.
|
overridevirtual |
Get the next images from the camera as a vector of raw images with names and metadata.
Implements viam::sdk::Camera.
|
inline |
Get the next point_cloud
from the camera.
mime_type | the desired mime_type of the point_cloud (does not guarantee output type). |
point_cloud
.
|
overridevirtual |
Get the next point_cloud
from the camera.
mime_type | the desired mime_type of the point_cloud (does not guarantee output type). |
extra | any additional arguments to the method. |
point_cloud
. Implements viam::sdk::Camera.
|
virtual |
Get the next point_cloud
from the camera.
mime_type | the desired mime_type of the point_cloud (does not guarantee output type). |
extra | any additional arguments to the method. |
point_cloud
. Implements viam::sdk::Camera.
|
overridevirtual |