-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add generic and gripper FromDependencies
methods
#4747
Add generic and gripper FromDependencies
methods
#4747
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
func FromDependencies(deps resource.Dependencies, name string) (Gripper, error) { | ||
return resource.FromDependencies[Gripper](deps, Named(name)) | ||
} | ||
|
||
// NamesFromRobot is a helper for getting all gripper names from the given Robot. | ||
func NamesFromRobot(r robot.Robot) []string { |
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.
ngl didn't know this was a method on some of the apis either
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.
makes sense - none of the services have this so it's a components-only helper ™️
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.
plus you joined components after we added all this noise.
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.
Thanks rand!
Added gripper as it was missing.
Added generic to fit the pattern.