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

fixed Cylinder meshes creation #6

Merged
merged 1 commit into from
Mar 16, 2022
Merged

fixed Cylinder meshes creation #6

merged 1 commit into from
Mar 16, 2022

Conversation

JorenVDL
Copy link

self._meshes was set to None instead of []. And in def meshes, self._mesh was returned instead of self._meshes

@sthoduka
Copy link

Thanks, this fixed the issue with loading my urdf as well. For reference, here is the error I get without this patch:

    robot.show()
  File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 3543, in show
    fk = self.visual_trimesh_fk(cfg=cfg)
  File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 3200, in visual_trimesh_fk
    for mesh in visual.geometry.meshes:
  File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 736, in meshes
    return self.geometry.meshes
  File "/home/ubuntu/apps/urdfpy/urdfpy/urdf.py", line 396, in meshes
    if len(self._meshes) == 0:
TypeError: object of type 'NoneType' has no len()

adamhall added a commit to utiasSTARS/urdfpy that referenced this pull request Sep 10, 2020
Added support so meshes default to []
    -See origonal urdfpy pull request fixed Cylinder meshes creation mmatl#6
Added an option to show() method, which returns the pyrender scene instead of plotting
    -This way it can be edited later.
@lianghongzhuo
Copy link

I can confirm this pull request fixed the problem. Please merge.

@mmatl mmatl merged commit 5466842 into mmatl:master Mar 16, 2022
traversaro added a commit to traversaro/urdfpy-feedstock that referenced this pull request Apr 14, 2023
traversaro added a commit to conda-forge/urdfpy-feedstock that referenced this pull request Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants