Skip to main content

codecov sphinx

brom_drake-py

Brom is a helper library for the Drake robotics simulation and verification library. Its goal is to simplify common debugging and testing activities in Drake (for example, logging the outputs of systems in your block diagrams).

Some of Brom's features:

Feature Code Results
The Diagram Watcher (the DiagramWatcher will log + plot all output ports of your Diagram automatically) add_watcher_and_build() Creation of Brom Directory
The Drake-ify feature (converts your URDF file into a form that Drake can consume) drakeify_my_urdf() Drakeify Example
Productions (partially complete robot scenarios to test your algorithms) (See Examples Directory or the Docs) Kinematic Motion Planning Example
Puppeteer (Move free bodies in drake with a RigidTransform input) Puppetmaker class's methods A cube being moved using the Puppetmaker's methods.
Video recording (record MP4s of any production, or your own diagram, from one or more cameras) production.add_cameras() then production.save_videos(grid=True) Three cameras recording a UR10e reaching toward a shelf, combined into one grid video.

To learn more, look through our documentation here.

Output directories and parallel runs

Set BROM_DIR to choose the output root without changing the working directory. An unset or empty value defaults to ./brom. Defaults are resolved when watchers, productions, or converters are created, rather than when Brom is imported:

import os
os.environ["BROM_DIR"] = "/tmp/brom/case-1"

Each DiagramWatcher creates a fresh directory under <BROM_DIR>/watcher/, named <timestamp>-<pid>-<unique suffix>. It contains activity_summary.log, plots/, and raw_data/ (when saved). Existing output is never deleted on startup. The actual run directory is available as watcher.options.base_directory; watcher.plot_dir and watcher.raw_data_dir point inside it. There is no shared latest link, and old runs must be removed explicitly when they are no longer in use.

To choose a watcher-specific parent or configure plotting and raw data, pass DiagramWatcherOptions:

from pathlib import Path
from brom_drake.watchers.diagram_watcher import DiagramWatcherOptions

options = DiagramWatcherOptions(base_directory=Path("/tmp/my-watchers"))
diagram, context = production.easy_cast_and_build(
    planning_algorithm, with_watcher=True, watcher_options=options
)

The other production entry points (build_production, add_cast_and_build) also accept watcher_options. add_watcher and add_watcher_and_build accept options=options or watcher_dir=.... Explicit options override the convenience plotting arguments; an explicit watcher_dir overrides the options' parent. The options object is not modified.

Models, FSM logs, production reports, and videos also honor BROM_DIR. Production reports have unique filenames, but model, FSM, and video filenames can still be shared. Use a different BROM_DIR per process/case to isolate all output types; an explicit output path takes precedence over BROM_DIR. The legacy DEFAULT_*_DIR constants remain fixed fallback paths; use brom_drake.directories.get_brom_dir() to read the current environment.

Installation

brom_drake is available on PyPI and installable with pip:

pip install brom-drake

Video recording install

To record videos of your simulations (see add_cameras() in the docs), install the optional video extra:

pip install "brom-drake[video]"

On Linux machines without a display (CI, containers), Drake's renderer also needs the EGL system libraries:

sudo apt-get install libegl1 libegl-mesa0 libgl1-mesa-dri libopengl0

ROS 2-capable install

If you use ROS 2 package URIs (for example, package://...) and want brom_drake to resolve package share directories via ament_index_python, install the optional ROS 2 extra:

pip install "brom-drake[ros2]"

In most ROS 2 workflows, make sure your ROS 2 environment is sourced before running your scripts so package discovery works as expected.

Developer install

You can also install the package during local development by cloning the repository and running the following commands from inside it:

pip install -r requirements.txt
pip install -e .

Recurring documentation proposals

.github/workflows/documentation-one-file.md defines a GitHub Agentic Workflow that runs every weekday at 09:00 UTC or via manual dispatch. It proposes at most one draft PR improving one existing Sphinx page or a Python file's rendered docstrings, and skips proposals while a [docs-one-file] PR is open. Each proposal must preserve executable Python structure and build Sphinx HTML without adding warnings relative to the run's baseline.

Before running it, configure the repository's COPILOT_GITHUB_TOKEN Actions secret with a Copilot-enabled token as described in the engine authentication guide, and enable Allow GitHub Actions to create and approve pull requests in Settings > Actions > General. The workflow uses PYTHON_VERSION if set, otherwise Python 3.14; the selected version must meet setup.py's requirements.

After editing the workflow Markdown, regenerate and commit its .lock.yml:

gh extension install github/gh-aw
gh aw compile documentation-one-file

The checked-in lock file was generated with gh-aw v1.0.1. Review regenerated files when upgrading the compiler; do not edit the lock file by hand. Merging a documentation proposal does not deploy the public site: deployment remains tag-triggered or manually dispatched through the existing Sphinx workflow.

Citation

Feel free to cite this project if it helped with your work!

@misc{bromDrake2024,
  author = "Kwesi Rutledge and the Wrench Robotics Team",
  title = "Brom: A Helper Library for the Drake Toolbox",
  year = 2024,
}

FAQs

Why the name Brom?

Brom the storyteller is a character from the Inheritance series by Christopher Paolini. He is a wise mentor that helps Eragon (the protagonist) master dragons. ;)

Where are the release notes?

You can follow the development of Brom by:

  • Following the Release Notes on Substack ([Substack])
  • Studying the Pull Requests (available above in the Pull Requests tab of GitHub), or

How can I support this project?

Feel free to create an issue/send the Wrench Robotics team a message if you're interested in helping out!

Some other work in the open-source Drake community:

  • kinova_drake - A Drake-based library that builds a simple version of the manipulation station for the Kinova Gen3 robot arm. Also works with the hardware.
  • airo-drake - A python package meant to simplify working with Drake and the airo-mono repository from the AI and Robotics Lab at Ghent University.

To-Dos

  • Figure out how to tell if two systems are connected in Drake.
  • Add more readme explanations of what is going on under the hood.
  • Create a method that makes each material in a URDF file have unique names if they have specific values
  • Allow for the user to give "Drake-unfriendly" URDFs to ShowMeThisModel production

Metadata

Release files for brom-drake 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brom-drake 1.1.3
File Size Uploaded Provenance Actions
brom_drake-1.1.3.tar.gz 31.5 MB With provenance Details for brom_drake-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brom-drake 1.1.3
File Interpreter ABI Platform Actions
brom_drake-1.1.3-py3-none-any.whl Python 3 none any Details for brom_drake-1.1.3-py3-none-any.whl

Total release size: 63.1 MB

Release files / brom_drake-1.1.3.tar.gz

Download URL brom_drake-1.1.3.tar.gz
Size 31.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c16c859edec0c87c66d36a202cabca323796ee52efc38b52555064ae66f6e18a
BLAKE2b-256 checksum
How to use checksums
0e94b7ddefc0e9a1a5c068ced865ebbb009a1ea95c1c64b1e3c82e7eca4396ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / brom_drake-1.1.3-py3-none-any.whl

Download URL brom_drake-1.1.3-py3-none-any.whl
Size 31.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2cb9221c191c30569cfed3e3482963eb94d3a780c0801bc67d02d9b7c4405a20
BLAKE2b-256 checksum
How to use checksums
470dad260cf22b2b86e2ed60e51f783642090e98efacd6bf2f6829caa9517d4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for brom-drake 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brom_drake-1.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page