MCPcopy Create free account
hub / github.com/BoosterRobotics/booster_train / __init__

Method __init__

scripts/csv_to_npz.py:85–103  ·  view source on GitHub ↗
(
        self,
        motion_file: str,
        input_fps: int,
        output_fps: int,
        device: torch.device,
        frame_range: tuple[int, int] | None,
    )

Source from the content-addressed store, hash-verified

83
84class MotionLoader:
85 def __init__(
86 self,
87 motion_file: str,
88 input_fps: int,
89 output_fps: int,
90 device: torch.device,
91 frame_range: tuple[int, int] | None,
92 ):
93 self.motion_file = motion_file
94 self.input_fps = input_fps
95 self.output_fps = output_fps
96 self.input_dt = 1.0 / self.input_fps
97 self.output_dt = 1.0 / self.output_fps
98 self.current_idx = 0
99 self.device = device
100 self.frame_range = frame_range
101 self._load_motion()
102 self._interpolate_motion()
103 self._compute_velocities()
104
105 def _load_motion(self):
106 """Loads the motion from the csv file."""

Callers

nothing calls this directly

Calls 3

_load_motionMethod · 0.95
_interpolate_motionMethod · 0.95
_compute_velocitiesMethod · 0.95

Tested by

no test coverage detected