Skip to content

Commit

Permalink
Add move single component, update "Move" to "PlanAndMove" (#1131)
Browse files Browse the repository at this point in the history
* First pass at implementing MoveSingleComponent

* fix buf

* Add tests, fix bug

* Lint, tweak some comments

* fix linting

* Address PR comments

* fix nil pointer error

* lint

* resources also needs to be bubbled up

Co-authored-by: Ray Bjorkman <raymond@viam.com>
  • Loading branch information
biotinker and raybjork committed Aug 9, 2022
1 parent 275adb6 commit 5669bd5
Show file tree
Hide file tree
Showing 13 changed files with 731 additions and 226 deletions.
403 changes: 290 additions & 113 deletions proto/api/service/motion/v1/motion.pb.go

Large diffs are not rendered by default.

123 changes: 104 additions & 19 deletions proto/api/service/motion/v1/motion.pb.gw.go

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

24 changes: 20 additions & 4 deletions proto/api/service/motion/v1/motion.proto
Expand Up @@ -10,9 +10,15 @@ option java_package = "com.viam.rdk.proto.api.service.motion.v1";

// A MotionService declares the gRPC contract for a motion service
service MotionService {
rpc Move(MoveRequest) returns (MoveResponse) {
rpc PlanAndMove(PlanAndMoveRequest) returns (PlanAndMoveResponse) {
option (google.api.http) = {
post: "/viam/api/v1/service/motion/move"
post: "/viam/api/v1/service/motion/planandmove"
};
}

rpc MoveSingleComponent(MoveSingleComponentRequest) returns (MoveSingleComponentResponse) {
option (google.api.http) = {
post: "/viam/api/v1/service/motion/movesinglecomponent"
};
}

Expand All @@ -23,13 +29,23 @@ service MotionService {
}
}

message MoveRequest {
message PlanAndMoveRequest {
common.v1.PoseInFrame destination = 1;
common.v1.ResourceName component_name = 2;
optional common.v1.WorldState world_state = 3;
}

message PlanAndMoveResponse {
bool success = 1;
}

message MoveSingleComponentRequest {
common.v1.PoseInFrame destination = 1;
common.v1.ResourceName component_name = 2;
optional common.v1.WorldState world_state = 3;
}

message MoveResponse {
message MoveSingleComponentResponse {
bool success = 1;
}

Expand Down
64 changes: 50 additions & 14 deletions proto/api/service/motion/v1/motion_grpc.pb.go

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

0 comments on commit 5669bd5

Please sign in to comment.