This page briefly describes additional projects related to RobCoGen, and more related resources.

Companion projects

Some others projects of mine, which are dependencies of RobCoGen.

Robot model tools

This is a Python package and command line tool to work with robot model formats like KinDSL and URDF.

Its initial ambition was to provide separate modules for separate aspects of robot modeling, such as connectivity, numbering, geometry, etc. In parallel, to provide a practical tool to convert between formats conforming (more or less..) to the same metamodel implemented by its modules.

RobCoGen uses the "Robot model tools" package to load and parse its input. It is in this project that I mantain the grammar of the KinDSL format.

Coordinate transforms code generator

A Python package and command line tool that does code generation of coordinate transform matrices, given a human readable model of a set of relative poses.

RobCoGen depends on the packages of "CtGen" to generate code for the robot transforms. Robot kinematics is a special case of the "geometrical" problems CtGen is for.

Geometric primitives

"kgprim" is a set of Python packages with data types to represent entities like Cartesian frames and rigid bodies. It is a dependency of all the previous projects including RobCoGen.

Most of its API is dedicated to modeling poses, coordinate transforms, matrix rapresentations of the transforms; it strives for unambiguos semantics and strict separation of orthogonal concerns.

Template engine

A general purpose Lua module to parse and evaluate textual templates. It is very powerful thanks to Lua's flexibility and performance. I use it extensively for my projects involving code generation.

Post-dependencies

Libraries to build/test the generated code (not runtime dependencies)

The iit-rbd library

A header-only C++ library with common types and functions required to compile the generated C++ code.

Included in RobCoGen as a submodule, for conveniency and fine-grained dependency management.

Please install the iit_rbd headers in your system include path. The library includes a trivial install.sh script, for Linux distributions.

Spatial V2

Roy Featherstone's Octave implementation of most of the rigid body dynamics algorithms described in his book.

This is the library I use to test RobCoGen-erated code, both Octave and C++, by means of numerical comparisons.

Additional resources

Docker

Installing RobCoGen is pretty simple, and Python's virtual environment already allows you not to affect your system's packages.

However, if for any reason you prefer to use containers, RobCoGen's repo includes a sample Dockerfile that builds a compact container with the dependencies.

From the root of the RobCoGen's repo, you can build it e.g. with:

docker build --tag robcogen etc/

Launch the container with:

docker run -it robcogen sh

Then install RobCoGen using pip.

KinGen

"KinGen" is another robotics code generator that I created with some great colleagues from KU Leuven.1

Its application scope is similar to RobCoGen: fast real-time performance on real hardware, with strong reliability guarantees; hence robot-specific code generation. However, its approach is potentially more powerful than RobCoGen, as the tool gives the flexibility of choosing the generated API by means of high-level, descriptive models.

With the greater ambition came also greater complexity. KinGen (so far) supports "only" kinematics — position, velocity and Jacobian solvers for arbitrary parts of the robot (and some more basic support for inverse kinematics).

URDF2KinDSL

URDF2KinDSL is a Python command line utility to convert URDF robot models to the KinDSL format. It dates back to the original RobCoGen, when URDF files could not be used directly, and you probably do not need it now.

However, it is highly specialized for the job and tailored to the small metamodel differences between the two formats, which makes it more capable, in general, than the Robot Model Tools. For example, it has "advanced" features such as collapsing the dummy links and joints often found in URDFs, while correctly composing the inertia of the collapsed links.

  1. Enea Scioni, Pawel Pazderski and Herman Bruyninckx, from the robotics group at the mechanical engineering department of KU Leuven University. See this paper.