Text to physics simulation in one line. Generate MuJoCo models from text prompts.
Project description
RebelAI
Text → Physics Simulation in one line.
import rebelai
model = rebelai.generate("kitchen table with coffee mugs")
# That's it. You have a physics-ready MuJoCo model.
The Problem
You want to simulate a robot in a realistic environment. Today that means:
- Manually modeling scenes in Blender (hours)
- Writing collision geometry by hand (tedious)
- Tuning physics properties (trial and error)
The Solution
Describe what you want. Get a MuJoCo model.
import rebelai
import mujoco
# Generate any scene from text
model = rebelai.generate("cluttered office desk with laptop and coffee cup")
# Full MuJoCo API - do whatever you want
data = mujoco.MjData(model)
mujoco.mj_step(model, data)
RebelAI handles:
- World Labs API → Generate 3D scenes from text
- Collision geometry → Automatic convex decomposition
- Physics properties → Mass, friction, contacts
- MJCF generation → Ready for MuJoCo
Install
pip install rebelai
Quick Start
# Set your World Labs API key
export WORLD_LABS_API_KEY="wl_xxx"
import rebelai
# From text prompt
model = rebelai.generate("red sports car on a driveway")
# Or from existing mesh file
model = rebelai.load("scene.glb")
Why RebelAI?
| Without RebelAI | With RebelAI |
|---|---|
| Model scene in Blender | generate("kitchen") |
| Export, fix mesh issues | Automatic |
| Write collision geometry | Automatic |
| Tune mass/friction | Automatic |
| Debug MJCF XML | Just works |
Configuration
from rebelai import generate, ConversionConfig, CollisionMethod
config = ConversionConfig(
collision_method=CollisionMethod.CONVEX_DECOMPOSITION,
coacd_threshold=0.08, # Coarser = fewer hulls, faster sim
density=500.0, # kg/m³
)
model = generate("wooden desk", config=config)
Collision Methods
| Method | Description |
|---|---|
CONVEX_DECOMPOSITION |
Multiple convex hulls via CoACD (default) |
CONVEX_HULL |
Single convex hull |
BOUNDING_BOX |
Axis-aligned box |
PRIMITIVES |
Fit box/sphere/cylinder |
Error Handling
from rebelai import generate, WorldLabsAuthError, WorldLabsAPIError
try:
model = generate("office chair")
except WorldLabsAuthError:
print("Check your API key")
except WorldLabsAPIError as e:
print(f"Generation failed: {e}")
API Reference
rebelai.generate(prompt, api_key=None, config=None, model="Marble 0.1-plus")
Generate scene from text → MuJoCo model
Important: Use model="Marble 0.1-plus" (default) for collision meshes. Marble 0.1-mini does not generate physics-ready meshes.
rebelai.load(source, config=None)
Load mesh file → MuJoCo model
rebelai.to_mjcf(source, config=None)
Convert mesh → MJCF XML string
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rebelai-0.1.5.tar.gz.
File metadata
- Download URL: rebelai-0.1.5.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a01c961f3ab66bc22fb8c047335343c5e64cba44c9abea53a459e06ec69a69c9
|
|
| MD5 |
23e8b266e73d1f1f36ecdd82045f0eba
|
|
| BLAKE2b-256 |
d6d18377cf419cb60fcf1dea83280175944f5ac4442cb5750d97dad644320ff9
|
File details
Details for the file rebelai-0.1.5-py3-none-any.whl.
File metadata
- Download URL: rebelai-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4164b2ff4e3f54f0935ee2eb3ea37c3bb5a9c35fc5a27663572c7009b0f069a0
|
|
| MD5 |
4a8fcc032b863b2cdab33fbd454873f4
|
|
| BLAKE2b-256 |
830367b92d61985fc8a7a5d52c1b633bf629de76e43b93dca3ea1d349a200224
|