MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / _ActuatorElement

Class _ActuatorElement

dm_control/mjcf/element.py:1186–1209  ·  view source on GitHub ↗

Specialized object representing an element.

Source from the content-addressed store, hash-verified

1184
1185
1186class _ActuatorElement(_ElementImpl):
1187 """Specialized object representing an <actuator> element."""
1188
1189 __slots__ = ()
1190
1191 def _children_to_xml(self, xml_element, prefix_root, debug_context=None,
1192 *,
1193 precision=constants.XML_DEFAULT_PRECISION,
1194 zero_threshold=0,
1195 filename_with_hash=True):
1196 debug_comments = {}
1197 for child in self.all_children():
1198 child_xml = child.to_xml(prefix_root, debug_context,
1199 precision=precision,
1200 zero_threshold=zero_threshold,
1201 filename_with_hash=filename_with_hash)
1202 if debugging.debug_mode() and debug_context:
1203 debug_comment = debug_context.register_element_for_debugging(child)
1204 debug_comments[child_xml] = debug_comment
1205 if len(child_xml) > 0: # pylint: disable=g-explicit-length-test
1206 child_xml.insert(0, copy.deepcopy(debug_comment))
1207 xml_element.append(child_xml)
1208 if debugging.debug_mode() and debug_context:
1209 xml_element.append(debug_comments[child_xml])
1210
1211
1212class RootElement(_ElementImpl):

Callers 1

_make_elementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…