Returns the target position in the frame of the head.
(self)
| 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.""" |
no outgoing calls
no test coverage detected