-
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
DATA-855 Update model json files for grippers #1638
Conversation
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.
Re-posting this comment as actual review feedback.
Rather than adding a geometry to the fake gripper, let's remove its model file entirely; that way, users can more easily use it to model any arbitrary gripper.
It only has a model file in the first place, due to some now-obsolete testing that was done back in 2021.
components/gripper/fake/gripper.go
Outdated
|
||
var g gripper.LocalGripper = &Gripper{Name: config.Name, model: model} | ||
var g gripper.LocalGripper = &Gripper{Name: config.Name, model: nil} |
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.
This can just be &Gripper{Name: config.Name}
, no need for an explicit model: nil
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.
gotcha, will change now
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.
ah, I do not think that is allowed. I am getting:
cannot use &(Gripper literal) (value of type *Gripper) as referenceframe.Model value in struct literal: *Gripper does not implement referenceframe.Model (missing method AlmostEquals)compilerInvalidIfaceAssign
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.
Is that from a build or a test?
Also; we should actually be removing the model
from the Gripper
struct entirely for fake
, and returning nil
explicitly like in other grippers. Example from the softrobotics gripper:
// ModelFrame is unimplemented for softGripper.
func (g *softGripper) ModelFrame() referenceframe.Model {
return nil
}
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.
The error showed up right when I pasted &Gripper{Name: config.Name}
into the model field.
Not an issue anymore as I removed the model field from the fake gripper struct per your request.
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.
This LGTM, though some changes to some unrelated json files snuck in here; those should be reverted
Note: merge base coverage results not available, comparing against closest 556fc19~1=(f75a4c4) instead
|
This PR updates model json files for VG1 and fake gripper.
The geometry for fake gripper is the same as the geometry for VG1.