rofunc.utils.robolab.formatter.mjcf_parser.skin#

Utilities for parsing and writing MuJoCo skin files.

The file format is described at http://mujoco.org/book/XMLreference.html#skin.

1.  Module Contents#

1.1.  Functions#

parse

Parses the contents of a MuJoCo skin file.

serialize

Serializes a Skin named tuple into the contents of a MuJoCo skin file.

1.2.  Data#

MAX_BODY_NAME_LENGTH

Skin

Bone

1.3.  API#

rofunc.utils.robolab.formatter.mjcf_parser.skin.MAX_BODY_NAME_LENGTH = 40#
rofunc.utils.robolab.formatter.mjcf_parser.skin.Skin = None#
rofunc.utils.robolab.formatter.mjcf_parser.skin.Bone = None#
rofunc.utils.robolab.formatter.mjcf_parser.skin.parse(contents, body_getter)[source]#

Parses the contents of a MuJoCo skin file.

Args:

contents: a bytes-like object containing the contents of a skin file. body_getter: a callable that takes a string and returns the mjcf.Element

instance of a MuJoCo body of the specified name.

Returns:

A Skin named tuple.

rofunc.utils.robolab.formatter.mjcf_parser.skin.serialize(skin)[source]#

Serializes a Skin named tuple into the contents of a MuJoCo skin file.

Args:

skin: a Skin named tuple.

Returns:

A bytes object representing the content of a MuJoCo skin file.