Skip to main content

A set of convenient logging and testing tools for the Drake robotics toolbox.

Project description

codecov

brom_drake-py

Brom is a helper library for the Drake robotics simulation and verification library. Its goal is to simplify logging and robustness characterization of Drake simulations.

Usage

DiagramWatcher

It is recommended that you use the convenience function add_watcher_and_build to add a DiagramWatcher to your diagram.

# Drake imports
from pydrake.all import (
    DiagramBuilder, Simulator,
)
# All your other imports

from brom_drake.all import add_watcher_and_build

# Create a diagram builder
builder = DiagramBuilder()

# Add and connect your systems...

# Add the watcher and build the diagram
dw, diagram, diagram_context = add_watcher_and_build(builder)

# Set up simulation
simulator = Simulator(diagram, diagram_context)
simulator.set_target_realtime_rate(1.0)
simulator.set_publish_every_time_step(False)

# Run simulation
simulator.Initialize()
simulator.AdvanceTo(15.0)

What will happen whenever you use this function is that:

  • The DiagramWatcher will be created.
    • It will search through all systems that the DiagramBuilder has added.
    • For each system, the watcher will add a VectorLogger to each output port that is a kVectorValued port.
    • The DiagramWatcher will connect all loggers to all targeted ports (in this case, we will target all available output ports).
  • After the simulation is run and the script completes, the watcher will save all of the data traces for each port in plots. These plots will be in a new .brom directory.

Installation

Local install:

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

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. ;)

Related Work

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.

To-Dos

  • Figure out how to tell if two systems are connected in Drake.
  • Demonstrate how to create a simple Vector logger for the tutorial's diagram.
    • Determine if we can use DiagramTarget objects to do everything (assuming that they are all valid). i.e., with the name and the port # can we do waht we want?
  • Add more examples
  • Add Code coverage
  • Add support for abstract output ports?
  • Add more readme explanations of what is going on under the hood.
  • Add support for giving DiagramTarget (or simpler objects) to the convenience functions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brom_drake-0.0.1.post3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

brom_drake-0.0.1.post3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file brom_drake-0.0.1.post3.tar.gz.

File metadata

  • Download URL: brom_drake-0.0.1.post3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for brom_drake-0.0.1.post3.tar.gz
Algorithm Hash digest
SHA256 5ca0176a03df3f59eb61da54cd09f31fa989a7a7bc8e7119fcd1b806452cd567
MD5 bc0965ed55fe3e6b84c83c5f3fe52125
BLAKE2b-256 7ce75cb48752a28191a7429e6ac565ecb8521660386ca046b69be8d0e226f13f

See more details on using hashes here.

File details

Details for the file brom_drake-0.0.1.post3-py3-none-any.whl.

File metadata

File hashes

Hashes for brom_drake-0.0.1.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 8b102540a266c822d6ad26c46ca5bd7ef93feaf72ccca2de8ca0393d88ce50a2
MD5 880c6d707ebc9da97450f45d1a829efb
BLAKE2b-256 8b6bcba7e3699b0ee9d00c40aeb7f30759e3761b881a289674075ec6a3708d69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page