-
Couldn't load subscription status.
- Fork 38
Refactor the from_urdf function from RobotLibrary to Robot
#437
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| @classmethod | ||
| def from_urdf(cls, urdf_filename, srdf_filename=None, local_package_mesh_folder=None, client=None): | ||
| # type: (str, Optional[str], Optional[str], Optional[ClientInterface]) -> Robot |
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.
ClientInterface is not imported, is it? Does this work? Can you do a fully-qualified type here (ie. compas_fab.backends.interfaces.ClientInterface) to avoid importing only for the purpose of type checking?
|
|
||
| if srdf_filename: | ||
| semantics = RobotSemantics.from_srdf_file(srdf_filename, model) | ||
| else: | ||
| semantics = None |
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.
Maybe this is a bit neater?
| if srdf_filename: | |
| semantics = RobotSemantics.from_srdf_file(srdf_filename, model) | |
| else: | |
| semantics = None | |
| semantics = None | |
| if srdf_filename: | |
| semantics = RobotSemantics.from_srdf_file(srdf_filename, model) |
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 + minor feedback
|
Seems a really cool contribution. Any reason keeping you from merging @yck011522 ? |
I'm just slightly away from office these days. Will work on it soon. |
|
Happy holidays! |
This would allow other access to use that function.
What type of change is this?
Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas_fab.robots.CollisionMesh.