Build Moonbot robot assemblies, URDF descriptions, and level-1 runtime parameters from reusable robot modules.
From a checkout:
pip install -e .The package depends on jinja2 and the local motion-stack packages. In the
full motion-stack workspace, install it with the workspace's normal package
manager so those dependencies are available.
Assemblies combine modules such as Hero wheels, Hero arms, and Gustavo arms. For example, generate a cargo robot URDF in Python:
from moonbot_builder.assemblies import cargo_v2
from moonbot_builder.modules.hero import MhCargoV2, MhArmV3, MhWheelV2
from moonbot_builder.urdf.base import wrap_in_robot
urdf_fragment = cargo_v2.raw_urdf(
left_wheel=MhWheelV2(1),
right_wheel=MhWheelV2(2),
left_arm=MhArmV3(3),
right_arm=MhArmV3(4),
cargo_box=MhCargoV2(1),
)
urdf = wrap_in_robot(urdf_fragment)
with open("moonbot.urdf", "w") as f:
f.write(urdf)Available assembly layouts include minimal, chain, vehicle, cargo,
cargo_v2, dragon, tricycle, and triple_dragon. Inspect
moonbot_builder/assemblies/ for their function signatures and available
module combinations.
For a quick example, edit the selected assembly in
moonbot_builder/assemblies/output.py and run:
python -m moonbot_builder.assemblies.output > moonbot.urdfThe generated URDF references meshes supplied by the corresponding asset packages. Those packages must be installed or sourced in the workspace before loading the URDF in a simulator or visualization tool.
moonbot_builder.launch creates an assembly and starts its runtime nodes:
python -m moonbot_builder.launchUseful options are:
python -m moonbot_builder.launch --rerun
python -m moonbot_builder.launch --fox
python -m moonbot_builder.launch --sim
python -m moonbot_builder.launch --backend rclpy--rerun and --fox compile the first module's URDF and pass it to the
corresponding visualizer. --sim uses the Newton simulator transport, which
must be started separately. The default backend is pyzeros.
modules/defines robot parts and their runtime parameters.assemblies/places modules together and compiles complete robots.urdf/contains URDF helpers and asset-specific URDF builders.launch.pystarts the generated level-1 nodes or visualization tools.