Ask Your Question

stl error loading

asked 2011-11-01 08:01:25 -0500

Rikki gravatar image

updated 2011-11-01 10:06:34 -0500

David Lu gravatar image

I'm trying to create a Robot URDF and represent it in RVIZ and I have two problems when inserting the geometry using <mesh> (when I used simple geometries the robot's representation was ok).

If the link's <geometry> is STL extension represents only some pieces of it. Also it is the same if I try whit any of the STL files of PR2 (for example head_v0.stl), only represents some lines. Why not represent STL files well? (no errors in terminal and RVIZ)

If I transform the object to Collada (.dae) exporting with the program "Blender", for example, this is represented correctly, but in white, when the object is of a different color!.

Ubuntu 11.04, ROS diamondback, stack robot_model install.

Can anyone help me with one of the two problems?

Sorry for my English, I am Spanish and I don't write/speak english very well.

The URDF robot is not the problem, but it is:

<robot name="QuadRotor">

<link name="Base"> <visual> <geometry> <mesh filename="package://modelquad/modelvisual/Objetos_solid_edge/pelican_simplificado.stl" scale="0.0255 0.0255 0.0255"/> </geometry> <material name="verde"> <color rgba="0 1 0 1"/> </material> </visual> </link>

<link name="Brazo_1"> <visual> <geometry> <cylinder length="0.62" radius="0.0225"/> </geometry> <material name="negro"> <color rgba="0 0 0 1"/> </material> <origin rpy="0 1.57075 0" xyz="0 0 0"/> </visual> </link>

<joint name="Base_Brazo_1" type="fixed"> <parent link="Base"/> <child link="Brazo_1"/> <origin xyz="0.31 0 0"/> </joint>


edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2011-11-01 10:11:30 -0500

David Lu gravatar image

If I'm understanding you correctly, when you use any STL files, you only see some lines and not the whole shape. This may be a problem with your graphics card.

If you are seeing white objects, that often means that there is no TF frame for the link. Try using a combination of JointStatePublisher and RobotStatePublisher as described in this tutorial.

edit flag offensive delete link more


At the end I got it! Apparently the problem that appeared white pieces was not ROS. I needed to attach the texture to the object in blender (OGRE tool). Thank you very much David. (Collada Successful!!!)
Rikki gravatar image Rikki  ( 2011-11-04 04:18:46 -0500 )edit

That tutorial should include a comment about no transfer frame and the STL appearing white. That's a damn head scratcher that was driving me nuts!

rukie gravatar image rukie  ( 2019-04-05 12:16:57 -0500 )edit

answered 2011-11-02 06:18:40 -0500

Rikki gravatar image

Thank you very much for your answers! but the objects continue in white. I'm using de display.launch of these tutorials which launch JointStatePublisher and RobotStatePublisher too.

I dont`t know what happens, if I use another PR2's objects (.dae) with my URDF and the same display.launch eveything is ok.


<launch> <arg name="model"/>

    <arg name="gui" default="False" />   
    <!-- otro argumento -->

    <param name="robot_description" textfile="$(arg model)" />
    <!-- IMPORTANTE: Para cargar en rviz un Robot, es necesario incluirlo como parametro de nombre "robot_description" y el argumento leido -->

    <param name="use_gui" value="$(arg gui)"/>
<!-- otro parametro-->

    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />  
<!--  Permite publicar el estado del robot al nodo tf, con lo cual robot es accesible por otros nodos que necesiten utilizarlos como ¡¡¡frame!!!= Ejes coordenados, por ejemplo RVIZ-->

    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find modelquad)/modelvisual/confrvizmodelvisual.vcg" />  
    <!-- Equivalente a rosrun rviz (pkg) rviz (type) y cargar configuracion ____.vcg (name es solo para dar un nombre a la copia del nodo lanzado) -->


edit flag offensive delete link more


In the future, please edit your original post, rather than posting answers. Are you able to share your STL files?
David Lu gravatar image David Lu  ( 2011-11-02 09:32:29 -0500 )edit
Sorry, I am new using ROS answer. Don´t worry, at the end I got it, thanks very much.
Rikki gravatar image Rikki  ( 2011-11-05 02:46:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-11-01 08:01:25 -0500

Seen: 1,245 times

Last updated: Nov 02 '11