blodow/realtime_urdf_filter

support primitive shapes (cylinders, boxes, spheres, ...)

christian-rauch opened this issue · 4 comments

It seems that simple shapes, such as cylinders, are not supported when they are defined by their parameters in the URDF (http://wiki.ros.org/urdf/XML/link#Elements) instead of providing them as mesh.

Hey Christian, could you check if your URDF model has the cylinder geometry in the <visual> or the <collision> tags? It's been a couple of years I've been using this package, but my code seems to only look at the <visual> tag. (https://github.com/blodow/realtime_urdf_filter/blob/master/src/urdf_renderer.cpp#L105-L109)

It's in the visual tag:

    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.0185"/>
      <geometry>
        <cylinder length="0.037" radius="0.035"/>
      </geometry>
      <material name="LightGrey">
        <color rgba="0.6 0.6 0.6 1.0"/>
      </material>
    </visual>

I also see it in RViz, but the link is missing in the "Debug" GUI.

then maybe it's this here? :D

//glutSolidCylinder(radius, length, 10, 10);

Others, e.g. Cube, are also commented, I think we never used URDF models with these links, and couldn't/didn't test it properly.

then maybe it's this here? :D

Bingo! :-) This fixes the issue.

I added that "fix" to my PR.