drake

Dump ModelDirectives to .dmd.yaml file from pydrake


I have a ModelDirectives object, and I want to write it to a .dmd.yaml file so that I can later load it back into Drake.

How can I do this from pydrake?

I found SaveYamlFile, but I can't import it from pydrake. Is that the correct function that is simply missing bindings, or is there an alternative way?


Solution

  • Try `pydrake.common.yaml.yaml_dump_typed`.