manipulation.utils

manipulation.utils.ApplyDefaultVisualization(builder, meshcat)

Follows Drake’s ApplyDefaultVisualization, but disables LCM (drake visualizer) by default.

Parameters:
manipulation.utils.ConfigurePackageMap(package_map)

Add the manipulation module packages to the given PackageMap.

Parameters:

package_map (PackageMap)

manipulation.utils.ConfigureParser(parser)

Add the manipulation module packages to the given Parser.

Parameters:

parser (Parser)

manipulation.utils.DrakeVersionGreaterThan(minimum_date)

Check that the Drake version is at least minimum_date.

Parameters:

minimum_date (date)

manipulation.utils.FindDataResource(filename)

Returns the absolute path to the given filename relative to the book data directory; fetching it from a remote host if necessary.

Parameters:

filename (str)

manipulation.utils.FindResource(filename)

Returns the absolute path to the given filename relative to the manipulation module.

Parameters:

filename (str)

manipulation.utils.GetDrakeVersion()

Returns a string representing the Drake version, if available, or “source”.

Return type:

str

manipulation.utils.RenderDiagram(system, max_depth=None, filename=None)

Use pydot to render the GraphViz diagram of the given system.

Parameters:
  • system (System) – The Drake system (or diagram) to render.

  • max_depth (int, optional) – Sets a limit to the depth of nested diagrams to visualize. Use zero to render a diagram as a single system block. Defaults to 1.

  • filename (str, optional) – Save the diagram as an SVG file instead of displaying it. Defaults to None, which displays the diagram inline.

manipulation.utils.SystemHtml(system)

Generates an HTML string for system of the style seen in the Drake doxygen documentation.

Parameters:

system (System)

manipulation.utils.colorize_labels(image)

Given a label image, replace the integer labels with color values that display nicely in matplotlib.

Parameters:

image (Image𝓣PixelType𝓹kLabel16I𝓤)