0
$\begingroup$

Rosanswers logo

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!


Originally posted by Gonçalo Cabrita on ROS Answers with karma: 591 on 2011-08-04

Post score: 5

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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).


Originally posted by Eric Perko with karma: 8406 on 2011-08-04

This answer was ACCEPTED on the original site

Post score: 9


Original comments

Comment by Gonçalo Cabrita on 2011-08-04:
Thanks Eric! That's exacly what I was looking for!

Comment by georgebrindeiro on 2013-06-20:
Excellent answer and contribution. Thanks!

$\endgroup$
0
$\begingroup$

Rosanswers logo

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?


Originally posted by Lorenz with karma: 22731 on 2011-08-04

This answer was NOT ACCEPTED on the original site

Post score: 8


Original comments

Comment by Gonçalo Cabrita on 2011-08-04:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.