botblocks
botblocks is a rapid-prototyping stack for robots. a python script defines the world and robot behavior; the same robot and loop can run in mujoco, a physics-free viewer, or on local hardware.
the stack is built around four small ideas:
- a
Robotis loaded from a project path such aspublic/so101ormenagerie/unitree_go2 - named subsystems such as
Servo,Arm,Camera, andDiffDriveare the robot api - providers connect those subsystems to mujoco, a kinematic viewer, or hardware
- the workspace combines the editor, 3d viewer, console, camera snaps, inspector, agent, and rl metrics
run a robot in physics
from botblocks import Box, MujocoEnv, Plane, Robot
import math
robot = Robot().load('public/so101')
cube = Box(pos=[0.28, -0.12, 0], size=0.03, color='#f8a')
@robot.loop
def wave(bot, env):
bot['shoulder'].target(0.35 * math.sin(env.time()))
MujocoEnv([Plane(), cube, robot]).start()MujocoEnv simulates gravity, contacts, sensors, and actuators. open the workspace inspector to drive joints, or ask the workspace agent to list and call the live subsystem tools.
change the backend
use ViewerEnv when you only need fast kinematic poses and camera previews:
ViewerEnv([Plane(), robot]).start()run the same loop against usb-connected feetech sts servos with:
LocalEnv([robot], providers=[ServoSTS]).start()the loop and subsystem calls stay the same. only the environment and providers change.
bring your own robot
the gallery contains the mujoco menagerie. projects can also import urdf, mjcf, xacro, glb, or autodesk fusion data. the project editor defines the part tree and assigns subsystems; arm kinematics are inferred from that geometry.