Skip to content

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

License

Notifications You must be signed in to change notification settings

leggedrobotics/urdf2robcogen

Repository files navigation

URDF2ROBCOGEN {#mainpage}

Authors: Jan Carius ([email protected]) and Ruben Grandia ([email protected]), based on an earlier version by Diego Pardo ([email protected])

Maintainers: Jan Carius ([email protected]) and Ruben Grandia ([email protected])

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

Two modes of operation are possible.

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_script RobotName /path/to/description.urdf

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

B) Using a launch file (xacro urdf file)

The urdf2robcogen.launch file converts a robot description on the parameter server.

roslaunch urdf2robcogen urdf2robcogen.launch robot_name:=myRobot description_name:=robot_description

See xacro_example.launch to see how to integrate this with generation of the robot description.

As a default, output files are placed in the /generated folder of this package.

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.