[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes you have already created your own URDF file or that you are working with the existing PR2 URDF file.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Start using the KDL parser

Description: This tutorial teaches you how to create a KDL Tree from a URDF file

Tutorial Level: BEGINNER

Building the KDL parser

 $ rosdep install kdl_parser

This will install all the external dependencies for the kdl_parser. To build the package, run:

 $ rosmake kdl_parser

Using in your code

First, add the KDL parser as a dependency to your package.xml (in ROS fuerte or earlier it's manifest.xml) file:

    <build_depend package="kdl_parser" />
    <run_depend package="kdl_parser" />

To start using the KDL parser in your C++ code, include the following file:

   1   #include <kdl_parser/kdl_parser.hpp>

Now there are different ways to proceed. You can construct a KDL tree from a urdf in various forms:

From a file

From the parameter server

From an xml element

From a URDF model

For more details, take a look at the API documentation.

2020-03-28 12:48