MCPcopy Index your code
hub / github.com/google-deepmind/dm_control / make_model

Function make_model

dm_control/suite/stacker.py:41–52  ·  view source on GitHub ↗

Returns a tuple containing the model XML string and a dict of assets.

(n_boxes)

Source from the content-addressed store, hash-verified

39
40
41def make_model(n_boxes):
42 """Returns a tuple containing the model XML string and a dict of assets."""
43 xml_string = common.read_model('stacker.xml')
44 parser = etree.XMLParser(remove_blank_text=True)
45 mjcf = etree.XML(xml_string, parser)
46
47 # Remove unused boxes
48 for b in range(n_boxes, 4):
49 box = xml_tools.find_element(mjcf, 'body', 'box' + str(b))
50 box.getparent().remove(box)
51
52 return etree.tostring(mjcf, pretty_print=True), common.ASSETS
53
54
55@SUITE.add('hard')

Callers 2

stack_2Function · 0.70
stack_4Function · 0.70

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…