LeRobot Policy for NWO Robotics
Minimal adapter that wraps NWO Robotics Cloud API as a LeRobot-compatible policy.
What This Does
- Converts LeRobot observations → natural language instructions
- Calls NWO's Vision-Language-Action (VLA) API
- Returns actions in LeRobot-compatible format
- Enables LeRobot users to use NWO as a policy backend
Installation
pip install lerobot_policy_nwo
Quick Start
1. Get API Key
Register at nwo.capital/webapp/api-key.php to get your free API key (100,000 calls/month).
2. Basic Usage
from lerobot_policy_nwo import NWOPolicy, NWOPolicyConfig
# Configure policy
config = NWOPolicyConfig(
api_key="your_nwo_api_key", # Or set NWO_API_KEY env var
instruction_template="Pick up the object",
)
# Create policy
policy = NWOPolicy(config)
# Use in LeRobot loop
observation = {
"observation.image": camera_frame, # (3, 224, 224) tensor
"observation.state": joint_positions, # (6,) tensor
}
action = policy.select_action(observation)
# Returns: tensor of shape (1, action_dim)
# Check API response metadata
metadata = policy.get_last_metadata()
print(f"Confidence: {metadata['confidence']}")
print(f"Request ID: {metadata['request_id']}")
3. With LeRobot Training
from lerobot.configs.policies import PreTrainedConfig
from lerobot_policy_nwo import NWOPolicy
# Use NWO for data collection
policy = NWOPolicy.from_pretrained("nwo")
# Or specify config
config = PreTrainedConfig.from_pretrained("nwo")
policy = NWOPolicy(config)
Configuration
| Parameter | Default | Description |
|---|---|---|
api_key |
NWO_API_KEY env |
Your NWO API key |
api_endpoint |
https://nwo.capital/webapp |
NWO API base URL |
instruction_template |
"Execute robot action..." |
Template for converting observations |
use_image |
True |
Include camera image in API calls |
timeout |
30.0 |
API request timeout (seconds) |
API Features Used
- Inference (
api-robotics.php?action=inference) - Main VLA inference - Health Check (
?action=health) - API status - Dataset Export (
?action=export_dataset) - Export for LeRobot training
Limitations
- Inference only: NWO does not support training. Use LeRobot's imitation learning on collected data.
- Cloud-based: Requires internet connection to NWO API
- Rate limits: Free tier = 100k calls/month, Prototype = 500k/month
Development
git clone https://github.com/nwocapital/lerobot_policy_nwo.git
cd lerobot_policy_nwo
pip install -e ".[dev]"
pytest
Links
- NWO Robotics: https://nwo.capital/webapp/nwo-robotics.html
- API Dashboard: https://nwo.capital/webapp/api-key.php
- LeRobot: https://github.com/huggingface/lerobot
- PyPI: https://pypi.org/project/lerobot_policy_nwo/
License
MIT License - see LICENSE file.
Support
- Email: ciprian.pater@publicae.org
- Discord: NWO Capital community
Metadata
Release files for lerobot-policy-nwo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lerobot_policy_nwo-0.1.0.tar.gz | 12.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lerobot_policy_nwo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / lerobot_policy_nwo-0.1.0.tar.gz
| Download URL | lerobot_policy_nwo-0.1.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30fea69cc310076d1beeb726e47f68662a918d5dcd62abaad4f82c2d39e718c4
|
|
BLAKE2b-256 checksum How to use checksums |
62596287d55c95287aab161b71c5d49eec002dba0fe77fc203930657c44d261f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / lerobot_policy_nwo-0.1.0-py3-none-any.whl
| Download URL | lerobot_policy_nwo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3126cbbe35a3e4af97de1a18e3230e14750129fc9eadb1ed8e6f87c6f087298
|
|
BLAKE2b-256 checksum How to use checksums |
09ce0b669ec7d9b2f894d5988270299473e969eaddd2b6e1a430a1857358f337
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|