Skip to content
Catkin extension to play nice with usual python packages and workflow
CMake Python Shell
Branch: devel
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Documentation Status Build Status ' - Columns and their card count' Gitter

Provides catkin extension (cmake hooks) to work with pure python packages in catkin workspaces.
Because state of the art python (ref. should be allowed to work with catkin.

catkin_pip allows you to use your own package as a normal python package, with python workflow (example using virtualenvwrapper):

$ mkvirtualenv my_package_venv --system-site-packages
(my_package_venv)$ pip install -r requirements.txt
(my_package_venv)$ python -m my_package
(my_package_venv)$ nosetests my_package
(my_package_venv)$ deactivate

OR using the python workflow from inside a catkin workspace:

$ source /opt/ros/indigo/setup.bash
$ cd existing_catkin_ws
$ catkin_make
$ source devel/setup.bash
$ python -m my_package
$ nosetests my_package

TODO : improve this with real simple command line examples, copied verbatim.

It basically make use, through cmake, of the workspace as a virtual env would be used in a python flow.
Mostly it’s just a few arguments added to pip to get it to install packages in the correct way in a workspace.

The provided cmake macros are:

  • catkin_pip_setup()
  • catkin_pip_requirements(requirements_file)
  • catkin_pip_package()

they can be used like this :

cmake_minimum_required(VERSION 2.8.3)

find_package(catkin REQUIRED COMPONENTS

# Getting pip requirements for catkin_pip itself

# We need to install the project pip dependencies in the devel workspace being created

# defining current package as a package that should be managed by pip (not catkin - even though we make it usable with workspaces)

# Corresponding install rules are also setup by each of these macros.

As a result you can:

  • Use pip/ dependency mechanism with any python git repo, for devel workspace.
  • Use pip dependency requirements mechanism with any pip dependency, for devel workspace.
  • Directly work with python package sources in your usual catkin workspaces (devel only), after just adding a CMakeLists.txt and a package.xml files.
  • Work with "hybrid" packages that can be released both via pip packages and ros packages, provided the proper dependencies exists for both package management systems (Note rosdep support of pip is not clear...).
  • Do a Third Party release of an existing python package into a ROS package (no changes required).
You can’t perform that action at this time.