article
visualization

Adding URDFs to Foxglove's 3D Panel

Visualize robot models in the context of a 3D scene

article
visualization

Foxglove's 3D panel now supports displaying Unified Robotics Description Format (URDF) models in the context of your robots’ world.

Previously, you could visualize only one URDF at a time in an isolated context, using the now-deprecated URDF Viewer panel. Now, you can add as many URDF models as you want as custom layers in the 3D panel, using HTTP/HTTPS URLs (web and desktop) or file:// and package://-prefixed URLs (desktop only):

For package:// URLs or URDF files that refer to mesh files via package:// URLs, you must have configured ROS_PACKAGE_PATH in your app preferences:

ROS_PACKAGE_PATH

In addition to these URLs, the 3D panel can also display URDFs from a /robot_description parameter (for ROS 1 data sources) or a /robot_description topic (for ROS 2 data sources).

Once added to the 3D panel, the URDF file will populate the transform tree with frames and transforms based on the model’s links and joints. It’s important to note that Foxglove uses different defaults from RViz – if your meshes are not displaying properly, you may want to adjust the “Ignore COLLADA <up_axis>” (for DAE meshes) and “Mesh up axis” (for STL and OBJ meshes) options in the panel settings’ “Scene” section.

You can update this tree by publishing transform messages to move the URDF model’s joints positions – if you’ve used JointState messages before, you can use a robot_state_publisher node to transform them into TF messages at runtime. You can also control your model’s joints manually via the panel settings interface.

It’s important to note that with this new flow for adding multiple URDF models, we no longer support dragging and dropping URDF files into Foxglove. If you have any other questions about URDF support, feel free to contact us directly or join our Discord community for support.

Read more

Start building with Foxglove.

Get started for free