6#include <grpcpp/channel.h>
8#include <viam/api/common/v1/common.pb.h>
9#include <viam/api/component/camera/v1/camera.grpc.pb.h>
13#include <viam/sdk/config/resource.hpp>
27 ProtoStruct
do_command(
const ProtoStruct& command)
override;
32 std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra)
override;
52 std::unique_ptr<viam::component::camera::v1::CameraService::StubInterface> stub)
53 :
Camera(std::move(
name)), stub_(std::move(stub)){};
56 using StubType = viam::component::camera::v1::CameraService::StubInterface;
57 std::unique_ptr<StubType> stub_;
58 std::shared_ptr<grpc::Channel> channel_;
Defines a Camera component.
Implements a gRPC server for the Camera component.
A Camera represents any physical hardware that can capture frames.
Definition camera.hpp:28
raw_image get_image(std::string mime_type)
Get the next image from the camera as a raw image.
Definition camera.hpp:145
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling camera.
Definition camera.hpp:175
point_cloud get_point_cloud(std::string mime_type)
Get the next point_cloud from the camera.
Definition camera.hpp:163
virtual std::string name() const
Return the resource's name.
gRPC client implementation of a Camera component.
Definition camera_client.hpp:23
image_collection get_images() override
Get the next images from the camera as a vector of raw images with names and metadata.
properties get_properties() override
Get the camera's properties.
std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra) override
Returns GeometryConfigs associated with the calling camera.
ProtoStruct do_command(const ProtoStruct &command) override
Send/receive arbitrary commands to the resource.
raw_image get_image(std::string mime_type, const ProtoStruct &extra) override
Get the next image from the camera as a raw image.
point_cloud get_point_cloud(std::string mime_type, const ProtoStruct &extra) override
Get the next point_cloud from the camera.
gRPC client implementation for a robot.
a collection of images that were collected from a camera all at the same time.
Definition camera.hpp:91
The points and mime type of a point cloud.
Definition camera.hpp:73
The camera's supported features and settings.
Definition camera.hpp:53
the raw bytes, mime type of an image, and name of the source that produced it.
Definition camera.hpp:83