Cross-platform conda packages for ROS
2020 has been a busy year for the RoboStack project: we collaboratively published ros-noetic on four platforms (Windows, macOS, Linux x64 and ARM64) and revamped how ROS packages can be released on conda! We now maintain a stack of fully-integrated automatic builds that can be used to release packages for any ROS distribution. This allowed us to release experimental packages for ros-foxy without major changes in the build process.
TL;DR: If you are excited about being able to use ROS within a conda environment, it is now as simple as
conda create -n ros ros-noetic-desktop -conda-forge -c robostack && conda activate ros. For full installation instructions, please see our ros-noetic repository on GitHub. This installation comes with all the advantages of conda: separate environments for your various projects, being able to use any host platform (you are not bound to a specific Ubuntu version; e.g. you can install ros-noetic on Ubuntu 16.04 and enjoy the advantages of Python 3), smart dependency checking etc. Note that we also provide binary packages for Windows and macOS — you can now install ROS within minutes on those platforms.
Today, we support the installation of
ros-noetic-desktop-full on all 4 different platforms which includes RViz and hundreds of base packages for robotics. You can find a list of all packages and architectures that we currently have in the RoboStack conda channel here. Some of these packages include:
conda install ros-noetic-moveit
- ROS Navigation
conda install ros-noetic-navigation
- TEB Local Planner
conda install ros-noetic-teb-local-planner
- the Franka Robot
conda install ros-noetic-libfranka
If you are missing a package on this list or you are interested in distributing your own package in the RoboStack channel, feel free to just open a pull request on our GitHub repository, let us know in an issue or drop by our Gitter chat! Often, a pull request just needs to add a single line and the bots will build the package for Linux, Windows and macOS.
Let’s get back to the start: what are conda packages? conda packages are cross-platform, language agnostic, binary packages that can be installed by package managers such as mamba or conda. Additionally, these package managers include facilities to provide “environment management” (similar to catkin workspaces) to switch between different versions of software easily.
Conda has been traditionally used to distribute packages of the Python scientific computing ecosystem (and it still is) but the ecosystem of packages has grown into many other directions as well: there are huge collections of R packages, C++ is very well supported and there are very large channels for bio-informatics. We strongly believe that the Robotics community will significantly benefit from conda-packages!
There are several popular conda channels, and the biggest one is conda-forge. The conda-forge community maintains many recipes for crucial packages like Python and many Python packages, C++ compilers, CUDA… Each recipe has its own git repository from which public CI services like Azure Pipelines build the binary package. We maintain many low-level robotics packages on conda-forge: Ignition Libraries, PCL, Ogre, Flexible Collision Library (FCL), Gazebo, Bullet, and DART. For the Ignition Libraries, conda-forge has recently become the default installation means for the Windows platform! Additionally, one can find a plethora of other packages on conda-forge: tons of Python, R and C/C++ packages used in data science, physics and engineering.
Silvio Traversaro has written another good piece of documentation about advantages and disadvantages of conda & conda-forge.
However, ROS presents a unique challenge: it is a very large ecosystem of packages (over 2000 packages per distribution), and it comes with its own metadata as well as a very “homogenous” build system (all ROS1 packages use CMake + catkin, and ROS2 CMake + ament_cmake).
With the robostack repositories, we have fully automated the process from ROS
package.xmlto recipe and build-pipeline!
In the robostack/ros-noetic and robostack/ros-foxy repositories, we select the desired packages for the different build platforms in the corresponding vinca.yaml, and a GitHub action generates the recipe and build scripts, as well as an Azure pipeline definition. This is pushed to a branch (e.g.
build_linux for the linux x64 build) and that triggers the Azure build. You can find our pipelines here. The build pipeline is structured in a way that the dependencies are build in the correct order in multiple stages, allowing for a maximum of parallelism. Our RoboStack repositories are also testbeds for the bleeding edge mamba and boa tools, which are a blazingly fast reimplementation of the conda package manager in C++ and an equally fast build tool for conda packages respectively.
All together, this allowed us to publish hundreds of ROS packages in the RoboStack channel. On Windows, Linux and macOS, we are regularly testing RViz, MoveIt, and the building of custom packages in a catkin workspace.
Building custom packages from ROS package.xml
Our build pipeline also allows to pull in packages that are (not yet) released on e.g. noetic, simply by pointing vinca to the package.xml. This mechanism is helpful when the official release is blocked for whatever reason, but the package itself builds and works fine. For example, we have been using this for ros-noetic-tf2-web-republisher, and the terminal below shows the process for building
spot_ros via the
This can also be used to package “custom” ROS packages for conda, by instructing vinca to generate a conda package-recipe from a
package.xml file. A package created by this process can then be uploaded to a custom (even private) conda channel for easy consumption by fellow developers or customers.
These packages all play well with the extended ecosystem of conda-forge! For example, we can now easily distribute JupyterLab ROS extensions as conda packages, and that will also install the appropriate version of JupyterLab (hint: just install
conda install jupyterlab-ros -c robostack -c conda-forge and run JupyterLab). We will have a separate article about the JupyterLab 3 update of our ROS extensions coming out soon.
As a future outlook, we are continuing to make headway with ROS 2 (Foxy) and we are looking into providing packages for the new Apple M1 (for which conda-forge already has experimental support). There are also parallel efforts in the robotics community, e.g. the Tesseract motion planning framework is thinking about packaging ROS-independenct tools on conda-forge, and ROS-dependent tools on RoboStack.
About the authors
Wolf Vollprecht is a scientifc & robotics software developer at QuantStack. He holds a master degree in Robotics from ETH Zurich and is interested to connect the data science ecosystem to robots. One step towards this goal is to simplify ROS distribution and installation.
Tobias Fischer is a Research Fellow and Associate Investigator at the QUT Centre for Robotics. He holds a PhD in Robotics from Imperial College London. Tobias’ overarching goal is to develop high-performing, bio-inspired computer vision algorithms that can be simultaneously used to examine the perceptional capabilities of animals/humans and robots. He strongly believes that open-source initiatives like RoboStack are an important component in achieving this goal.