MCPcopy Create free account
hub / github.com/TeleHuman/TextOp / _compute_velocities

Method _compute_velocities

TextOpTracker/scripts/csv_to_npz.py:166–170  ·  view source on GitHub ↗

Computes the velocities of the motion.

(self)

Source from the content-addressed store, hash-verified

164 return index_0, index_1, blend
165
166 def _compute_velocities(self):
167 """Computes the velocities of the motion."""
168 self.motion_base_lin_vels = torch.gradient(self.motion_base_poss, spacing=self.output_dt, dim=0)[0]
169 self.motion_dof_vels = torch.gradient(self.motion_dof_poss, spacing=self.output_dt, dim=0)[0]
170 self.motion_base_ang_vels = self._so3_derivative(self.motion_base_rots, self.output_dt)
171
172 def _so3_derivative(self, rotations: torch.Tensor, dt: float) -> torch.Tensor:
173 """Computes the derivative of a sequence of SO3 rotations.

Callers 1

__init__Method · 0.95

Calls 1

_so3_derivativeMethod · 0.95

Tested by

no test coverage detected