botblocks
projectsgalleryworkspacedocsprofile
introcapabilitiesdashboardpythonmcpclidemos

projects

projects store robot definitions and assets under reusable paths such as Robot('my-project/my-robot') and Asset('my-project/cup.glb'). sign in and open projects to create or manage one.

import and configure

use build a robot to upload a definition and its meshes, or paste a url to a json, urdf, mjcf, or xacro definition. github file-page urls work directly. the website also imports single glb or step files; the import api accepts fusion design data. the cli and mcp import definition urls or uploaded files; see cli and mcp. mjcf urls currently need a github model directory. local uploads can include the complete model directory.

imports convert geometry, joints, and supported actuators into a botblocks robot. they do not preserve every mujoco feature: ball joints and tendon/site actuators are not supported by this conversion. inspect the saved part tree and joint behavior before using an imported model for control or training.

robot json

parts is a nested tree of named parts with mass, meshes, and optional children and joint. names must be unique. mesh_config.includes is relative to the json file; mesh_config.scale scales mesh coordinates (use 0.001 for millimetres). mesh names without extensions refer to stl files.

meshes use their part's local frame, with the origin at its joint. export them in that frame rather than in assembled robot coordinates, or the joint transforms will displace them a second time. joint.origin.pos and joint.origin.rot place the part relative to its parent, in metres and roll/pitch/yaw radians (rotation order Rz(yaw) Ry(pitch) Rx(roll)). mesh scaling does not scale joint positions.

joint.axis implies a revolute joint; joint.type can explicitly be revolute, prismatic, or solid. without an axis or type, the part is solid. joint.limits gives travel limits in radians or metres; joint.damping adds viscous joint damping. root joint.type: "anchored" fixes the base; every other root type floats.

mass is kilograms per part, excluding children. centre of mass and inertia are estimated from uniformly dense mesh convex hulls, scaled to that mass. these estimates depend on the selected meshes; they are not measured inertial properties.

for example, save this as robot.json beside a meshes directory containing base.stl and arm.stl, exported in millimetres:

{
  "name": "demo",
  "mesh_config": {"includes": "./meshes", "scale": 0.001},
  "parts": {
    "name": "base", "mass": 0.4, "meshes": ["base"],
    "joint": {"type": "anchored"},
    "children": [{
      "name": "arm", "mass": 0.04, "meshes": ["arm"],
      "joint": {
        "origin": {"pos": [0, 0, 0.05]},
        "axis": [0, 1, 0], "limits": [-1.5, 1.5]
      }
    }]
  },
  "subsystems": [
    {"kind": "Servo", "name": "shoulder", "joint": ["base", "arm"], "maxTorque": 0.2, "noLoadSpeed": 8.7},
    {"kind": "IMU", "name": "imu", "joint": ["base"]}
  ]
}

upload the json and both meshes together on the website, or run botblocks import robot ./robot.json --save my-project/demo. then load Robot('my-project/demo') and command robot['shoulder'].target(0.3) from a running environment. source-file edits take effect after importing again.

subsystem records

subsystems uses the same records as saved robots and the python wire protocol. kind is case-sensitive; joint is an array describing the full part path, for actuators and body-mounted sensors alike. composite references use subsystem names.

kindconfiguration besides name
Servojoint, kp (15), maxTorque (.15), noLoadSpeed (10), optional ctrlrange/kv, armature/frictionloss (0)
Motorjoint, gear (1), ctrlrange ([-1, 1])
Encoderjoint
IMUjoint
Camerajoint, facing ([1, 0, 0]), offset (.03), w (480), h (360), fps (30; 0 disables caching)
DiffDrivemotorNames: left/right motor names
Armnodes: ordered servo names; optional tip: slash-separated part path or marker name
Commandn: observation dimensions (2)
[
  {"kind": "Servo", "name": "shoulder", "joint": ["base", "arm"], "maxTorque": 2, "noLoadSpeed": 8},
  {"kind": "Encoder", "name": "angle", "joint": ["base", "arm"]},
  {"kind": "Camera", "name": "camera", "joint": ["base", "arm"], "w": 320, "h": 240},
  {"kind": "Arm", "name": "arm", "nodes": ["shoulder"], "tip": "base/arm/tip"}
]

this array goes in the robot's subsystems field. all eight kinds work in json imports. defaults are shown in parentheses; unknown subsystem kinds or fields fail the import. the earlier json-only type, parent, torque, and speed fields have been removed. use kind, full joint paths, maxTorque/noLoadSpeed for servos, and gear for motors.

for hinges, maxTorque is in n·m and noLoadSpeed is in rad/s. a motor applies gear × power torque. for a simple torque–speed model with commands from -1 to 1, set gear to stall torque and the part's joint.damping to stall torque / no-load speed. for sliders, use force in newtons and speed in m/s instead. ctrlrange limits the actuator command; joint.limits limits mechanical travel.

editing robots

edit the part tree, joints, default poses, and root anchoring. configure named servos, motors, encoders, imus, cameras, drives, and arms; these names become the python subsystem keys. gallery robots can be copied into a project before editing.

an arm selects an ordered servo chain and a tool-tip part or marker. its kinematics come from the same robot geometry used by the simulator and viewer. move tip markers in the 3d editor to set the tool frame, then check it with arm.describe() in a running scene.

assets

the assets tab uploads, replaces, renames, downloads, and deletes project files. glb uploads generate a collision mesh; switch between visual and collision to inspect both. other files, including onnx policies, are stored without a 3d preview.

from botblocks import Asset, OnnxInference

cup = Asset('my-project/cup.glb')
policy = OnnxInference('my-project/policy.onnx', inp_len=61, pred_len=14)

the policy dimensions must match your model. see the python api for assets and inference.

Asset saves through POST /api/asset/{project}/{name} return {path, uploadedAge}. Keep the decimal generation string as returned. A GET returns the age of its bytes in X-BotBlocks-Age. Send it back via X-BotBlocks-Expected-Age on a raw-byte upload, or as expectedAge next to url on a JSON upload. A stale save returns HTTP 409. Reread the file before reconciling. Omit the age for an unconditional upload, or use "0" to expect a missing file. The check precedes the write and assumes same-file saves do not overlap.

sharing

project settings controls the project's public/private visibility and name. public projects can be read by other users; editing remains owner-only. private robot and asset loads require your signed-in credentials. use botblocks login for local scripts.

renaming a project, robot, or asset changes its path, so update scripts that load it. deleting a project removes its robots and assets too.