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, 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

rebelai-0.1.4.tar.gz (18.0 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.4-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rebelai-0.1.4.tar.gz
Algorithm Hash digest
SHA256 439f95608ac904673fbc31f9bb03034e0865c6f36757eb2bad7aad3908a3f9f2
MD5 abcc2259e79b0db1ef3aefc59d1f58f4
BLAKE2b-256 295cf5575bb4034fa0886fd836c0c7f416ece4afb779aa0bb19750d6b6d510d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rebelai-0.1.4-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

Hashes for rebelai-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 645fe6884de15d4b4046207e23d4b77dcd203d9056a07df35c119df7ee124fb5
MD5 897c712c041d4cab05af97ae50e8d848
BLAKE2b-256 efd1d6db7181d055e7ac9aa72764cf6e09b9cdb78c6f1e16106977cfa0add69d

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