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-507] Dependencies in service config #1518

Merged

Conversation

Kschappacher
Copy link
Member

Add implicit depends on to all services

@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Oct 26, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Oct 28, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 2, 2022
@Kschappacher Kschappacher added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Nov 3, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 3, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 3, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 3, 2022
@Kschappacher Kschappacher requested review from cheukt and a user November 3, 2022 15:41
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 3, 2022
@cheukt
Copy link
Member

cheukt commented Nov 3, 2022

gonna switch myself out for @maximpertsov

@cheukt cheukt requested review from maximpertsov and removed request for cheukt November 3, 2022 15:55
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spoke with Kurt regarding some SLAM changes which would store camera components instead of the camera stream as was done previously. He is reverting some of those changes until SLAM has had a chance to discuss internally and will make required changes ourselves should we decide to go down that route.

Will re-review once new push is submitted.

Copy link
Contributor

@maximpertsov maximpertsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - just one small question about a change in the order of some guard clauses

config/resource.go Show resolved Hide resolved
services/motion/builtin/builtin.go Show resolved Hide resolved
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 4, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 4, 2022
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 4, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 5, 2022
@Kschappacher Kschappacher requested review from maximpertsov and a user November 5, 2022 22:15
default:
return nil, rdkutils.NewResourceNotFoundError(name)
deps[camera.Named(sensor)] = cam
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to verify, should we still be adding a camera to deps here? it looks like this threw an error before

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: oh i see, there's a new case for a sensor that is supposed to be missing (gibberish) - I think it's clearer to just to not add the camera to deps in the default case instead of having a specific case for not adding. i'll defer to slam team on this though since it's their test

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will discuss it internally with the team but for now, don't want to hold back Kurt's PR since it is correctly updating the code with the current way we are testing.

Thanks for bring it to my attention though Maxim!

@@ -527,7 +529,7 @@ func TestGeneralNew(t *testing.T) {
// Create slam service
logger := golog.NewTestLogger(t)
_, err := createSLAMService(t, attrCfg, logger, false, false)
test.That(t, fmt.Sprint(err), test.ShouldContainSubstring, "error with slam service slam process:")
test.That(t, fmt.Sprint(err), test.ShouldContainSubstring, "runtime slam service error: invalid slam algorithm \"test\"")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q] is this error change due to a change in error logging from the switch to dependencies as i don't see it reflected in the slam code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think there was a bug in this test. The original test didnt have a valid camera so it skipped the runtimeServiceValidation check because of this line: https://github.com/viamrobotics/rdk/blob/main/services/slam/builtin/builtin.go#L195. So I added a valid camera and the test get caught because of the invalid algo now

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one quick question but otherwise, change over looks smooth!

@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label Nov 7, 2022
@Kschappacher Kschappacher added the safe to test This pull request is marked safe to test from a trusted zone label Nov 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2022

Code Coverage

Note: merge base coverage results not available, comparing against closest 38fa524~1=(3aa621d) instead

