Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions gen/js/service/vision/v1/vision_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 49 additions & 1 deletion gen/js/service/vision/v1/vision_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lockfile = false
experimental = true
# (Josh) asdf plugins are just shell scripts that can impose dependencies on
# arbitrary cli tools and are just generally worse than all the other backend
# options. If we really need to we can reenable asdf but for now it's disabled
# options. If we really need to we can re-enable asdf but for now it's disabled
# to ensure it is not selected by any future `buf use` invocations.
disable_backends = ["asdf"]

Expand All @@ -29,7 +29,7 @@ go = "1.23"
# This one can be installed as a binary but it produces very slightly different output.
# Switch to that when upgrading.
"go:google.golang.org/grpc/cmd/protoc-gen-go-grpc" = "1.2.0"
golangci-lint = "1.61"
golangci-lint = "v1.61.0"
node = "22"
"npm:ts-protoc-gen" = "0.15.0"
protobuf = "3.20.2"
Expand All @@ -40,29 +40,29 @@ protoc-gen-go = "1.35.1"

[tasks.clean]
description = "Remove all untracked files"
run = 'git clean -fdx'
run = "git clean -fdx"

[tasks.buf]
description = "Compile protos for all platforms"
depends = ['buf-go', 'buf-web']
depends = ["buf-go", "buf-web"]

[tasks.buf-go]
description = "Compile protos for Go"
sources = ["proto/**/*.proto"]
outputs = ['**/*.pb.go', '**/*.pb.gw.go']
depends = ['lint-buf']
wait_for = ['clean']
outputs = ["**/*.pb.go", "**/*.pb.gw.go"]
depends = ["lint-buf"]
wait_for = ["clean"]
run = [
'buf generate --template ./proto/viam/buf.gen.yaml',
'buf generate --template ./proto/viam/buf.gen.tagger.yaml',
"buf generate --template ./proto/viam/buf.gen.yaml",
"buf generate --template ./proto/viam/buf.gen.tagger.yaml",
]

[tasks.buf-web]
description = "Compile protos for web (js/ts)"
sources = ["proto/**/*.proto"]
outputs = ['gen/js/**/*.js', 'gen/js/**/*.ts']
depends = ['lint-buf']
wait_for = ['clean']
outputs = ["gen/js/**/*.js", "gen/js/**/*.ts"]
depends = ["lint-buf"]
wait_for = ["clean"]
quiet = true
run = """
# Buf has very weird behavior where any protoc-gen-<whatever> in your path
Expand All @@ -82,17 +82,17 @@ run = """

[tasks.lint]
description = "Run all linters"
depends = ['lint-buf', 'lint-go']
depends = ["lint-buf", "lint-go"]

[tasks.lint-buf]
description = "Lint + format protos"
wait_for = ['clean']
run = ['buf lint', 'buf format -w']
wait_for = ["clean"]
run = ["buf lint", "buf format -w"]

[tasks.lint-go]
description = "Lint Go files"
wait_for = ['clean']
depends = ['lint-buf']
wait_for = ["clean"]
depends = ["lint-buf"]
run = """
{% raw %}
#!/usr/bin/env bash
Expand Down
27 changes: 18 additions & 9 deletions proto/viam/service/vision/v1/vision.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,40 @@ option java_package = "com.viam.service.vision.v1";

// VisionService declares the gRPC contract for a vision service
service VisionService {
// GetDetectionsFromCamera will return a list of detections in the next image given a camera and a detector
// GetDetectionsFromCamera will return a list of detections in the next image
// given a camera and a detector
rpc GetDetectionsFromCamera(GetDetectionsFromCameraRequest) returns (GetDetectionsFromCameraResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/camera_detections"};
}

// GetDetections will return a list of detections in the next image given the image bytes and a detector
// GetDetections will return a list of detections in the next image given the
// image bytes and a detector
rpc GetDetections(GetDetectionsRequest) returns (GetDetectionsResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/detections"};
}

// GetClassificationsFromCamera will return a list of classifications in the next image given a camera and a classifier
// GetClassificationsFromCamera will return a list of classifications in the
// next image given a camera and a classifier
rpc GetClassificationsFromCamera(GetClassificationsFromCameraRequest) returns (GetClassificationsFromCameraResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/camera_classifications"};
}

// GetClassifications will return a list of classifications in the next image given the image bytes and a classifier
// GetClassifications will return a list of classifications in the next image
// given the image bytes and a classifier
rpc GetClassifications(GetClassificationsRequest) returns (GetClassificationsResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/classifications"};
}

// GetObjectPointClouds returns all the found objects in a pointcloud from a camera of the underlying robot,
// as well as the 3-vector center of each of the found objects.
// A specific MIME type can be requested but may not necessarily be the same one returned.
// GetObjectPointClouds returns all the found objects in a pointcloud from a
// camera of the underlying robot, as well as the 3-vector center of each of
// the found objects. A specific MIME type can be requested but may not
// necessarily be the same one returned.
rpc GetObjectPointClouds(GetObjectPointCloudsRequest) returns (GetObjectPointCloudsResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/object_point_clouds"};
}

// GetProperties will return the properties as booleans given the name of the vision service
// GetProperties will return the properties as booleans given the name of the
// vision service
rpc GetProperties(GetPropertiesRequest) returns (GetPropertiesResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/vision/{name}/get_properties"};
}
Expand Down Expand Up @@ -102,7 +108,8 @@ message Detection {
double confidence = 5;
// label associated with the detected object
string class_name = 6;
// the four corners of the box, in proportion to the respective image dimension
// the four corners of the box, in proportion to the respective image
// dimension
optional double x_min_normalized = 7;
optional double y_min_normalized = 8;
optional double x_max_normalized = 9;
Expand Down Expand Up @@ -209,4 +216,6 @@ message GetPropertiesResponse {
bool detections_supported = 2;
// whether or not 3d segmentation is supported by the vision service
bool object_point_clouds_supported = 3;
// the default camera used for *FromCamera and GetObjectPointClouds calls
optional string default_camera = 4;
}
Loading
Loading