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

Method attach_offset

dm_control/manipulation/shared/arenas.py:86–99  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 4

__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80

Calls 1

attachMethod · 0.45

Tested by

no test coverage detected