# invisible links in rviz [closed]

Hello to all,

when I start Rviz with following .udfr - file:

<?xml version="1.0"?>
<robot name="test_robot">
<visual>
<geometry>
<mesh filename="package://learning_urdf/meshes/tx60l_arm.stl"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<visual>
<geometry>
<mesh filename="package://learning_urdf/meshes/tx60l_shoulder.stl"/>
</geometry>
<material name="whatever">
<color rgba="1 0 1 0"/>
</material>
</visual>

<joint name="joint1" type="continuous">
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="1 0 0" />
</joint>
</robot>


Nothing is shown in the camera-view but the grid. The STL-Files were exported in Binary. There are none failure-messages while starting rviz or inside of it.

First i suggested the .stl - files are invisible, so I added the material-tag.

Any Suggestions why my camera-view is blank?

Many Thanks in advance Dominik

edit:

@Lorenz I tried to open my urdf file seperately in rviz und gazebo. For rviz I followed the rviz-tutorial. It was possible to load the urdf-file which you are suposed to build in this tutorial. I only exchanged the simple geometry with the meshes. At the end of the tutorial also a mesh is used (though a dae-file).

update to gazebo: I was able to load the urdf file in gazebo, but it is invisible like in rviz. Also the links of the urdf file are not shown in the tree.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by viovio close date 2013-03-30 09:23:33

Sort by » oldest newest most voted

To visualize a URDF file in rviz, it's not enough to just load it in gazebo. You have to load it on the parameter server and you need to publish tf frames for each link in the urdf.

The following launch file loads the urdf and starts the robot_state_publisher to publish the TF frames of the urdf based on the data coming in over the joint_states topic.

<launch>
<param name="robot_description" textfile="\$(find learning_urdf)/tx60l.urdf" />
<node name="robot_state_published" pkg="robot_state_publisher" type="state_publisher" />
</launch>


Now you need a node to publish joint states. If you want to use gazebo, you will have to use a plugin that reads the state of the joints in the physics simulation. On the real robot the node that communicates with your hardware needs to publish joint states.

For just testing your model in rviz, you can use the joint_state_publisher which provides a nice GUI to move the joints of your model. Don't forget that you have to add 'Robot Model' in rviz and your reference frame needs to be the root of your robot, i.e. base_link.

Edit: Just another guess what could go wrong: How is the scale of your stl files? 1 corresponds to 1mm, the meshes will be really big and you might not see anything. Make sure 1 corresponds to exactly 1 meter.

more

I'm having a similar problem. I think the problem is the parser of the joint. Only the first link is visible on gazebo. In rviz i have no joints.

more

I agree with everyone above, but will offer another possibility. When I had tried STL files, I had terrible results. Maybe there were some small visible portions, but most of the mesh didn't show up.

What I ended up doing was installing Blender, which I highly recommend. In Blender, all I did was import STL, export Collada, and then use the .dae mesh in my URDF. This solved all of my problems.

I did have to re-center the origin of my mesh in Blender so the joint would show up in the right place (thanks AutoCAD for changing the origin :P ) but luckily did not have to do any scaling.

more

Oh and you should also check your material. Your link #2 has an alpha of 0, meaning it would be 100% transparent.

( 2012-09-07 14:46:14 -0600 )edit

Meanwhile I solved it. I forgot to scale the .stl Files with the factor 0.001.

more

## Stats

Asked: 2012-09-06 11:48:07 -0600

Seen: 1,571 times

Last updated: Oct 18 '12