rofunc.utils.robolab.formatter.mjcf_parser.schema#

A Python object representation of Mujoco’s MJCF schema.

The root schema is provided as a module-level constant schema.MUJOCO.

1.  Module Contents#

1.1.  Functions#

parse_schema

Parses the schema XML.

collect_namespaces

Constructs a set of namespaces in a given ElementSpec.

override_schema

Override the schema with a custom xml.

1.2.  Data#

ElementSpec

AttributeSpec

MUJOCO

FINDABLE_NAMESPACES

ATTACHMENT_FRAME

WORLD_ATTACHMENT_FRAME

1.3.  API#

rofunc.utils.robolab.formatter.mjcf_parser.schema.ElementSpec = None#
rofunc.utils.robolab.formatter.mjcf_parser.schema.AttributeSpec = None#
rofunc.utils.robolab.formatter.mjcf_parser.schema.parse_schema(schema_path)[source]#

Parses the schema XML.

Args:

schema_path: Path to the schema XML file.

Returns:

An ElementSpec for the root element in the schema.

rofunc.utils.robolab.formatter.mjcf_parser.schema.collect_namespaces(root_spec)[source]#

Constructs a set of namespaces in a given ElementSpec.

Args:

root_spec: An ElementSpec for the root element in the schema.

Returns:

A set of strings specifying the names of all the namespaces that are present in the spec.

rofunc.utils.robolab.formatter.mjcf_parser.schema.MUJOCO = None#
rofunc.utils.robolab.formatter.mjcf_parser.schema.FINDABLE_NAMESPACES = None#
rofunc.utils.robolab.formatter.mjcf_parser.schema.ATTACHMENT_FRAME = None#
rofunc.utils.robolab.formatter.mjcf_parser.schema.WORLD_ATTACHMENT_FRAME = None#
rofunc.utils.robolab.formatter.mjcf_parser.schema.override_schema(schema_xml_path)[source]#

Override the schema with a custom xml.

This method updates several global variables and care should be taken not to call it if the pre-update values have already been used.

Args:

schema_xml_path: Path to schema xml file.