ROS on conda-forge

Historically, distributions of the Robot Operating Systems (ROS) have been closely tied to an underlying Ubuntu distribution. With the first release of ROS on conda, the cross-platform package manager, we hope to alleviate this restriction and make ROS easily available to anyone — independent of Windows, OS X or any specific Linux distribution.

Wolf Vollprecht
5 min readOct 28, 2019
ROS on conda-forge (robot drawing by https://www.flaticon.com/authors/freepik)

Update 2021! We’ve been working hard on the RoboStack distribution and the conda-forge ROS packages are now deprecated. Please check out our new blog post for all the ROS Noetic packages: https://medium.com/robostack/cross-platform-conda-packages-for-ros-fa1974fd1de3

ROS is a fantastic and very large suite of software tools for Robotics. It’s used in many applications and with great success, ranging from the hobbyist market to industrial use cases. Most people these days use ROS on Ubuntu, which is a popular choice and works very well — as long as you don’t have a good reason to use another operating system. Then it’s often necessary to build ROS from sources — which can take a while. And in the case of Linux distributions, the correct versions of packages such as Boost or PCL need to be available.

What is Conda

In the data science community, a platform-independent (Win, OS X and Linux are all supported) and language agnostic package manager called conda has seen massive adoption. Most often, conda is associated with Python packages. The truth is that conda works flawlessly with R, C/C++, Haskell and native packages. Furthermore, conda supports having multiple environments at the same time, allowing the user to separately install different versions of Boost or Python, side-by-side. As a technical detail, conda works by making packages relocatable: prefix information is only inserted into the package at installation time.

The Mighty Forge

The conda-forge project is a community-led collection of recipes, build infrastructure and distribution of packages. A large bulk of the most commonly used data science packages in Python, R and C++ are continuously built and delivered on top of conda-forge’s mostly automated infrastructure. Conda-forge is one of the fastest-growing and successful open-source projects of the past few years. It was started in 2015 and already hosts over 7700 packages, has more than 1600 individual contributors and roughly 80 million package downloads a month — which goes to show that it solves some actual problems. A package recipe that’s hosted on conda-forge can be built automatically for Windows, OS X and Linux, as well as for x64, x32, ARM and POWER8 architectures (thanks to generous CI services).

ROS on conda is great, because…

In essence, having ROS on conda provides:

  • A unified way to install ROS binaries on Windows, OS X or any Linux distribution (Fedora, Ubuntu 16.04, Ubuntu 19.10 …)
  • A way to seamlessly install different ROS distributions side-by-side — for example you could have two environments, one with ROS kinetic, and the other with ROS melodic
  • Switching between different Python versions for your entire environment (packages are available for Python 2.7, 3.6 and 3.7)
  • It’s much simpler to create conda packages than Debian packages, and to set up custom (or even private) channels to distribute them
  • The conda packages usually live in your home directory — even without root access you can use the ROS stack
  • Cutting-edge data science packages that already live on conda-forge without having to wait for Linux distributions to catch up

With this blog post, I am happy to announce that the ROS core packages for ROS Melodic are readily available on conda-forge. The packages are so-far built for OS X and x64 Linux.

To get started, it’s advisable to download and install Miniconda. Then you can install the ROS packages by running:

# create a new environmnet named ros
conda create --name ros --channel conda-forge
ros-core \
ros-actionlib \
ros-dynamic-reconfigure
python=X.X # select your desired Python version here (2.7, 3.6, 3.7)
conda activate ros
...
now you can use any ros command from the core set, such as
roscore
roslaunch ...
rostopic ...
rosnode ...

For Windows support, Sean Yen has recently made great progress on building some of the required low-level libraries with conda, as well as OGRE 3D (necessary for RViz) and libignition (necessary for Gazebo). This makes me confident that with his deep knowledge of Windows & ROS, we’ll be able to support Windows for the ROS melodic core packages on conda soon — then we will have a truly unified and flexible way of installing ROS binaries across platforms.

The dependency graph for all packages up to ros-core — these had to be built in the correct order and uploaded to conda-forge

If you are interested in helping out, feel free to get in touch with me at email, twitter, or visit our chat room over on https://gitter.im/RoboStack/Lobby

This work is far from finished, but maintaining all of these recipes alone is a huge burden. With tools like superflore and rosdistro some tasks can be automated, but implementing this automation as a GitHub bot and maintaining it requires some love from the community!

A huge thanks to Sean Yen and Loïc Estève for being co-maintainers on all of the existing recipes, as well as to the entire conda-forge community who build the amazing tools that automate the build infrastructure so well. Also, I guess we have to thank Microsoft for being so generous with Azure instances and the Anaconda Inc. team for building such a fantastic open source package manager, and hosting all these packages for free for the community.

Obviously, also a shout-out to my employer QuantStack for allowing me to do this, and introducing me into the wonderful world of conda packaging. Looking forward to an exciting 2020 with more developments in the conda/mamba realm coming in!

About the author

Wolf Vollprecht has worked with ROS ever since the first robotic project he was part of (the BeachBot). Currently he is working at QuantStack in Paris. His focus is the C++ Library xtensor (NumPy but for C++), and tools that combine the strengths of the data science eco-system with ROS, such as this project, or jupyter-ros.

QuantStack is a team of open source developers based in Europe and contributors of major open-source projects for scientific computing, who are passionate about science and technology.

--

--

Wolf Vollprecht
Wolf Vollprecht

Written by Wolf Vollprecht

I work as a scientific and robotics software developer for QuantStack in Paris and Berlin. We do Open Source for a living!

Responses (5)