Skip to main content

Getting Started

This page covers installing SuperDex and building it from source. For a tour of the library and its concepts, see the Overview; to jump straight into worked examples, see the examples.

Quick Start​

SuperDex Robotics can be installed as part of Project SuperDex. Follow the quick-start instructions (Python) or build it from source (C++, Python).

Example Code​

Once installed, here is a minimal SuperDex Robotics Python script that loads a bot into a scene and steps the simulation:

import superdex.physics as physics
import superdex.robotics as robotics
from superdex.physics.paths import resolve_asset

physics.initialize(num_worker_threads=0)

scene = physics.create_scene("Quick Start")
scene.set_gravity([0, 0, -9.81])

# Load a bot and instantiate it in the scene.
bot_prefab = robotics.load_bot_prefab_from_file(
str(resolve_asset("bots/arms/fr3/fr3.superdex_bot"))
)
bots_context = robotics.create_context()
bot = robotics.create_bot(scene, bot_prefab, bots_context)

for _ in range(120):
scene.step(1.0 / 60.0)

robotics.destroy_bot(scene, bot)
physics.shutdown()
Where the bot files come from

The bot files live in the assets/ directory of the Project SuperDex source; the wheels do not include them. resolve_asset looks for them in this order:

  1. The directory in SUPERDEX_ASSETS_PATH, when it names an existing, readable directory. Nothing else is searched. A value that does not name one is ignored, and the search continues with steps 2 and 3.
  2. An assets/ directory above the running script, such as when the script is inside your project_superdex checkout.
  3. The assets/ directory of the checkout SuperDex was built from, for an editable source install.

If you run the script from outside the checkout with a wheel install, set the variable first:

export SUPERDEX_ASSETS_PATH=<path-to-project_superdex>/assets

Running the OSC control example opens the SuperDex Physics debugger, where you can watch the bot simulate in real time:

SuperDex Physics debugger showing the FR3 arm from the OSC control example

Explore more SuperDex Robotics examples.