blueprints package#

The Blueprints library interfaces the Mujoco (Multi Joints Contact) physics simulation. To construct a World you can combine many Things via attachment, while blueprints translates your construction to xml in the background. Things are differentiated in concrete Things, which are the onse that you can use directly and abstract classes which implement a utilities for multiple concrete Things. Abstract Things are mostly located in thing and should not be instantiated directly. Never the less they contain documentation relevant for many concrete Things, so you might want to have a look at it. Concrete Things are:

Concrete Things#

Caches and Assets are handeled in the background, so you don’t have to create them manually and can most often treat their occurences in ordinary mujoco as another attachment.

Some helpful Things that are not part of the mujoco XML scheme but that are directly useable by the user are:

Modificators#

Blueprints design is centered around the idea to reduce redundancy, that would be encountered in XML editing. Once you have created some Things you can easily produce on the fly modified copies through many helpful utility methods. We list some of the most important ones.

The copy method in particular can be used to perform all sorts of modifications by passing the desired changes as keyword arguments.

Kinematic Tree#

To modify the kinematic hierarchy there are some methods and attributes to have a look at:

  • parent returns the parent of a Thing. If the Thing has no parent it returns None.

  • root returns the root of a Things kinematic hierarchy (which might be itself).

  • path returns a list containing the path from a Thing to its root.

  • attach attaches copies of any number of Things.

  • detach reverses the effect of attach.

  • all returns a View of all children.

  • NodeThing.<children_type> returns a View of the given children type.

Alternatively kinematic trees can also be constructed by passing children as additional arguments to the __init__ of all concrete NodeThings.

Types#

To enable typesafty restrictions via type hints, the inheritance hierarchy of Things is mirrored in types.

Inheritance diagram of blueprints.mirrortypes

Subpackages#

Submodules#