Initializes this arena. The function takes two arguments through args, kwargs: name: A string, the name of this arena. If `None`, use the model name defined in the MJCF file. xml_path: An optional path to an XML file that will override the default composer arena MJCF
(self, *args, **kwargs)
| 34 | # around a signature-mismatch error from pytype in derived classes. |
| 35 | |
| 36 | def _build(self, *args, **kwargs) -> None: |
| 37 | """Initializes this arena. |
| 38 | |
| 39 | The function takes two arguments through args, kwargs: |
| 40 | name: A string, the name of this arena. If `None`, use the model name |
| 41 | defined in the MJCF file. |
| 42 | xml_path: An optional path to an XML file that will override the default |
| 43 | composer arena MJCF. |
| 44 | |
| 45 | Args: |
| 46 | *args: See above. |
| 47 | **kwargs: See above. |
| 48 | """ |
| 49 | if args: |
| 50 | name = args[0] |
| 51 | else: |
| 52 | name = kwargs.get('name', None) |
| 53 | if len(args) > 1: |
| 54 | xml_path = args[1] |
| 55 | else: |
| 56 | xml_path = kwargs.get('xml_path', None) |
| 57 | |
| 58 | self._mjcf_root = mjcf.from_path(xml_path or _ARENA_XML_PATH) |
| 59 | if name: |
| 60 | self._mjcf_root.model = name |
| 61 | |
| 62 | def add_free_entity(self, entity): |
| 63 | """Includes an entity in the arena as a free-moving body.""" |