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 package (simulation only)
pip install robo-infra

# With Raspberry Pi support
pip install robo-infra[raspberry-pi]

# With all hardware support
pip install robo-infra[hardware]

# With AI integration
pip install robo-infra[ai]

# With API integration
pip install robo-infra[api]

# Everything
pip install robo-infra[all]

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.1.8.tar.gz (132.5 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.1.8-py3-none-any.whl (161.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robo_infra-0.1.8.tar.gz
  • Upload date:
  • Size: 132.5 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.1.8.tar.gz
Algorithm Hash digest
SHA256 75a35cebe49a20e824ccb791ae7cf7bfe97134d2c488e3d3cdd6d0d522c6e0fd
MD5 e5b36bf6218f4e27c2c3ebaa73917f7f
BLAKE2b-256 6937aed3d4cdfbab9c02e49c098b6f394c7cf003d9a145584c45ff41259fb15d

See more details on using hashes here.

Provenance

The following attestation bundles were made for robo_infra-0.1.8.tar.gz:

Publisher: publish-pypi.yml on nfraxlab/robo-infra

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

File details

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

File metadata

  • Download URL: robo_infra-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 161.0 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.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3e24855b7ca9879ec45c08571147929ce7435e7181b69668b35e92bd5280e3f6
MD5 a4f7b287f54b4afad5a406e3fda35b16
BLAKE2b-256 6d7e36f695f0cc2c9804e037d21764b55d79358d0f20856985c4de24a32f762b

See more details on using hashes here.

Provenance

The following attestation bundles were made for robo_infra-0.1.8-py3-none-any.whl:

Publisher: publish-pypi.yml on nfraxlab/robo-infra

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