-
Notifications
You must be signed in to change notification settings - Fork 113
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-7904] Remove status and streaming status from robot interface #4461
[RSDK-7904] Remove status and streaming status from robot interface #4461
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
ya we should only remove it when local rc no longer relies on this |
Waiting on #4520 to be merged in. |
69f606c
to
34ee30f
Compare
are we removing it in the api repo too? |
Not in this pr, I don't want to do an API break - that's too much sdk work plus I have no clue if you guys still use last_reconfigured from it. |
5000643
to
2d24130
Compare
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.
some minor changes, but looks good to go! thanks for doing this
robot/web/web_test.go
Outdated
} | ||
|
||
conn, err := rgrpc.Dial(context.Background(), addr, logger, | ||
rpc.WithWebRTCOptions(rpc.DialWebRTCOptions{Disable: true})) | ||
test.That(t, err, test.ShouldBeNil) | ||
client := robotpb.NewRobotServiceClient(conn) | ||
|
||
// Use GetStatus and a context with a deadline to call injected status function. | ||
// // Use GetMachineStatus and a context with a deadline to call injected status function. |
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.
// // Use GetMachineStatus and a context with a deadline to call injected status function. | |
// Use GetMachineStatus and a context with a deadline to call injected status function. |
robot/web/web_test.go
Outdated
// // Use an injected status function to check that the default deadline was not | ||
// // added to the context, and the deadline passed to GetMachineStatus was used instead. |
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.
// // Use an injected status function to check that the default deadline was not | |
// // added to the context, and the deadline passed to GetMachineStatus was used instead. | |
// Use an injected status function to check that the default deadline was not | |
// added to the context, and the deadline passed to GetMachineStatus was used instead. |
robot/impl/local_robot_test.go
Outdated
statuses, err = r2.MachineStatus(context.Background()) | ||
test.That(t, err, test.ShouldBeNil) | ||
test.That(t, len(statuses), test.ShouldEqual, 1) | ||
|
||
armStatus := &armpb.Status{ | ||
EndPosition: &commonpb.Pose{X: 500, Z: 300, OZ: 1}, | ||
JointPositions: &armpb.JointPositions{Values: []float64{0.0}}, | ||
} | ||
convMap := &armpb.Status{} | ||
decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{TagName: "json", Result: &convMap}) | ||
test.That(t, err, test.ShouldBeNil) | ||
err = decoder.Decode(statuses[0].Status) | ||
test.That(t, err, test.ShouldBeNil) | ||
test.That(t, convMap, test.ShouldResemble, armStatus) | ||
test.That(t, statuses, test.ShouldNotBeNil) |
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.
can probably straight up delete these lines
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.
LGTM
Since this API is deprecated, I am doing some cleaning and removing it from component registrations.
Manually tested with a Mac viam-server and fake components that change their state, control card still works.
This breaks the local rc card, so I may wait until that is updated until I merge this.
Still to do: