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

Method target_in_head_frame

dm_control/suite/dog.py:225–231  ·  view source on GitHub ↗

Returns the target position in the frame of the head.

(self)

Source from the content-addressed store, hash-verified

223 head_to_ball_vel.dot(head_frame)))
224
225 def target_in_head_frame(self):
226 """Returns the target position in the frame of the head."""
227 head_frame = self.named.data.site_xmat['head'].reshape(3, 3)
228 head_pos = self.named.data.site_xpos['head']
229 target_pos = self.named.data.geom_xpos['target']
230 head_to_target = target_pos - head_pos
231 return head_to_target.dot(head_frame)
232
233 def ball_to_mouth_distance(self):
234 """Returns the distance from the ball to the mouth."""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected