Skip to main content

Raccoon robotics library (formerly libstp)

Project description

RaccoonLib

RaccoonLib

The core robotics library powering RaccoonOS for Botball.

PID motion control · Kinematics · Odometry · Step-based missions · Python bindings

Build & Release Latest Release License: GPL v3 C++20 Python Raspberry Pi Platform

📖 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-cliraccoon create project MyRobot runs 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

RaccoonLib 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

raccoon_library-1.0.76-cp313-cp313-win_amd64.whl (5.6 MB view details)

Uploaded CPython 3.13Windows x86-64

raccoon_library-1.0.76-cp313-cp313-manylinux_2_28_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

raccoon_library-1.0.76-cp313-cp313-macosx_11_0_universal2.whl (9.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ universal2 (ARM64, x86-64)

raccoon_library-1.0.76-cp312-cp312-win_amd64.whl (5.6 MB view details)

Uploaded CPython 3.12Windows x86-64

raccoon_library-1.0.76-cp312-cp312-manylinux_2_28_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

raccoon_library-1.0.76-cp312-cp312-macosx_11_0_universal2.whl (9.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ universal2 (ARM64, x86-64)

raccoon_library-1.0.76-cp311-cp311-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.11Windows x86-64

raccoon_library-1.0.76-cp311-cp311-manylinux_2_28_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

raccoon_library-1.0.76-cp311-cp311-macosx_11_0_universal2.whl (9.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ universal2 (ARM64, x86-64)

File details

Details for the file raccoon_library-1.0.76-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9507ee517636739d8d8611ea1a36f6492bff7b48db83e8b19a9b54cca44c6ea9
MD5 d133b816f4944b8c7dd75e036575ffc0
BLAKE2b-256 be94d4ceedc28a5f51ca09c4485db7a65da6f22cc22ef529c5036896c53bb396

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp313-cp313-win_amd64.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 543a1d8af3694e72f3498592e9251401ee4534ccf1a51e449ceadde250f7f70c
MD5 57f59913520da4489650182f4b504aeb
BLAKE2b-256 95bcd93efb3a3f0c955c244f0722d76c58dfc2de0ca46fe73002ad9ff2327f4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp313-cp313-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp313-cp313-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 7f69f6713fc599fa8ad05d010468ceef61bb6236673a1c063eaab983cbe46bd1
MD5 ce234a35b92905f47cdb9310faae1253
BLAKE2b-256 ecdd8878a2b05467158c3b0ab6834bab11e5aaa5b98aafe6513cd04ac9baf24a

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp313-cp313-macosx_11_0_universal2.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 036214eb6a4994923a4bb3763a51a899f244257ea183dab5555657ff07447c2f
MD5 7efaef57ff328b9335e4ee528390f92d
BLAKE2b-256 1b8dfa364fb07be03e1da11184503c43296490c7f62c7f0af6dd7804fcb9ce5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp312-cp312-win_amd64.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b877414fe903512c9e2d979673494c0606a80378fb4664378b3941e6f73a060
MD5 fbc4aae3fbf3675f35e9d7d29914e09c
BLAKE2b-256 aa66fa5397148cebdfb242aa72ec9e91d3026365375f249940977ed855b485b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp312-cp312-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp312-cp312-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 fe9c815533cf48a091848d73de2ded34fad06e9303fda68162108cc7f58fb46a
MD5 bf2a76b69dac4e5704f2989e3d378b77
BLAKE2b-256 d5a7d7a4b0d6293a285c01cf539c2968a904378dcdfdbdc17508a1c7e257ef44

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp312-cp312-macosx_11_0_universal2.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a82f0d8da60942536f62b19f77492fdd95216fe4724763f99e93e9a41c064050
MD5 3e4828f07092e434ca900fd005b1b9ea
BLAKE2b-256 f1979a949d6efe72554deb5307ffab0b327f56285215239b266ced0bfe37a3aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp311-cp311-win_amd64.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fbd465251d10d5c3bf1f8ffcc9ab7570210cff6712020a0d5e8f12c41d2ebc2f
MD5 7c7c98d8b3d29b949d9017047910ac66
BLAKE2b-256 5e44c860b6c4653ca2ff9017c60d6fc079847404db429a06763f1cdc16597395

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raccoon_library-1.0.76-cp311-cp311-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for raccoon_library-1.0.76-cp311-cp311-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 2d1f45a75e7243c1ec8abd53dfc1f0797977a0a477a8f478132312d56ee209d5
MD5 94c2719ff8c12fff5e8dbd97611026ac
BLAKE2b-256 068f792bf1612b2f8be1d89b7e105ced474f6e690b072de5582c9d48d376d478

See more details on using hashes here.

Provenance

The following attestation bundles were made for raccoon_library-1.0.76-cp311-cp311-macosx_11_0_universal2.whl:

Publisher: ci.yml on htl-stp-ecer/raccoon-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page