[ros-users] Robot model meshes in RViz

Armin Hornung HornungA at informatik.uni-freiburg.de
Mon Jul 19 09:31:59 UTC 2010


Hi John and Josh,

> URDF allows only one mesh per link.  On the other hand, Gazebo's model XML
> does allow multiple geometries per body, but does not work with most ROS
> components.
>    
I think it would make sense to add that capability (multiple geometries 
as visual, be it primitive shapes or meshes) to RViz in the future. That 
would make it much easier to build simple robots or sensors out of 
multiple primitive shapes, instead of designing a completely textured 3D 
mesh. E.g. a Pioneer robot is just a cylinder with a few boxes, a Hokuyo 
a box with a cylinder on top etc.
I created a tracker item here: https://code.ros.org/trac/ros-pkg/ticket/4270

> You can texture map the mesh.  For example, PR2 Gazebo model in cturtle uses
> textured COLLADA meshes for visualization.  You can take a look at the
> pr2_description<https://code.ros.org/svn/wg-ros-pkg/stacks/pr2_common/tags/cturtle/pr2_description>package
> for reference.
>
>    
Yes, I saw these nice new PR2 models which made me want to have a 
nice-looking robot model too :)
Unfortunately, I don't know how to easily create a texture for an 
existing colored mesh. meshlab can't create textures out of colored 
vertices yet (but vice versa), and I never got to use Blender properly.

> rviz will use whatever normals are specified in the STL file, unless they're
> magnitude 0 (and thus invalid... a lot of tools don't write normals into STL
> files), in which case it calculates the face normal.
>    
I think the normals are fine. The original VRML mesh has none, but 
Meshlab creates them and saves them into the STL. It's more a matter of 
how the surfaces are rendered *between* the vertices. VRML files for 
example have a "crease angle" field that defines the smoothness of the 
surface:
http://www.vislab.uq.edu.au/users/manuals/vrml97/slides/mt0252.htm

Again, I think it would make sense to add that functionality to RViz if 
that can be done efficiently, maybe as part of the "mesh" or "geometry" 
tag. It would also make spheres and cylinders look really round and not 
like blocky polygons, without using too many vertices. I also created a 
tracker for that:
https://code.ros.org/trac/ros-pkg/ticket/4271

I know these are purely aesthetical requests, but I thought they would 
be nice to have if they don't use too many resources (otherwise, best 
make them optional). As motivation, I attached the same mesh as it is 
rendered in RViz and in a different OGRE-based renderer.

Cheers,
Armin

-- 
Armin Hornung                              Albert-Ludwigs-Universität
www.informatik.uni-freiburg.de/~hornunga   Dept. of Computer Science
HornungA at informatik.uni-freiburg.de        Humanoid Robots Lab
Tel.: +49 (0)761-203-8010                  Georges-Köhler-Allee 79
Fax : +49 (0)761-203-8007                  D-79110 Freiburg, Germany

-------------- next part --------------
A non-text attachment was scrubbed...
Name: head2.png
Type: image/png
Size: 5905 bytes
Desc: not available
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100719/7fda8d3f/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: head1.png
Type: image/png
Size: 23053 bytes
Desc: not available
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100719/7fda8d3f/attachment-0011.png>


More information about the ros-users mailing list