Skip to main content

dora-policy-inference

Load pre-trained policies and execute them in real-time to control robots based on camera observations and current robot state.

Quick Start

1. Installation

# Source your venv
cd dora/node-hub/dora-policy-inference
uv pip install -e .

2. Usage Guide

Create a dataflow file, see examples/lerobot-dataset/policy_inference.yml:

nodes:
  # Policy inference
  - id: policy_inference
    build: pip install -e ../../dora-policy-inference
    path: dora-policy-inference
    inputs:
      # your Cameras should be same as the dataset trained policy is on.
      laptop: laptop_cam/image
      front: front_cam/image
      robot_state: robot/pose
    outputs:
      - robot_action
      - status
    env:
      # Required settings
      MODEL_PATH: "/path/to/your/lerobot/model"
      TASK_DESCRIPTION: "pick up the cup"
      INFERENCE_FPS: "30"

      # Camera configuration
      CAMERA_NAMES: "laptop,front"
      CAMERA_LAPTOP_RESOLUTION: "480,640,3"
      CAMERA_FRONT_RESOLUTION: "480,640,3"

  # Robot controller
  - id: robot_controller
    path: your-robot-controller
    inputs:
      action: policy_inference/robot_action # predicted joint state(rad)
    outputs:
      - pose

3. Start Policy Inference

dora build policy_inference.yml
dora run policy_inference.yml

The node will process camera inputs and robot state to generate actions for robot control.

Configuration

Required Environment Variables

Variable Description Example
MODEL_PATH Path to trained LeRobot policy model directory "outputs/train/your_policy/checkpoints/last/pretrained_model"
CAMERA_NAMES Comma-separated camera names "laptop,front,top"
CAMERA_*_RESOLUTION Resolution for each camera (height,width,channels) "480,640,3"
INFERENCE_FPS Inference frequency "30"
TASK_DESCRIPTION Task description for task-conditioned policies "Grab the red cube and and drop in the box."

Camera Configuration

For each camera defined in CAMERA_NAMES, you must set the resolution:

export CAMERA_NAMES="laptop,front,top"
export CAMERA_LAPTOP_RESOLUTION="1080,1920,3"
export CAMERA_FRONT_RESOLUTION="480,640,3"
export CAMERA_TOP_RESOLUTION="480,640,3"

Model Requirements

The node expects LeRobot trained models with:

  • A config.json file in the model directory
  • Model weights compatible with LeRobot's from_pretrained() method

Device Selection

The node automatically selects the best available device:

  • CUDA GPU (if available)
  • MPS (Apple Silicon)
  • CPU (fallback)

Device selection is handled by LeRobot's get_safe_torch_device() function.

See the examples/lerobot-dataset/policy_inference.yml for complete dataflow configurations.

License

This project is released under the MIT License.

Metadata

Release files for dora-policy-inference 0.0.0

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

Source distribution (sdist)

Source distribution for dora-policy-inference 0.0.0
File Size Uploaded Provenance Actions
dora_policy_inference-0.0.0.tar.gz 5.4 kB Without provenance Details for dora_policy_inference-0.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dora-policy-inference 0.0.0
File Interpreter ABI Platform Actions
dora_policy_inference-0.0.0-py3-none-any.whl Python 3 none any Details for dora_policy_inference-0.0.0-py3-none-any.whl

Total release size: 11.3 kB

Release files / dora_policy_inference-0.0.0.tar.gz

Download URL dora_policy_inference-0.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
532f75c05e80b5d8329e8a21cf12a5fd14aa4fc8f7aa7fdefc78bc3a136e2b94
BLAKE2b-256 checksum
How to use checksums
7678fd57550a4115e4f1ed1184d3a7cdf8c6b3ea3aed468a9c2dcca128138fbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / dora_policy_inference-0.0.0-py3-none-any.whl

Download URL dora_policy_inference-0.0.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5818fe5a486ad5d4b791b3baf759a05bd90913d63c5ce4baa51f1d7aaf9e9da
BLAKE2b-256 checksum
How to use checksums
1aed2366d06e78fe08e8a8aec12a0f5c665b8fb61428ac6e47964c5416873a8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Security for dora-policy-inference 0.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files No provenance

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