-
Notifications
You must be signed in to change notification settings - Fork 85
APP-8003 Add world state store service #695
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
base: main
Are you sure you want to change the base?
Changes from all commits
da7fd20
2e6e723
bd38820
e49a505
c8955f4
6ff06db
54dbdad
0827571
71b79a2
1d2beb3
a5b6b70
cb96833
a894cb6
d9ed491
0652b6a
f074c79
51ac7eb
cbb4e7a
175608f
c433043
31808f2
710b32d
600c336
6ff033e
e1518db
b5b5e39
590baa4
22b41a5
2730ae0
eb02687
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
syntax = "proto3"; | ||
|
||
package viam.service.worldstatestore.v1; | ||
|
||
import "common/v1/common.proto"; | ||
import "google/api/annotations.proto"; | ||
import "google/protobuf/field_mask.proto"; | ||
import "google/protobuf/struct.proto"; | ||
|
||
option go_package = "go.viam.com/api/service/worldstatestore/v1"; | ||
option java_package = "com.viam.service.worldstatestore.v1"; | ||
|
||
service WorldStateStoreService { | ||
// ListUUIDs returns all world state transform UUIDs | ||
rpc ListUUIDs(ListUUIDsRequest) returns (ListUUIDsResponse) {} | ||
|
||
// GetTransform returns a world state transform by uuid | ||
rpc GetTransform(GetTransformRequest) returns (GetTransformResponse) {} | ||
|
||
// StreamTransformChanges streams changes to world state transforms | ||
rpc StreamTransformChanges(StreamTransformChangesRequest) returns (stream StreamTransformChangesResponse) { | ||
option (google.api.http) = {get: "/viam/api/v1/service/worldstatestore/{name}/stream_transform_changes"}; | ||
} | ||
Comment on lines
+20
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this based on a conversation with @stevebriskin and @micheal-parks . The intention of this RPC is to allow visualization tools to open a stream and listen for change events from this service. We define a change event as one of the following: // TransformChangeType is the type of change that has occurred for a transform.
enum TransformChangeType {
TRANSFORM_CHANGE_TYPE_UNSPECIFIED = 0;
TRANSFORM_CHANGE_TYPE_ADDED = 1;
TRANSFORM_CHANGE_TYPE_REMOVED = 2;
TRANSFORM_CHANGE_TYPE_UPDATED = 3;
} When an implementor of this service is going to message StreamTransformChangesResponse {
TransformChangeType change_type = 1;
common.v1.Transform transform = 2;
// The field mask of the Transform that has changed, if any. For added transforms, this will be empty. For updated
// transforms, this will be the fields that have changed. For removed transforms, this will be the Transform's UUID
// path.
google.protobuf.FieldMask updated_fields = 3;
} Note we use a The field mask will enable the implementor to reduce the amount of data sent over the wire in a stream response to only the relevant data, allowing the client to understand how to manage each event it receives quickly. This should be particularly helpful when dealing with |
||
|
||
// DoCommand sends/receives arbitrary commands | ||
rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) { | ||
raybjork marked this conversation as resolved.
Show resolved
Hide resolved
|
||
option (google.api.http) = {post: "/viam/api/v1/service/worldstatestore/{name}/do_command"}; | ||
} | ||
} | ||
|
||
message ListUUIDsRequest { | ||
// Name of the world object store service | ||
string name = 1; | ||
|
||
// Additional arguments to the method | ||
google.protobuf.Struct extra = 99; | ||
} | ||
|
||
message ListUUIDsResponse { | ||
repeated bytes uuids = 1; | ||
} | ||
|
||
message GetTransformRequest { | ||
// Name of the world object store service | ||
string name = 1; | ||
|
||
bytes uuid = 2; | ||
|
||
// Additional arguments to the method | ||
google.protobuf.Struct extra = 99; | ||
} | ||
|
||
message GetTransformResponse { | ||
common.v1.Transform transform = 2; | ||
} | ||
|
||
enum TransformChangeType { | ||
TRANSFORM_CHANGE_TYPE_UNSPECIFIED = 0; | ||
TRANSFORM_CHANGE_TYPE_ADDED = 1; | ||
TRANSFORM_CHANGE_TYPE_REMOVED = 2; | ||
TRANSFORM_CHANGE_TYPE_UPDATED = 3; | ||
} | ||
|
||
message StreamTransformChangesRequest { | ||
// Name of the world object store service | ||
string name = 1; | ||
|
||
// Additional arguments to the method | ||
google.protobuf.Struct extra = 99; | ||
} | ||
|
||
message StreamTransformChangesResponse { | ||
TransformChangeType change_type = 1; | ||
common.v1.Transform transform = 2; | ||
|
||
// The field mask of the transform that has changed, if any. For added transforms, this will be empty. For updated | ||
// transforms, this will be the fields that have changed. For removed transforms, this will be the transform's UUID | ||
// path. | ||
google.protobuf.FieldMask updated_fields = 3; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still want to introduce the
Line
type if we are allowingTransform
to have multipleGeometry
s?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this has to do with Transform having multiple geometries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on this comment:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should line be
bytes
too to match Pointcloud?