Skip to main content

Universal robotics infrastructure - control any robot from servo to rocket

Project description

robo-infra

Universal robotics infrastructure for any hardware, any project.

PyPI CI Python License

Overview

robo-infra is a hardware-agnostic robotics infrastructure library designed to work with any robotics projectโ€”from hobby servos to industrial robots, from quadcopters to autonomous vehicles.

Key Features

  • ๐Ÿ”Œ Universal Hardware Abstraction - Works with any servo, motor, sensor, or controller
  • ** Simulation-First** - Everything works without hardware by default
  • ** AI-Native** - Built-in integration with ai-infra for LLM-controlled robots
  • ** API-Ready** - Seamless integration with svc-infra for REST/WebSocket APIs
  • ๐Ÿ›ก Safety-First - Comprehensive limits, emergency stops, and collision detection
  • ** Observable** - Full telemetry, logging, and monitoring built-in

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Your Application                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Controllers    โ”‚  Motion Planning  โ”‚  Safety Systems       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚      Actuators (Servos, Motors)  โ”‚  Sensors (IMU, Distance) โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                    Hardware Drivers                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚     Buses (I2C, SPI, UART)    โ”‚    Pins (GPIO, PWM, ADC)    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Platforms: Raspberry Pi โ”‚ Arduino โ”‚ Jetson โ”‚ Simulation    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Installation

Core Only (Minimal)

For embedded systems or when you just need robotics abstractions:

pip install robo-infra

With AI Integration

For LLM-controlled robots using ai-infra:

pip install robo-infra[ai]

With API Integration

For REST/WebSocket APIs using svc-infra:

pip install robo-infra[api]

With Hardware Support

For real hardware buses (I2C, SPI, Serial, CAN):

pip install robo-infra[hardware]

Full Installation

Install everything:

pip install robo-infra[full]

Platform-Specific Bundles

Platform Command
Raspberry Pi pip install robo-infra[raspberry-pi]
NVIDIA Jetson pip install robo-infra[jetson]
Generic Linux pip install robo-infra[hardware]

Granular Hardware Extras

Feature Extra Command
I2C sensors [i2c] pip install robo-infra[i2c]
SPI devices [spi] pip install robo-infra[spi]
Serial/UART [serial] pip install robo-infra[serial]
CAN bus [can] pip install robo-infra[can]
GPIO [gpio] pip install robo-infra[gpio]

Vision & Camera Extras

Feature Extra Command
OpenCV [vision] pip install robo-infra[vision]
Intel RealSense [realsense] pip install robo-infra[realsense]
Luxonis OAK [oak] pip install robo-infra[oak]
Raspberry Pi Camera [picamera] pip install robo-infra[picamera]
All cameras [cameras] pip install robo-infra[cameras]

Quick Start

from robo_infra.actuators import Servo
from robo_infra.core.types import Limits

# Create a servo (works in simulation by default)
servo = Servo(
    name="gripper",
    channel=0,
    limits=Limits(min_value=0, max_value=180),
)

# Move to position
await servo.move_to(90)

# Get current position
print(f"Position: {servo.position}ยฐ")

With Real Hardware

from robo_infra.drivers import PCA9685Driver
from robo_infra.actuators import Servo

# Initialize hardware driver
driver = PCA9685Driver(i2c_address=0x40)

# Attach servo to driver
servo = Servo(
    name="gripper",
    driver=driver,
    channel=0,
)

await servo.move_to(90)

AI Integration

from ai_infra import Agent
from robo_infra.actuators import Servo
from robo_infra.integrations import RobotTools

# Create robot components
servo = Servo(name="arm", channel=0)

# Export as AI tools
tools = RobotTools([servo])

# Use with AI agent
agent = Agent(tools=tools.as_tools())
await agent.run("Move the arm to 45 degrees")

API Integration

from svc_infra import create_app
from robo_infra.actuators import Servo
from robo_infra.integrations import RobotRouter

# Create robot components
servo = Servo(name="arm", channel=0)

# Export as API router
router = RobotRouter([servo])

# Add to app
app = create_app()
app.include_router(router.as_router(), prefix="/robot")

Core Concepts

Actuators

Physical components that create movement:

  • Servo - Position-controlled rotational actuators
  • Motor - Speed-controlled rotational actuators
  • Stepper - Precise step-based motors
  • LinearActuator - Linear motion actuators

Sensors

Components that measure the environment:

  • IMU - Inertial measurement (accelerometer, gyroscope)
  • Distance - Distance measurement (ultrasonic, ToF, IR)
  • Temperature - Temperature sensors
  • Current - Current sensing for motor feedback

Drivers

Hardware interfaces:

  • PCA9685 - 16-channel PWM driver
  • ADS1115 - 4-channel ADC
  • MCP23017 - 16-bit I/O expander

Controllers

High-level control systems:

  • ArmController - Robotic arm coordination
  • DriveController - Differential/holonomic drive
  • FlightController - Quadcopter/drone control

Documentation

Part of the nfrax Ecosystem

robo-infra is designed to work seamlessly with:

  • svc-infra - Backend infrastructure (API, auth, database)
  • ai-infra - AI/LLM infrastructure (agents, tools, embeddings)

License

MIT License - 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 Distribution

robo_infra-0.3.1.tar.gz (505.4 kB view details)

Uploaded Source

Built Distribution

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

robo_infra-0.3.1-py3-none-any.whl (586.8 kB view details)

Uploaded Python 3

File details

Details for the file robo_infra-0.3.1.tar.gz.

File metadata

  • Download URL: robo_infra-0.3.1.tar.gz
  • Upload date:
  • Size: 505.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robo_infra-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5b9b28dbbda9483022ff633cdda979f90c932a5768f58aa4228ed32ecbb43a67
MD5 fcd1bf470d58051879798343b17c556b
BLAKE2b-256 c5f637958596603d66d86885fc9fb03245c57497e1b6500e7d33aa80481c0d6a

See more details on using hashes here.

File details

Details for the file robo_infra-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: robo_infra-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 586.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robo_infra-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7520ba36b3d410bfb126a7f04caa9a631b736be8e9ceaaea6dc430fe7a8baebf
MD5 6424518438575f67e49a9771daa89722
BLAKE2b-256 6f8694f6b5492cfbe1dc7d2af8c556d767046701e0c9752698d381dad347bd32

See more details on using hashes here.

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