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-8542 expose plans generated from builtin motion service without executing them #4287

Merged
merged 18 commits into from
Sep 23, 2024
Merged
2 changes: 1 addition & 1 deletion motionplan/constraint.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ func NewConstraints(
// ConstraintsFromProtobuf converts a protobuf object to a Constraints object.
func ConstraintsFromProtobuf(pbConstraint *motionpb.Constraints) *Constraints {
if pbConstraint == nil {
return nil
return NewEmptyConstraints()
}

// iterate through all motionpb.LinearConstraint and convert to RDK form
Expand Down
1 change: 1 addition & 0 deletions referenceframe/primitives.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func JointPositionsFromRadians(radians []float64) *pb.JointPositions {
// InputEnabled is a standard interface for all things that interact with the frame system
// This allows us to figure out where they currently are, and then move them.
// Input units are always in meters or radians.
// TODO: this really belongs in the motion service theres nothing stateful about the referenceframe package.
raybjork marked this conversation as resolved.
Show resolved Hide resolved
type InputEnabled interface {
CurrentInputs(ctx context.Context) ([]Input, error)
GoToInputs(context.Context, ...[]Input) error
Expand Down
11 changes: 0 additions & 11 deletions robot/impl/resource_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import (
"go.viam.com/rdk/grpc"
"go.viam.com/rdk/logging"
"go.viam.com/rdk/module/modmaninterface"
"go.viam.com/rdk/motionplan"
"go.viam.com/rdk/operation"
"go.viam.com/rdk/pointcloud"
"go.viam.com/rdk/referenceframe"
Expand Down Expand Up @@ -463,16 +462,6 @@ func TestManagerAdd(t *testing.T) {
test.That(t, resource1, test.ShouldEqual, injectBoard)

injectMotionService := &inject.MotionService{}
injectMotionService.MoveFunc = func(
ctx context.Context,
componentName resource.Name,
grabPose *referenceframe.PoseInFrame,
worldState *referenceframe.WorldState,
constraints *motionplan.Constraints,
extra map[string]interface{},
) (bool, error) {
return false, nil
}
objectMResName := motion.Named("motion1")
manager.resources.AddNode(objectMResName, resource.NewConfiguredGraphNode(resource.Config{}, injectMotionService, unknownModel))
motionService, err := manager.ResourceByName(objectMResName)
Expand Down
Loading
Loading