Welcome to airo-mono
! This repository provides ready-to-use Python packages to accelerate the development of robotic manipulation systems.
Key Motivation:
Want to learn more about our vision? Check out the in-depth explanation here
The airo-mono repository employs a monorepo structure, offering multiple Python packages, each with a distinct focus:
Package | Description | Owner |
---|---|---|
๐ท airo-camera-toolkit |
RGB(D) camera, image, and point cloud processing | @m-decoster |
๐๏ธ airo-dataset-tools |
Creating, loading, and manipulating datasets | @victorlouisdg |
๐ค airo-robots |
Simple interfaces for controlling robot arms and grippers | @tlpss |
๐ airo-spatial-algebra |
Transforms and SE3 pose conversions | @tlpss |
๐ฎ airo-teleop |
Intuitive teleoperation of robot arms | @tlpss |
๐ก๏ธ airo-typing |
Type definitions and conventions | @tlpss |
Detailed Information: Each package contains its own dedicated README outlining:
Code Ownership: The designated code owner for each package is your go-to resource for:
Command Line Functionality: Some packages offer command-line interfaces (CLI).
Run package-name --help
for details. Example: airo-dataset-tools --help
Repositories that follow the same style as airo-mono
packages, but are not part of the monorepo (for various reasons):
Repository | Description |
---|---|
๐ฅ airo-blender |
Synthetic data generation with Blender |
๐ airo-models |
Collection of robot and object models and URDFs |
๐ airo-drake |
Integration with Drake |
๐งญ airo-planner |
Motion planning interfaces |
๐ airo-tulip |
Driver for the KELO mobile robot platform |
We believe in keep simple things simple. Starting a new project should* be as simple as:
pip install airo-camera-toolkit airo-robots
And writing a simple script:
from airo_camera_toolkit.cameras.zed.zed2i import Zed2i
from airo_robots.manipulators.hardware.ur_rtde import URrtde
from airo_robots.grippers.hardware.robotiq_2f85_urcap import Robotiq2F85
robot_ip_address = "10.40.0.162"
camera = Zed2i()
robot = URrtde(ip_address=robot_ip_address)
gripper = Robotiq2F85(ip_address=robot_ip_address)
image = camera.get_rgb_image()
grasp_pose = select_grasp_pose(image) # example: user provides grasp pose
robot.move_linear_to_tcp_pose(grasp_pose).wait()
gripper.close().wait()
* we are still simplifying the installation process and the long imports
airo-mono
๐Probably the best way to learn what airo-mono
has to offer, is to look at the projects it powers:
Project | Description |
---|---|
๐ cloth-competition |
airo-mono is the backbone of the ICRA 2024 Cloth Competition ๐! |
Make sure you have a version of conda e.g. miniconda installed. To make the conda environment creation faster, we recommend configuring the libmamba solver first.
Then run the following commands:
git clone https://github.com/airo-ugent/airo-mono.git
cd airo-mono
conda env create -f environment.yaml
This will create a conda environment called airo-mono
with all packages installed. You can activate the environment with conda activate airo-mono
.
While we prefer using conda, you can also install the packages simply with pip:
git clone https://github.com/airo-ugent/airo-mono.git
cd airo-mono
pip install -e airo-robots -e airo-dataset-tools -e airo-camera-toolkit
โน๏ธ This method will be deprecated in the future, as we are moving to PyPI for package distribution. Direct references are not allowed in projects that are to be published on PyPI.
You can also install the packages from this repository directly with pip. This is mainly useful if you want to put airo-mono
packages as dependencies in your environment.yaml
file:
name: my-airo-project
channels:
- conda-forge
dependencies:
- python=3.10
- pip
- pip:
- "airo-typing @ git+https://github.com/airo-ugent/airo-mono@main#subdirectory=airo-typing"
- "airo-spatial-algebra @ git+https://github.com/airo-ugent/airo-mono@main#subdirectory=airo-spatial-algebra"
- "airo-camera-toolkit @ git+https://github.com/airo-ugent/airo-mono@main#subdirectory=airo-camera-toolkit"
- "airo-dataset-tools @ git+https://github.com/airo-ugent/airo-mono@main#subdirectory=airo-dataset-tools"
You can add this repo as a submodule and install the relevant packages afterwards with regular pip commands. This allows to seamlessly make contributions to this repo whilst working on your own project or if you want to pin on a specific version.
In your repo, run:
git submodule init
git submodule add https://github.com/airo-ugent/airo-mono@<commit>
cd airo-mono
You can now add the packages you need to your requirements or environment file, either in development mode or through a regular pip install. More about submodules can be found here. Make sure to install the packages in one pip command such that pip can install them in the appropriate order to deal with internal dependencies.
๐ง Not available yet, but coming soon.
Install the packages from PyPI.
pip install airo-camera-toolkit airo-dataset-tools airo-robots
Create and activate the conda environment, then run:
pip install -r dev-requirements.txt
pre-commit install
We use pre-commit to automatically enforce coding standards before every commit.
Our .pre-commit-config.yaml file defines the tools and checks we want to run:
Typing: Packages can be typed (optional, but strongly recommended). For this, mypy is used. Note that pre-commit curretnly does not run mypy, so you should run it manually with mypy <package-dir>
, e.g. mypy airo-camera-toolkit
.
Docstrings: Should be in the google docstring format.
make pytest <airo-package-dir>
(includes coverage report).We use GitHub Actions to run the following checks:
Workflow | Runs When |
---|---|
pre-commit | Every push |
mypy | pushes to main , PRs and the ci-dev branch |
pytest | pushes to main , PRs and the ci-dev branch |
Package Test Isolation: We use Github Actions matrices to run tests for each package in its own environment. This ensures packages correctly declare their dependencies. However, creating these environments adds overhead, so we'll explore caching strategies to optimize runtime as complexity increases.
To quickly setup up Python projects you can use this cookiecutter template. In the future we might create a similar one for airo-mono
packages. For now here are the steps you have to take:
airo-package/
โโ airo_package/
โ โโ code.py
โโ test/
โ โโ test_some_feature.py
โโ README.md
โโ setup.py
environment.yaml
and scripts/install-airo-mono.sh
.For convenient access to specific functions, we provide command-line interfaces (CLIs). This lets you quickly perform tasks like visualizing COCO datasets or starting hand-eye calibration without the need to write Python scripts to change arguments (e.g., changing a data path or robot IP address).
console_scripts
to make commands available.cli.py
file.airo_dataset_tools/cli.py
and airo-dataset-tools/setup.py
.__main__()
functions can still house developer-centric CLIs. Consider moving user-friendly ones to the package CLI.As a first step towards PyPI releases of the airo-mono
packages, we have already started versioning them.
Read more about it in docs/versioning.md.
TODO: simplify this explanation and move it to the setup or installation section.
An issue with using a monorepo is that you want to have packages declare their local dependencies as well. But before you publish your packages or if you want to test unreleased code (as usually), this creates an issue: where should pip find these local package? Though there exist more advanced package managers such as Poetry, (more background on package and dependency management in python ) that can handle this, we have opted to stick with pip to keep the barier for new developers lower.
This implies we simply add local dependencies in the setup file as regular dependencies, but we have to make sure pip can find the dependencies when installing the packages. There are two options to do so:
pip install <pkg1> <pkg2> <pkg3>
pip install --find-link https:// or /path/to/distributions/dir
Initially, we used a direct link to point to the path of the dependencies, but this created some issues and hence we now use this easier approach. see #91 for more details.