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.2.tar.gz (17.6 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.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rebelai-0.1.2.tar.gz
  • Upload date:
  • Size: 17.6 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.2.tar.gz
Algorithm Hash digest
SHA256 96e50a2ea0c2a12a8bd0625d1d91c6a64e1f3f526a921c47af7d2530f17ac7ff
MD5 aeffed21616539f82e4a49704a65fa7b
BLAKE2b-256 b1c50cc4669d5f2e63b18d779d5bb527b3fd11fe1f77724abb40f5108731c1ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rebelai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 950e144f2acec2e12f5ad1c549edd8c6870fee683c99396d421d3b12d8f34ee4
MD5 25f90a2e0870654e4a42072f58995087
BLAKE2b-256 9645f459eb0bd724a9d1f40301c21c24ed2d69cd7c5b73226b5e41b45055f9d7

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