Skip to content

leggedrobotics/urdf2robcogen

Repository files navigation

URDF2ROBCOGEN {#mainpage}

Author: Jan Carius (jcarius@ethz.ch), based on an earlier version by Diego Pardo (depardo@ethz.ch)

Maintainer: Jan Carius (jcarius@ethz.ch)

What is this repository for?

This tool generates the RobCoGen description files (.kindsl & .dtdsl) from a URDF description format.

Building

Build Status

Dependencies

Build the executable

We use catkin as a build system. To build the bare version use

catkin build urdf2robcogen

Build the documentation

We use rosdoc_lite with doxygen backend to build documentation for this catkin package.

rosdoc_lite /path/to/package

Usage

Three modes of operation are possible. The generated files are written into the directory where the executable was executed (i.e., the output of pwd).

A) Run as standalone application (plain URDF file)

You must have a URDF description of your robot as a plaintext xml file. This should not contain xacro macros, i.e., you must invoke the xacro command beforehand to produce the URDF file.

To generate the robcogen description, execute

./urdf2robcogen_node RobotName /path/to/description.urdf

B) Run as standalone application (xacro urdf file)

The xacro urdf description can be given as a path

roslaunch urdf2robcogen_ros convert.launch robot_name:=myRobot urdf_xacro_path:=/path/to/description.xacro

Check the launchfile if you need to pass additional parameters to the xacro command.

Note that roslaunch executes nodes in the ~/.ros/ directory, so the output files will be placed there.

C) Use in your own executable

This allows for more advanced interaction such as setting additional frames and using a debug mode. A minimal example follows below. For more advanced uses check the documentation.

#include <urdf2robcogen/Urdf2RobCoGen.hpp>

//(...)

const bool debug_mode = false;
urdf2robcogen::Urdf2RobCoGen myrobot("/path/to/description.urdf", "myRobotName", debug_mode);
myrobot.parseUrdf();
myrobot.generateFiles();

//(...)

Main differences between URDF and RobCoGen/Kindsl

  • URDF:

    • Frame rotations are extrinsic (rotations about a fixed frame)
    • The axis of rotation of the joints is set with the vector property 'axis' of the joint element
    • There is no concept of Frame
    • Artificial links are used to define frames (a.k.a., link_frames), they may or may not have inertia
    • Artificial Joints (usually fixed) are used to connect link_frames to the real links
    • It is common to find URDF with 'virtual' links for compatibility with other tools
    • Virtual links might have incomplete information (i.e., inertial parameters)
    • The inertial parameters are expressed w.r.t a frame at the CoM of the link
  • RobCoGen:

    • Frame rotations are intrinsic (rotations about the current frame)
    • Frame rotation order is x,y,z
    • The axis of rotation of the joint is always Z
    • Links always carry inertia and must have a parent joint that is moving (i.e., not fixed)
    • Additional frames can be defined at any link
    • Inertial parameters are expressed w.r.t. the link frame (i.e., the corresponding joint frame)
    • It includes a special feature to set a different frame for expressing the inertial parameters (ref_frame)

Caveats

  • Double-check the ordering of the joints/links in the generated files. They may differ from what you expect.

About

A tool that translates a robot URDF description into the kindsl format that can be processed by RobCoGen.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •