Raccoon robotics library (formerly libstp)
Project description
RaccoonLib
The core robotics library powering RaccoonOS for Botball.
PID motion control · Kinematics · Odometry · Step-based missions · Python bindings
📖 Full documentation at raccoon-docs.pages.dev
RaccoonLib is the heart of RaccoonOS — a full robotics platform built for Botball competition. It gives your robot a solid foundation: reliable motion, clean sensor abstractions, and a step-based mission system that makes autonomous code readable and maintainable.
Built from years of competition experience at HTL St. Pölten, it's designed so that new teams don't have to start from zero.
What's Inside
| Module | What it does |
|---|---|
| Motion Control | PID-controlled drive_forward, turn_right, drive_strafe with feedforward compensation |
| Calibration | Auto-tune feedforward (kS, kV, kA) and PID via relay-feedback — no guessing |
| Kinematics | Differential and mecanum drivetrains — forward & inverse |
| Odometry | Real-time position and heading from wheel encoders + IMU fusion |
| Step Framework | seq(), parallel(), .until() — write missions like a readable recipe |
| Sensors & Actuators | IR sensors, buttons, servos — clean, consistent API |
| Python Bindings | Full Python API via pybind11 — same power, less boilerplate |
Getting Started
RaccoonLib runs on the KIPR Wombat controller (Raspberry Pi, ARM64). Local installs without a mock platform are not supported — deploy directly to the Pi.
1. Clone
git clone https://github.com/htl-stp-ecer/raccoon-lib.git --recurse-submodules
cd raccoon-lib
2. Build & deploy to your Pi in one step
RPI_HOST=<your-pi-ip> bash deploy.sh
This cross-compiles for ARM64 via Docker and installs the wheel on your Pi over SSH. No local toolchain setup needed.
| Variable | Default | Description |
|---|---|---|
RPI_HOST |
(required) | Raspberry Pi IP address |
RPI_USER |
pi |
SSH username |
RPI_DIR |
/home/pi/python-libs |
Install directory |
BUILD_TYPE |
Release |
CMake build type |
Starting a new robot project? Use
raccoon-cli—raccoon create project MyRobotruns a hardware wizard and generates your robot config, project structure, and deploy scripts automatically.
How It Works
You write missions. RaccoonLib handles the math.
Missions are Python classes with a sequence() method — describe what the robot does step by step:
from libstp import *
class M01NavigateToZone(Mission):
def sequence(self) -> Sequential:
return seq([
mark_heading_reference(), # lock current heading as 0°
parallel(
drive_forward(cm=40), # drive while lowering arm
seq([
wait_until_distance(7),
Defs.arm_servo.hold(),
]),
),
turn_right(degrees=90),
# drive until both IR sensors see black tape
drive_forward().until(
on_black(Defs.front.left) & on_black(Defs.front.right)
),
drive_backward(cm=3),
])
The robot hardware config (motors, sensors, PID gains) is generated by raccoon-cli's hardware wizard — see raccoon-example for a fully commented reference.
Architecture
Requirements
- CMake >= 3.15
- C++20 compatible compiler
- Python >= 3.11
- Docker (for ARM64 cross-compilation)
C++ dependencies: Eigen3 3.4.0 · LCM 1.5.0 · spdlog 1.14.1 · pybind11 2.13.6
Python dependencies: pyyaml · aiosqlite
Testing
# C++ tests
cmake -B build -DBUILD_TESTING=ON
cmake --build build
ctest --test-dir build
# Python tests
pytest tests/
Part of RaccoonOS
RaccoonLib is one piece of the full platform:
| Repository | What it is |
|---|---|
| raccoon-cli | Dev toolchain — scaffolding, hardware wizard, raccoon run |
| raccoon-example | Reference robot — start here if you're new |
| raccoon-transport | LCM messaging layer (C++, Python, Dart) |
| documentation | Full platform docs |
Contributing
See CONTRIBUTING.md for how to add modules, steps, run tests, and follow code style.
License
Copyright (C) 2026 Tobias Madlberger
Licensed under the GNU General Public License v3.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raccoon_library-1.0.91-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dced0bd46ebb25f33c48cf07d417b908a5a35d9eb6c93b17eec1298396edd73
|
|
| MD5 |
4cf3b8a3368551070e51a2bd54fe852f
|
|
| BLAKE2b-256 |
9445ee1e3b2e85bb3125593079fd4c9f5bad5a91f92ccc8c96dd441864e32a2e
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp313-cp313-win_amd64.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp313-cp313-win_amd64.whl -
Subject digest:
8dced0bd46ebb25f33c48cf07d417b908a5a35d9eb6c93b17eec1298396edd73 - Sigstore transparency entry: 1615196859
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed361a1b0730186f20096e6a803ce2579f309189a14fe816a2e4da99dfab009c
|
|
| MD5 |
d33224ef1ae791a59c816ff07c475b36
|
|
| BLAKE2b-256 |
91f412868a8b5bd31af9bd5e4a38b8845026479f335a8e8e3111e3d8ce04aaad
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
ed361a1b0730186f20096e6a803ce2579f309189a14fe816a2e4da99dfab009c - Sigstore transparency entry: 1615196834
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp313-cp313-macosx_14_0_universal2.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp313-cp313-macosx_14_0_universal2.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.13, macOS 14.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aff97130ac7dabe9940d913453e2104a53d1a9ed890d201c46a54ac7ed14f01
|
|
| MD5 |
998b2c97909f12702319ed96946842f4
|
|
| BLAKE2b-256 |
e1e36816f941fd3c916282981aec38f77341be4d4886c3b461015d03df2fa955
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp313-cp313-macosx_14_0_universal2.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp313-cp313-macosx_14_0_universal2.whl -
Subject digest:
1aff97130ac7dabe9940d913453e2104a53d1a9ed890d201c46a54ac7ed14f01 - Sigstore transparency entry: 1615196875
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a731878b62e9e4cebf2c2dedcd551f9cf565a9e3027961f901c72d8302a7f0c7
|
|
| MD5 |
76a1766dd4f2972ce19d94c93cf93d75
|
|
| BLAKE2b-256 |
146d4be1a973653717584c0aac4f6b717b91da2e45f14cb1759c57676d79e43d
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp312-cp312-win_amd64.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp312-cp312-win_amd64.whl -
Subject digest:
a731878b62e9e4cebf2c2dedcd551f9cf565a9e3027961f901c72d8302a7f0c7 - Sigstore transparency entry: 1615196906
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6467c4d8d471e1ea27058a1c5869b38ab9c08f76d4d5e5029cb29623e1e0a73b
|
|
| MD5 |
b12dedb489e1092a10a9226d8cb87b54
|
|
| BLAKE2b-256 |
191b4c121657e2003677a12bad6a57937c5d814826f631be948dd9068b37cdc2
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
6467c4d8d471e1ea27058a1c5869b38ab9c08f76d4d5e5029cb29623e1e0a73b - Sigstore transparency entry: 1615196892
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp312-cp312-macosx_14_0_universal2.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp312-cp312-macosx_14_0_universal2.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.12, macOS 14.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e3a914ecf83d5445cb395e2a98544ca4704296b0234aa7f68502c134a70df9b
|
|
| MD5 |
459f07b3854d0c364445f54f44a8dc5f
|
|
| BLAKE2b-256 |
1c88dfbfd7655f62adfa325a2ce84bc1121ff33d4354425926bdb4dc5f0f9094
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp312-cp312-macosx_14_0_universal2.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp312-cp312-macosx_14_0_universal2.whl -
Subject digest:
3e3a914ecf83d5445cb395e2a98544ca4704296b0234aa7f68502c134a70df9b - Sigstore transparency entry: 1615196816
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
619660c1755c6dedb4dd41cda894588c50c6dbaf03b8490fce12af20358cd610
|
|
| MD5 |
5c6419974f0a0a72558145f48f81a3ea
|
|
| BLAKE2b-256 |
ad315be8cfc696704baf1e2502c398ec70312022435509f119281bfe88402d44
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp311-cp311-win_amd64.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp311-cp311-win_amd64.whl -
Subject digest:
619660c1755c6dedb4dd41cda894588c50c6dbaf03b8490fce12af20358cd610 - Sigstore transparency entry: 1615196826
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
892669d60e28cea8a05f6ff6bef2885257c91f286624450f9d7a4188a1c00d9c
|
|
| MD5 |
03af3fe430fb752cf1b0fa332136476f
|
|
| BLAKE2b-256 |
c1985832269a9ab8c388d8e7d86139f9d0a1f7a606eb05c22d2c93f38f5b8a6a
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
892669d60e28cea8a05f6ff6bef2885257c91f286624450f9d7a4188a1c00d9c - Sigstore transparency entry: 1615196794
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raccoon_library-1.0.91-cp311-cp311-macosx_14_0_universal2.whl.
File metadata
- Download URL: raccoon_library-1.0.91-cp311-cp311-macosx_14_0_universal2.whl
- Upload date:
- Size: 8.3 MB
- Tags: CPython 3.11, macOS 14.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d2eda08b9d9fd55c167527174ccf6f603cef3bd115d8e5a1d619f48aadcff7a
|
|
| MD5 |
a8427a4725e78643c04d1edbdc71ab22
|
|
| BLAKE2b-256 |
0967bfd7b1cf718e3a7e56843c1cd049347ff443c898abd1eeb3088d65dc4be9
|
Provenance
The following attestation bundles were made for raccoon_library-1.0.91-cp311-cp311-macosx_14_0_universal2.whl:
Publisher:
ci.yml on htl-stp-ecer/raccoon-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raccoon_library-1.0.91-cp311-cp311-macosx_14_0_universal2.whl -
Subject digest:
7d2eda08b9d9fd55c167527174ccf6f603cef3bd115d8e5a1d619f48aadcff7a - Sigstore transparency entry: 1615196865
- Sigstore integration time:
-
Permalink:
htl-stp-ecer/raccoon-lib@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/htl-stp-ecer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fa49bf1bdc6ce97d53fc9b0eab79cd4cc9f9ca01 -
Trigger Event:
push
-
Statement type: