Table with all available packages & architectures
Welcome to RoboStack, which tightly couples ROS with Conda, a cross-platform, language-agnostic package manager. We provide ROS binaries for Linux, macOS, Windows and ARM (Linux). Installing other recent packages via conda-forge side-by-side works easily, e.g. you can install TensorFlow/PyTorch in the same environment as ROS humble without any issues. As no system libraries are used, you can also easily install ROS humble on any recent Linux Distribution - including older versions of Ubuntu. As the packages are pre-built, it saves you from compiling from source, which is especially helpful on macOS and Windows. No root access is required, all packages live in your home directory. We have recently written up a paper and blog post with more information.
If you use RoboStack in your academic work, please refer to the following paper:
@article{FischerRAM2021,
title={A RoboStack Tutorial: Using the Robot Operating System Alongside the Conda and Jupyter Data Science Ecosystems},
author={Tobias Fischer and Wolf Vollprecht and Silvio Traversaro and Sean Yen and Carlos Herrero and Michael Milford},
journal={IEEE Robotics and Automation Magazine},
year={2021},
doi={10.1109/MRA.2021.3128367},
}
Documentation for this procedure is very lacky, so the following is the best efforts I tried to pull together:
Generally, to convert a ROS package to Conda package, you need to 1. compile all necessary code to correct binaries for specific platforms, 2. link aginst correct libraries or package libraries together into the conda package, and 3. setup conda required metadata or structures. To do this process, instead of using colcon build
like ROS2, the procedure works around rattler-build
, which is a tool that compiles source code in many languages to conda packages.
- Metadata resolution: building package like this requires knowing the dependencies of this package in both compile time and runtime. It also requires metadata such as maintainer, package name, etc. Additionally, the builder needs to know any specifics of how this package should be compiled. This is known as a conda recipe. This procedure is more or less the same for ROS packages, which is why the RoboStack team wrote vinca tool for converting the
package.xml
file of a ROS package into a
NOTE: vinca
is buggy and changes frequently, according to the RoboStack team, so developements of this repo should strictly follow official documentation. It is recommended to iteratively run the building procedure and debug any issues.
- Package compilation:
rattler-build
handles building conda packages from recipes, which is pretty stable during testing. - Installing/Distributing: Built packages are stored in output/{platform}/{package}.conda. Now you may install this
.conda
file in your conda environment or distribute to your team.
This repository includes Docker Compose configuration for interactive development of RoboStack packages using the prebuilt pixi container. This approach provides a persistent development environment where you can run commands manually.
- Docker and Docker Compose installed on your system
- Git (to clone this repository)
-
Clone the repository:
git clone <repository-url> cd RoboStack-humble-ARM
-
Start the development container:
docker compose up -d robostack-dev
-
Enter the container:
docker compose exec robostack-dev bash # or docker exec -it robostack-dev bash
-
Inside the container, you can now run pixi commands:
-
Set up custom packages (if needed): Place your custom ROS packages in the
custom_packages/
directory on the host. They will be automatically available in the container. -
Generate recipes for all custom packages:
pixi run -e beta generate-recipes
-
Generate a recipe for a single custom package:
PACKAGE_XML_PATH=custom_packages/your_package/package.xml pixi run -e beta generate-custom-recipe
-
Build all additional recipes:
pixi run build_additional_recipes
-
- Start the container:
docker compose up -d robostack-dev
- Enter the container:
docker compose exec robostack-dev bash
- Stop the container:
docker compose down
- View logs:
docker compose logs robostack-dev
Built packages will be available in the output/linux-64/
directory on your host machine.
pixi run build_additional_recipes
: Build only additional recipespixi run -e beta generate-recipes
: Generate recipes from all custom packagespixi run -e beta generate-custom-recipe
: Generate a recipe for a single custom package (setPACKAGE_XML_PATH
)pixi run -e beta build
: Build all packages including generated recipes
-
Start the development environment:
docker compose up -d robostack-dev docker compose exec robostack-dev bash
-
Add your custom ROS packages to
custom_packages/
(on the host machine) -
Inside the container, generate recipes:
# For all packages pixi run -e beta generate-recipes # For a single package PACKAGE_XML_PATH=custom_packages/your_package/package.xml pixi run -e beta generate-custom-recipe
-
Move files
All custom packages should have a dedicated folder in additional_recipes like the example. The previous command should have generated a set of
.sh, .bat, .pz1
files. For linux-64, you only need the.sh
files. Copy those files to the folder, and copy over the generated recipe.yaml as well.cp *.sh additional_recipes/<package_name>/ cp recipe.yaml additional_recipes/<package_name>/
-
Iteratively Build Packages:
pixi run build_additional_recipes # or for full build pixi run -e beta build
Debug any issues from the output, and adjust your recipe accordingly.
-
Find built packages in
output/linux-64/
(on the host machine)
Project Structure
conda_build_config.yaml
hosts conda environment config that packages will be built in, such as numpy version, python version, etc.rosdistro_snapshot.yaml
hosts metadata of packages in the ROS release channel. This is used forpackages-ignore.yaml
,pkg_additional_info.yaml
: unknown, not really configurable.robostack.yaml
maps ROS dependencies to system dependency names. If your package uses a system dependency, you should configure it here.vinca_linux_64.yml
specifies the vinca information for linux_64 platform. We don't need to support platforms other than linux x64, so that is the only one. The official repository contains multiple versions for different OS platforms. Usually this is where which packages gets built are specified, but since we are not building robostack from scratch, we don't need to configure this.
Configurable Fields
- Python vesrion is specified in
conda_build_config.yaml
- numpy version is specified in
conda_build_config.yaml
General Tips
- Container logs: View logs with
docker compose logs robostack-dev
- Restart container:
docker compose restart robostack-dev
- Clean restart:
docker compose down && docker compose up -d robostack-dev
-
Vinca is not very good at detecting if pacakge version is for ROS1 or ROS2, this decides whether
build_catkin
orbuild_ament*
is used. If the generatedrecipe.yaml
says usingbuild_catkin.sh
, replace those withbuild_ament_cmake.sh
(for cpp packages) orbuild_ament_python.sh
(for python-only pakcages) if your package is ROS2. To be 100% sure, delete the scripts that use catkin. -
The source path in a
vinca
generated recipe is relative to the generatedrecipe.yaml
file. Since we move that file to a dedicated folder, this relative path changes. Therefore, for this data structure, you should change the path to include../../
Example folder structure:
RoboStack-humble-ARM/ ├── custom_packages/ │ └── your_package/ │ └── package.xml ├── additional_recipes/ │ └── your_package/ │ ├── recipe.yaml (moved here) │ └── build_ament_cmake.sh └── recipe.yaml (generated here by vinca)
Path correction needed:
# Generated by vinca (incorrect after moving): source: - path: custom_packages/your_package # Corrected path in additional_recipes/your_package/recipe.yaml: source: - path: ../../custom_packages/your_package
-
It is unknown how rattler-build handles dependencies in the same directory. Building is generally okay, but you may want to build things in a particular order manually.