Package Line Rate Delta Health
go.viam.com/rdk/components/arm 59% 0.00%
go.viam.com/rdk/components/arm/universalrobots 12% 0.00%
go.viam.com/rdk/components/arm/xarm 2% 0.00%
go.viam.com/rdk/components/arm/yahboom 7% 0.00%
go.viam.com/rdk/components/audioinput 55% 0.00%
go.viam.com/rdk/components/base 68% 0.00%
go.viam.com/rdk/components/base/agilex 62% 0.00%
go.viam.com/rdk/components/base/boat 41% 0.00%
go.viam.com/rdk/components/base/wheeled 76% 0.00%
go.viam.com/rdk/components/board 69% 0.00%
go.viam.com/rdk/components/board/arduino 10% 0.00%
go.viam.com/rdk/components/board/commonsysfs 47% 0.00%
go.viam.com/rdk/components/board/fake 39% 0.00%
go.viam.com/rdk/components/board/numato 19% 0.00%
go.viam.com/rdk/components/board/pi 50% 0.00%
go.viam.com/rdk/components/camera 66% 0.00%
go.viam.com/rdk/components/camera/fake 67% 0.00%
go.viam.com/rdk/components/camera/ffmpeg 72% 0.00%
go.viam.com/rdk/components/camera/transformpipeline 81% +0.40%
go.viam.com/rdk/components/camera/videosource 55% +0.48%
go.viam.com/rdk/components/encoder/fake 77% 0.00%
go.viam.com/rdk/components/gantry 68% 0.00%
go.viam.com/rdk/components/gantry/multiaxis 84% 0.00%
go.viam.com/rdk/components/gantry/oneaxis 86% 0.00%
go.viam.com/rdk/components/generic 84% 0.00%
go.viam.com/rdk/components/gripper 82% 0.00%
go.viam.com/rdk/components/input 86% 0.00%
go.viam.com/rdk/components/input/gpio 83% 0.00%
go.viam.com/rdk/components/motor 82% 0.00%
go.viam.com/rdk/components/motor/dimensionengineering 63% 0.00%
go.viam.com/rdk/components/motor/dmc4000 69% 0.00%
go.viam.com/rdk/components/motor/fake 58% -0.85%
go.viam.com/rdk/components/motor/gpio 64% +0.33%
go.viam.com/rdk/components/motor/gpiostepper 56% -0.59%
go.viam.com/rdk/components/motor/tmcstepper 62% 0.00%
go.viam.com/rdk/components/movementsensor 67% 0.00%
go.viam.com/rdk/components/movementsensor/cameramono 40% 0.00%
go.viam.com/rdk/components/movementsensor/gpsnmea 37% 0.00%
go.viam.com/rdk/components/movementsensor/gpsrtk 28% 0.00%
go.viam.com/rdk/components/posetracker 88% 0.00%
go.viam.com/rdk/components/sensor 88% 0.00%
go.viam.com/rdk/components/sensor/ultrasonic 34% 0.00%
go.viam.com/rdk/components/servo 77% 0.00%
go.viam.com/rdk/config 76% -1.04%
go.viam.com/rdk/control 57% 0.00%
go.viam.com/rdk/data 77% 0.00%
go.viam.com/rdk/grpc 25% 0.00%
go.viam.com/rdk/ml 67% 0.00%
go.viam.com/rdk/ml/inference 70% 0.00%
go.viam.com/rdk/motionplan 69% -2.34%
go.viam.com/rdk/operation 81% 0.00%
go.viam.com/rdk/pointcloud 71% +0.09%
go.viam.com/rdk/protoutils 62% 0.00%
go.viam.com/rdk/referenceframe 78% 0.00%
go.viam.com/rdk/registry 88% 0.00%
go.viam.com/rdk/resource 85% 0.00%
go.viam.com/rdk/rimage 78% 0.00%
go.viam.com/rdk/rimage/depthadapter 94% 0.00%
go.viam.com/rdk/rimage/transform 73% 0.00%
go.viam.com/rdk/rimage/transform/cmd/extrinsic_calibration 67% 0.00%
go.viam.com/rdk/robot 93% 0.00%
go.viam.com/rdk/robot/client 80% 0.00%
go.viam.com/rdk/robot/framesystem 68% 0.00%
go.viam.com/rdk/robot/impl 79% +0.12%
go.viam.com/rdk/robot/server 58% 0.00%
go.viam.com/rdk/robot/web 61% 0.00%
go.viam.com/rdk/robot/web/stream 87% 0.00%
go.viam.com/rdk/services/armremotecontrol 75% 0.00%
go.viam.com/rdk/services/armremotecontrol/builtin 25% 0.00%
go.viam.com/rdk/services/baseremotecontrol 75% 0.00%
go.viam.com/rdk/services/baseremotecontrol/builtin 71% 0.00%
go.viam.com/rdk/services/datamanager 66% 0.00%
go.viam.com/rdk/services/datamanager/builtin 78% 0.00%
go.viam.com/rdk/services/datamanager/datacapture 21% 0.00%
go.viam.com/rdk/services/datamanager/datasync 72% 0.00%
go.viam.com/rdk/services/motion 68% 0.00%
go.viam.com/rdk/services/motion/builtin 89% 0.00%
go.viam.com/rdk/services/navigation 54% 0.00%
go.viam.com/rdk/services/sensors 78% 0.00%
go.viam.com/rdk/services/sensors/builtin 97% 0.00%
go.viam.com/rdk/services/shell 14% 0.00%
go.viam.com/rdk/services/slam 85% 0.00%
go.viam.com/rdk/services/slam/builtin 72% -0.69%
go.viam.com/rdk/services/vision 80% 0.00%
go.viam.com/rdk/services/vision/builtin 74% 0.00%
go.viam.com/rdk/spatialmath 85% 0.00%
go.viam.com/rdk/subtype 96% 0.00%
go.viam.com/rdk/utils 71% 0.00%
go.viam.com/rdk/vision 26% 0.00%
go.viam.com/rdk/vision/chess 80% 0.00%
go.viam.com/rdk/vision/delaunay 87% 0.00%
go.viam.com/rdk/vision/keypoints 92% 0.00%
go.viam.com/rdk/vision/objectdetection 82% 0.00%
go.viam.com/rdk/vision/odometry 60% 0.00%
go.viam.com/rdk/vision/odometry/cmd 0% 0.00%
go.viam.com/rdk/vision/segmentation 49% 0.00%
go.viam.com/rdk/web/server 26% 0.00%
Summary 66% (19283 / 29244) -0.18%

@Kschappacher Kschappacher merged commit 595e098 into viamrobotics:main Nov 7, 2022
@Kschappacher Kschappacher deleted the dependencies-in-service-config branch November 7, 2022 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants