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.1.tar.gz (17.5 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.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rebelai-0.1.1.tar.gz
  • Upload date:
  • Size: 17.5 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.1.tar.gz
Algorithm Hash digest
SHA256 57daa98953d977078dda0042551a49e8fce7eaf4a7e5df03997e23d541c9aa5a
MD5 6db30504c454b96291aad5aaefb5560a
BLAKE2b-256 42d20fc9299fd6182ff839d60c8406ede08260eb4c325839d62726776fe96172

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rebelai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b814c23bd0d7d367d5dc85c957fb553106a01081bcc6aa72a404f26a6ccf2eb
MD5 cee57c89e6c6c95827134884544f8f4b
BLAKE2b-256 2e8f8ccbd5b35820b0b9d3d3350d5da0c883925c6860f290024921f93ba76fb4

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