Skip to main content

Krabby Compute - Parkour

Parkour policy inference client and utilities for the Krabby quadruped robot.

Overview

This package provides the parkour policy inference client that:

  • Connects to HAL server via ZMQ
  • Polls hardware observations
  • Runs parkour policy inference
  • Sends joint commands back to HAL server

Components

Inference Client (compute.parkour.inference_client.ParkourInferenceClient)

  • Runs in a separate thread
  • Manages HAL client connection
  • Handles inference loop (poll → infer → command)

Policy Interface (compute.parkour.policy_interface.ParkourPolicyModel)

  • Loads parkour policy checkpoints
  • Runs inference on observations
  • Uses OnPolicyRunnerWithExtractor for model loading

Mappers (compute.parkour.mappers)

  • hardware_to_model: Maps Krabby hardware observations to parkour model format
  • model_to_hardware: Maps parkour model actions to Krabby joint positions

Types (compute.parkour.parkour_types)

  • ParkourObservation: Observation in training format
  • ParkourModelIO: Combined input for policy inference
  • InferenceResponse: Policy inference output with action tensor

Installation

From source (development)

cd compute/parkour
pip install -e .

From wheel

pip install krabby-compute-parkour-0.1.0-py3-none-any.whl

Usage

As a library

from compute.parkour.inference_client import ParkourInferenceClient
from compute.parkour.policy_interface import ModelWeights
from hal.client.config import HalClientConfig

# Configure HAL client
hal_config = HalClientConfig(
    observation_endpoint="inproc://hal_observation",
    command_endpoint="inproc://hal_commands",
)

# Configure model
model_weights = ModelWeights(
    checkpoint_path="/path/to/model.pt",
    action_dim=12,
    obs_dim=753,
)

# Create client
client = ParkourInferenceClient(
    hal_client_config=hal_config,
    model_weights=model_weights,
    control_rate=100.0,
    device="cuda",
    transport_context=transport_context,  # From HAL server
)

# Initialize and start
client.initialize()
client.start_thread(running_flag=lambda: True)

Architecture

┌──────────────────────────────────────┐
│  ParkourInferenceClient              │
│                                      │
│  ┌────────────┐    ┌──────────────┐ │
│  │ HAL Client │───▶│ Policy Model │ │
│  └────────────┘    └──────────────┘ │
│        │                  │          │
│        │ observations     │ actions  │
│        ▼                  ▼          │
│  ┌──────────────────────────────┐   │
│  │   Hardware ↔ Model Mappers   │   │
│  └──────────────────────────────┘   │
└──────────────────────────────────────┘

Dependencies

  • krabby-hal-client: For HAL communication
  • torch: For policy inference
  • numpy: For numerical operations

Development

Running Tests

pytest tests/

Building Wheel

python -m build

Notes

  • Designed to run in a separate thread from HAL server
  • Supports both inproc (same-process) and TCP (distributed) communication
  • Zero-copy operations where possible for performance

Release files for krabby-compute-parkour 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for krabby-compute-parkour 0.1.1
File Interpreter ABI Platform
krabby_compute_parkour-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / krabby_compute_parkour-0.1.1-py3-none-any.whl

Download URL krabby_compute_parkour-0.1.1-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
985b94b188e614a1e53d95b7133d050d5561d8751d0e7ae992e3fc16272baf10
BLAKE2b-256 checksum
How to use checksums
e0d0fc6dcb2ce2f20f1ca4d8ad4d39bdacc0d03b3a4f7afa84cce04a8e18a7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page