CRAM installation


OS and ROS

The recommended setup is Ubuntu 14.04 LTS with ROS Indigo.
This is the setup under which the CRAM team is working and it is best supported.

The core components of CRAM should also work on newer Ubuntu versions under ROS Jade, as well as on older systems but with no guarantee. If you encounter any incompatibilities / bugs, please let us know.

If you don't have the latest version of ROS, install it (the desktop non-full version should be enough).
Don't forget to source the environment setup file and

$ sudo rosdep init
$ rosdep update

IDE and the interactive shell

Your chance to get a bit acquainted with Emacs if you've never used it before.

$ sudo apt-get install ros-DISTRO-roslisp-repl

where DISTRO is your ROS version, e.g., indigo or kinetic.

For information on how to use the IDE check the Setup and IDE page.

ROS workspace management tools

You will need those for setting up the ROS workspace and checking out code.

$ sudo apt-get install python-rosinstall python-wstool


If you are new to CRAM and are curious to test the ideas behind it, you can try the Minimal installation, which will install all the packages necessary to go through the CRAM beginner tutorials: these explain the main concepts of CRAM and present the CRAM Plan Language.

If you want to see the full power of CRAM, Full installation is recommended.

Please note that Minimal installation and Full installation are mutually exclusive. If you first tried the minimal version and are now curious to see the full CRAM, please first remove the cram_3rdparty and cram_core directories from the src directory of your ROS workspace and then proceed with the full installation.

Minimal installation

This is a guide for installing the core CRAM packages. It installs the prerequisites of CRAM beginner tutorials, leaving out big dependencies such as KnowRob.

In the src directory of your ROS workspace execute the following commands:

$ git clone
$ git clone
$ rosdep install --ignore-src --from-paths cram_3rdparty cram_core
$ cd .. && catkin_make

Now you just need to get ready for development and then get started with the beginner tutorials!

Full installation

This is a guide for installing the main CRAM packages. It covers installing the packages you need to get the system up and running to the point where you can run and test it in a simulation mode. Setting up the system on a real robot is more complex (mostly involving the usual ROS-based platform setup) and is out of scope of this guide.

ROS workspace setup

CRAM is a big system that has some external dependencies. Most of them are automatically installed as Debian packages, one you need to install from source: the knowledge processing system KnowRob. We recommend to create separate chained (overlaid) ROS workspaces for different components to make compilation faster and easier. (KnowRob is partly written in rosjava and if you will have it in the same workspace with another 10 packages its sole presence in the workspace will make the compilation of your 10 packages many times longer.) You can read more on workspace overlaying here.

(If you don't like the idea of having a separate workspace for KnowRob and you're well familiar with ROS the only thing you will need to install CRAM is this .rosinstall file where you should uncomment the knowrob entry.)

We recommend to create 3 new workspaces chained as following:

bottom -> knowledge base workspace -> cram workspace -> your cram development or top-level workspace

where bottom is either your current workspace, or if you don't have one, the ROS preinstalled workspace in /opt/ros/….

To make sure your bottom workspace exists, execute $ roscd in the shell. If that doesn't work, go through ROS installation page again (specifically, the part with sourcing /opt/ros/indigo/setup.bash ;) ).

We create the workspaces in the $HOME/workspace directory. Make sure you adjust the paths if you want to create them somewhere else.

$ mkdir -p ~/workspace/ros_knowrob/src
$ cd ~/workspace/ros_knowrob
$ catkin_make
$ source devel/setup.bash
$ mkdir -p ~/workspace/ros_lisp/src
$ cd ~/workspace/ros_lisp
$ catkin_make
$ source devel/setup.bash
$ mkdir -p ~/workspace/ros_top/src
$ cd ~/workspace/ros_top
$ catkin_make
$ source devel/setup.bash

Now if you execute roscd you will end up in ros_top/devel. In this workspace you can put your own packages that are based on CRAM. You can also omit the part with ros_top and just use the ros_lisp workspace for your own roslisp packages.

In any case, don't forget to change the corresponding entry of your ~/.bashrc:

  source $HOME/workspace/ros_top/devel/setup.bash

KnowRob installation

The knowledge base workspace will be used for installing KnowRob, which is a knowledge management system that CRAM uses for retrieving knowledge mostly about the environment, sometimes common-sense knowledge etc. We only need the basic installation from the official Knowrob installation webpage. It comes down to, first, installing rosjava, which can be done through apt-get, and then checking out and compiling KnowRob code:

$ sudo apt-get install ros-DISTRO-rosjava # where DISTRO is Indigo or Jade etc.
$ rosdep update
$ cd ~/workspace/ros_knowrob/src
$ wstool init
$ wstool merge
$ wstool update
$ rosdep install --ignore-src --from-paths .
$ cd ~/workspace/ros_knowrob
$ catkin_make

CRAM package installation

Check out and compile all the necessary repositories.

$ cd ~/workspace/ros_lisp/src
$ wstool init
$ wstool merge
$ wstool update
$ cd ~/workspace/ros_lisp
$ rosdep update
$ rosdep install --ignore-src --from-paths src/
$ catkin_make

Note that the wstool update command is the one that downloads the source code of CRAM. Before executing this step you can edit your ~/workspace/ros_lisp/src/.rosinstall file and comment out the CRAM repositories that you don't expect to be using. See the comments inside the .rosinstall file for more details.

If something went wrong consult the Support page or feel free to drop an email to the person maintaining this page (check the “Last edited by” part of the footer).

Get ready for development

Before you open emacs you might want to configure it, at least set up the clipboard properly to enable copy/paste from/to other apps. That is described in the Setup and IDE and Emacs Initialization File pages and there is also more than enough material available online.

Open your emacs and enjoy the repl animation ;)

$ roslisp_repl &

Compiling packages using the ROS build system is not enough for code written in Lisp. To compile the CRAM packages that you want to use in Lisp, type the following in the REPL in your Emacs:

where NAME is e.g. language.

You're ready for some awesome programming! We recommend to go through the tutorials first. You might also find some useful links on the Getting Started page.