Skip to main content

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, quality="standard")

Generate scene from text → MuJoCo model

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

rebelai-0.1.3.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rebelai-0.1.3-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file rebelai-0.1.3.tar.gz.

File metadata

  • Download URL: rebelai-0.1.3.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for rebelai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 565317ad078d879e3f2fae7e1989c01a89770274eb1adfd158ae4030c9937195
MD5 9a1dfee990d91077674c086154487276
BLAKE2b-256 ae71d8bd46ae585f3b1c01ed3ac4bb8313b0c7cc165794d030bbff94f09d809f

See more details on using hashes here.

File details

Details for the file rebelai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rebelai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for rebelai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 720a8895175a598eaf46ee46fd57f2ff3691464c5da2e9aa3e24a09b273b387a
MD5 49d47367cdb608a5295754d7723877a4
BLAKE2b-256 05481668adc5458cc6b2d4af8167a6ae7ffab2de1b9b0a192590dd528271b02b

See more details on using hashes here.

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