Re: [ros-users] Robot model meshes in RViz

Top Page
Attachments:
Message as email
+ (text/plain)
+ head2.png (image/png)
+ head1.png (image/png)
Delete this message
Reply to this message
Author: Armin Hornung
Date:  
To: ros-users
Subject: Re: [ros-users] Robot model meshes in RViz
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
        Humanoid Robots Lab
Tel.: +49 (0)761-203-8010                  Georges-Köhler-Allee 79
Fax : +49 (0)761-203-8007                  D-79110 Freiburg, Germany