ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to use URDF for robot visualization in rviz?

asked 2011-08-04 02:17:09 -0600

Hi everyone!

I've have allays used the robot footprint to view my robot in rviz. My robot does not have any moving parts, however I would like to see its 3D model in rviz instead of its footprint.

I'm using an erratic, and I was going through the urdf files and for most of it across the ROS wiki it strikes me that the urdf files are usually used for Gazebo simulations.

So how can I use a robot urdf file to simply view the real robot in rviz?

Also, instead of using static tf transforms for my tf tree can I use the urdf model containing the sensors to publish that information, even if there are not moving joints? How do I do that?

I apologize if this is a very simple question however I was going through the wiki and I could not figure out and started to get a bit confused!

Thanks in advance!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2011-08-04 04:37:55 -0600

Eric Perko gravatar image

Definitely can use it outside of Gazebo. Take a look at the tdx_urdf package for an example of a URDF that we only used for visualizing in rviz, never for Gazebo simulation. You can see an example of the model being displaying in rviz here.

There are launch file(s) in that package that should start up the model as well as the tf publishers that will handle all of the static joints in the URDF. To view it in rviz, you'll need a RobotModel display configured properly to read the URDF from the correct parameter. There is a urdf.vcg file in that package that should configure rviz properly if you used the launch files (at least I'm pretty sure it does... if not, we forgot to update it).

edit flag offensive delete link more


Thanks Eric! That's exacly what I was looking for!
Gonçalo Cabrita gravatar image Gonçalo Cabrita  ( 2011-08-04 06:37:31 -0600 )edit

Excellent answer and contribution. Thanks!

georgebrindeiro gravatar image georgebrindeiro  ( 2013-06-20 08:53:31 -0600 )edit

answered 2011-08-04 02:26:58 -0600

Lorenz gravatar image

Gazebo is only one use case for urdf files. On a real robot, they are used for building the TF tree from joint states, for motion planning and much more. Did you have a look at this tutorial?

edit flag offensive delete link more


Thanks for your reply Lorenz, I did take a look at that tutorial, and it is showing the robot in rviz hence my thought that I could use an urdf file without Gazebo.
Gonçalo Cabrita gravatar image Gonçalo Cabrita  ( 2011-08-04 02:39:14 -0600 )edit

Question Tools



Asked: 2011-08-04 02:17:09 -0600

Seen: 7,371 times

Last updated: Aug 04 '11