8000 Trying to access the `meshes` attribute of `Cylinder` throws an error. · Issue #20 · mmatl/urdfpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Trying to access the meshes attribute of Cylinder throws an error. #20
Open
@manuelli

Description

@manuelli

If g = Cylinder(1.0, 2.0) and you try to access the g.meshes field then it throws the following error

File "/usr/local/lib/python3.6/dist-packages/urdfpy/urdf.py", line 398, in meshes
    if len(self._meshes) == 0:
TypeError: object of type 'NoneType' has no len()

This is because self._meshes got initialize to self._meshes = None on this line instead of self._meshes = [] like in the other primitive types, e.g. Box. Should be a simple fix to just set self._meshes = [] in the Cylinder constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0