Attaches another entity at a position offset from the attachment site. Args: entity: The `Entity` to attach. offset: A length 3 array-like object representing the XYZ offset. attach_site: (optional) The site to which to attach the entity's model. If not set, defaults t
(self, entity, offset, attach_site=None)
| 84 | self.mjcf_model.statistic.center = (0., 0., 0.) |
| 85 | |
| 86 | def attach_offset(self, entity, offset, attach_site=None): |
| 87 | """Attaches another entity at a position offset from the attachment site. |
| 88 | |
| 89 | Args: |
| 90 | entity: The `Entity` to attach. |
| 91 | offset: A length 3 array-like object representing the XYZ offset. |
| 92 | attach_site: (optional) The site to which to attach the entity's model. |
| 93 | If not set, defaults to self.attachment_site. |
| 94 | Returns: |
| 95 | The frame of the attached model. |
| 96 | """ |
| 97 | frame = self.attach(entity, attach_site=attach_site) |
| 98 | frame.pos = offset |
| 99 | return frame |