(self, motion_ids, truncate_time=None)
| 473 | return (self._motion_num_frames[motion_ids] * self._sim_fps / self._motion_fps).ceil().int() |
| 474 | |
| 475 | def sample_time(self, motion_ids, truncate_time=None): |
| 476 | n = len(motion_ids) |
| 477 | phase = torch.rand(motion_ids.shape, device=self._device) |
| 478 | motion_len = self._motion_lengths[motion_ids] |
| 479 | if truncate_time is not None: |
| 480 | assert truncate_time >= 0.0 |
| 481 | motion_len -= truncate_time |
| 482 | |
| 483 | motion_time = phase * motion_len |
| 484 | return motion_time.to(self._device) |
| 485 | |
| 486 | def get_motion_length(self, motion_ids=None): |
| 487 | if motion_ids is None: |
no outgoing calls
no test coverage detected