ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Integration of urdf_parser in non-ROS software using CMake

asked 2012-04-19 02:15:29 -0600

Martin Felis gravatar image

I would like to extend my library RBDL (the Rigid Body Dynamics Library) to allow loading of models described by urdf. For this I would like to use the existing urdf_parser from ROS. As a build system I use CMake.

Normally I would create some FindXXX.cmake scripts and search for the include directories and libraries using CMake, however the dependencies for the urdf parser and model seem to be more involved than would be feasible for this approach.

What would be the best practice to find and link against the ROS urdf libraries?

Thank you in advance!

edit retag flag offensive close merge delete


Hi Thomas! I'm fine, thanks ;D. The code to load urdf models would just be an optional addon to RBDL and therefore I do not see a problem making that addon dependent on ROS. I guess in that way it makes more sense to use the first approach. But, if there is interest I might add RBDL to ROS.

Martin Felis gravatar image Martin Felis  ( 2012-04-19 10:21:49 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-04-19 05:06:14 -0600

Thomas gravatar image

Hi Martin, I hope you are doing well !

You have two different ways of achieving what you want:

  1. detect urdf_parser using rospack. This tool will give you the compilation and linking flags required to use urdf_parser. The main drawback I see is that RBDL will rely on ROS which is a _huge_ dependency. To do so, you can use this CMake macro: ...and adapt it to your needs.

  2. the second way is more "traditional". Numerous libraries have been integrated into ROS using this scheme. It would be to create a ROS rbld stack containing two packages: one is rbdl a ROS package wrapping your library and the second would be rbdl_bridge another ROS package containing the code required to load a URDF model. In this case, as rbdl_bridge is part of ROS, you can directly depend on urdf_parser using the manifest.xml file.

Personnally, I would go for the second solution which is more modular, avoid coupling tightly RBDL to ROS and would allow you to properly document the ROS integration on the ROS wiki. You could as well release your stack and obtain a Debian package of the RBDL ROS stack which can be installed using apt-get.

edit flag offensive delete link more

answered 2014-01-24 01:45:28 -0600

bchr gravatar image

urdfdom (urdfdom + urdfdom_headers) is now a separate project that only depends on Boost, console_bridge and tinyxml.

This removes the ROS dependency and makes it easier for non-ROS projects to use URDF files. With CMake, you can find urdfdom with the usual methods (e.g. pkg-config).

edit flag offensive delete link more

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: 2012-04-19 02:15:29 -0600

Seen: 644 times

Last updated: Jan 24 '14