Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-7468: add captureAll method #494

Merged
merged 3 commits into from
May 9, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions proto/viam/service/vision/v1/vision.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package viam.service.vision.v1;

import "common/v1/common.proto";
import "component/camera/v1/camera.proto";
import "google/api/annotations.proto";
import "google/protobuf/struct.proto";

Expand Down Expand Up @@ -55,6 +56,12 @@ service VisionService {
};
}

rpc CaptureAllFromCamera(CaptureAllFromCameraRequest) returns (CaptureAllFromCameraResponse) {
option (google.api.http) = {
post: "/viam/api/v1/service/vision/{name}/capture_all"
};
}

// DoCommand sends/receives arbitrary commands
rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -176,6 +183,31 @@ message GetPropertiesRequest {
google.protobuf.Struct extra = 99;
}

message CaptureAllFromCameraRequest {
// name of the vision service
string name = 1;
// name of camera source to use as input
string camera_name = 2;
// whether or not including the image in the response
bool return_image = 3;
// whether or not including classifications in the response
bool return_classifications = 4;
// whether or not including detections in the response
bool return_detections = 5;
// whether or not including pcd in the response
bool return_object_point_clouds = 6;

google.protobuf.Struct extra = 99;
}

message CaptureAllFromCameraResponse {
component.camera.v1.Image image = 1;
repeated Detection detections = 2;
repeated Classification classifications = 3;
repeated common.v1.PointCloudObject objects = 4;
google.protobuf.Struct extra = 99;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think extra needs to be included in the response?

Copy link
Member

@bhaney bhaney May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually in the scope for the message to also have extra in the response
https://docs.google.com/document/d/119ITK_p0xKyYBTlyksYUEjsHm_lAx3b4c9CaJNtdOnI/edit#heading=h.tcicyojyqi6c

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah cool!

}

message GetPropertiesResponse {
// whether or not classifactions are supported by the vision service
bool classifications_supported = 1;
Expand Down
Loading