Setting up PyCRAM

The setup of PyCRAM can be differentiated in three steps:

  • Installing Dependencies
  • Cloning the PyCRAM repo
  • Write a setup Script

All dependencies are available via PyPi

The setup script is used to add the src directory to the python path. This has to be done so Python can find PyCRAM when importing from there.

This tutorial is tested with Python 3.8 and Ubuntu 18.04.


To install PyCRAM firstly the required packages must be installed. These are:

  • Pip
  • CRAM/kdl_ik_service
  • Pybullet
  • Pathlib
  • numpy

Firstly Pip needs to be installed, on Ubuntu this can be done vie the following command:

sudo apt-get install python3-pip

PyCRAM uses the the KDL Inverse Kinematic service of CRAM, to use the IK service CRAM needs to be installed. For instructions on how to install CRAM click here.

The rest can be installed using Pip by typing the following command into a terminal:

pip3 install <package> 


To get PyCRAM simply clone the repository with the following command:

git clone
git submodule init
git submodule update

The cloned repository contains the source code for PyCRAM as well as two short demos which demonstrate how to use it.

Using PyCRAM

To use PyCRAM one needs to add the path to the source code manually at the moment. This can be done in a python script before executing the actual code.

import sys
sys.path.append('<path to repository>/pycram/src/')