-
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
Open
DTCurrie
wants to merge
33
commits into
main
Choose a base branch
from
APP-8003-add-world-object-store-service
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
da7fd20
Add world object store service
DTCurrie 2e6e723
forgot to save
DTCurrie bd38820
update from PR comments
DTCurrie e49a505
add missing extra params
DTCurrie c8955f4
add missing name field to requests
DTCurrie 6ff06db
cleanup
DTCurrie 54dbdad
Merge branch 'main' into APP-8003-add-world-object-store-service
DTCurrie 0827571
use world state
DTCurrie 71b79a2
Merge branch 'main' of github.com:viamrobotics/api into APP-8003-add-…
DTCurrie 1d2beb3
Merge branch 'APP-8003-add-world-object-store-service' of github.com:…
DTCurrie a5b6b70
rename to world state
DTCurrie cb96833
rename to world state
DTCurrie a894cb6
rename to world state
DTCurrie d9ed491
revert to discuss
DTCurrie 0652b6a
eol
DTCurrie f074c79
tweaks based on conversation with micheal parks
DTCurrie 51ac7eb
rename to world state
DTCurrie cbb4e7a
Merge branch 'main' into APP-8003-add-world-object-store-service
DTCurrie 175608f
fix doc comments
DTCurrie c433043
changes per convo
DTCurrie 31808f2
Merge branch 'APP-8003-add-world-object-store-service' of github.com:…
DTCurrie 710b32d
Merge branch 'main' of github.com:viamrobotics/api into APP-8003-add-…
DTCurrie 600c336
introduce changes as TransformNew
DTCurrie 6ff033e
cleanup, prepare to do quick test in SDKs
DTCurrie e1518db
Merge branch 'main' of github.com:viamrobotics/api into APP-8003-add-…
DTCurrie b5b5e39
Move to Tranform, consider adding streaming RPC
DTCurrie 590baa4
Merge branch 'main' of github.com:viamrobotics/api into APP-8003-add-…
DTCurrie 22b41a5
updates and add change stream rpc
DTCurrie 2730ae0
cleanup
DTCurrie eb02687
Merge branch 'main' into APP-8003-add-world-object-store-service
DTCurrie 2cbf3ee
Merge branch 'main' into APP-8003-add-world-object-store-service
DTCurrie a2d6ea0
remove Line
DTCurrie 742edc2
Merge branch 'APP-8003-add-world-object-store-service' of github.com:…
DTCurrie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
proto/viam/service/worldstatestore/v1/world_state_store.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}; | ||
} | ||
|
||
// 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; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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:
When an implementor of this service is going to
Send
a change message, they must define what type of change event is occurring in the response:Note we use a
FieldMask
, which will allow the implementor only to include fields that were changed during aTRANSFORM_CHANGE_TYPE_UPDATED
event, or just thechange_type
andtransform.uuid
fields for aTRANSFORM_CHANGE_TYPE_REMOVED
event.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
Transform
s that have large amounts of geometry data (like point clouds) or have large quantities of geometries defined.