ReactWindowDataset: default min_motion_mps 0.03 -> 0.01 (30 mm/s -> 10 mm/s). Recipes + README + demo + CLI updated.
Browse files- examples/README.md +3 -3
- examples/demo_react_window.py +1 -1
- examples/react_window_dataset.py +3 -3
examples/README.md
CHANGED
|
@@ -50,7 +50,7 @@ ds = ReactWindowDataset(
|
|
| 50 |
which_sensors = "any",
|
| 51 |
# (4) — motion content (recommended for dynamics learning)
|
| 52 |
require_motion = True,
|
| 53 |
-
min_motion_mps = 0.
|
| 54 |
min_motion_fraction = 0.5,
|
| 55 |
which_sensors_must_move = "all_active",
|
| 56 |
)
|
|
@@ -90,8 +90,8 @@ pose_L = ep["sensor_left_pose"].numpy()
|
|
| 90 |
pose_R = ep["sensor_right_pose"].numpy()
|
| 91 |
speed_L = np.linalg.norm(np.diff(pose_L[:, :3], axis=0), axis=1) * 30 # m/s
|
| 92 |
speed_R = np.linalg.norm(np.diff(pose_R[:, :3], axis=0), axis=1) * 30
|
| 93 |
-
moving_L = np.concatenate([[speed_L[0]], speed_L]) >= 0.
|
| 94 |
-
moving_R = np.concatenate([[speed_R[0]], speed_R]) >= 0.
|
| 95 |
|
| 96 |
# Then when picking a window [t, t+L):
|
| 97 |
def good(t, L):
|
|
|
|
| 50 |
which_sensors = "any",
|
| 51 |
# (4) — motion content (recommended for dynamics learning)
|
| 52 |
require_motion = True,
|
| 53 |
+
min_motion_mps = 0.01, # 10 mm/s
|
| 54 |
min_motion_fraction = 0.5,
|
| 55 |
which_sensors_must_move = "all_active",
|
| 56 |
)
|
|
|
|
| 90 |
pose_R = ep["sensor_right_pose"].numpy()
|
| 91 |
speed_L = np.linalg.norm(np.diff(pose_L[:, :3], axis=0), axis=1) * 30 # m/s
|
| 92 |
speed_R = np.linalg.norm(np.diff(pose_R[:, :3], axis=0), axis=1) * 30
|
| 93 |
+
moving_L = np.concatenate([[speed_L[0]], speed_L]) >= 0.01 # 10 mm/s
|
| 94 |
+
moving_R = np.concatenate([[speed_R[0]], speed_R]) >= 0.01
|
| 95 |
|
| 96 |
# Then when picking a window [t, t+L):
|
| 97 |
def good(t, L):
|
examples/demo_react_window.py
CHANGED
|
@@ -138,7 +138,7 @@ def main():
|
|
| 138 |
skip_bad_frames = True,
|
| 139 |
respect_active_sensors = True,
|
| 140 |
require_motion = not args.no_motion_filter,
|
| 141 |
-
min_motion_mps = 0.
|
| 142 |
min_motion_fraction = 0.5,
|
| 143 |
which_sensors_must_move = "all_active",
|
| 144 |
)
|
|
|
|
| 138 |
skip_bad_frames = True,
|
| 139 |
respect_active_sensors = True,
|
| 140 |
require_motion = not args.no_motion_filter,
|
| 141 |
+
min_motion_mps = 0.01,
|
| 142 |
min_motion_fraction = 0.5,
|
| 143 |
which_sensors_must_move = "all_active",
|
| 144 |
)
|
examples/react_window_dataset.py
CHANGED
|
@@ -66,7 +66,7 @@ ds = ReactWindowDataset(
|
|
| 66 |
respect_active_sensors = True,
|
| 67 |
# motion filter (recommended on for dynamics learning)
|
| 68 |
require_motion = True,
|
| 69 |
-
min_motion_mps = 0.
|
| 70 |
min_motion_fraction = 0.5,
|
| 71 |
which_sensors_must_move = "all_active",
|
| 72 |
)
|
|
@@ -184,7 +184,7 @@ class ReactWindowDataset(Dataset):
|
|
| 184 |
skip_bad_frames: bool = True,
|
| 185 |
respect_active_sensors: bool = True,
|
| 186 |
require_motion: bool = False,
|
| 187 |
-
min_motion_mps: float = 0.
|
| 188 |
min_motion_fraction: float = 0.5,
|
| 189 |
which_sensors_must_move: str = "all_active",
|
| 190 |
fps: float = 30.0,
|
|
@@ -384,7 +384,7 @@ if __name__ == "__main__":
|
|
| 384 |
ap.add_argument("--contact_metric", default="mixed", choices=CONTACT_METRICS)
|
| 385 |
ap.add_argument("--which_sensors", default="any", choices=["any", "both", "left", "right"])
|
| 386 |
ap.add_argument("--require_motion", action="store_true")
|
| 387 |
-
ap.add_argument("--min_motion_mps", type=float, default=0.
|
| 388 |
ap.add_argument("--min_motion_fraction", type=float, default=0.5)
|
| 389 |
ap.add_argument("--which_sensors_must_move", default="all_active",
|
| 390 |
choices=["any", "all_active"])
|
|
|
|
| 66 |
respect_active_sensors = True,
|
| 67 |
# motion filter (recommended on for dynamics learning)
|
| 68 |
require_motion = True,
|
| 69 |
+
min_motion_mps = 0.01, # 10 mm/s — below typical slow manipulation
|
| 70 |
min_motion_fraction = 0.5,
|
| 71 |
which_sensors_must_move = "all_active",
|
| 72 |
)
|
|
|
|
| 184 |
skip_bad_frames: bool = True,
|
| 185 |
respect_active_sensors: bool = True,
|
| 186 |
require_motion: bool = False,
|
| 187 |
+
min_motion_mps: float = 0.01,
|
| 188 |
min_motion_fraction: float = 0.5,
|
| 189 |
which_sensors_must_move: str = "all_active",
|
| 190 |
fps: float = 30.0,
|
|
|
|
| 384 |
ap.add_argument("--contact_metric", default="mixed", choices=CONTACT_METRICS)
|
| 385 |
ap.add_argument("--which_sensors", default="any", choices=["any", "both", "left", "right"])
|
| 386 |
ap.add_argument("--require_motion", action="store_true")
|
| 387 |
+
ap.add_argument("--min_motion_mps", type=float, default=0.01)
|
| 388 |
ap.add_argument("--min_motion_fraction", type=float, default=0.5)
|
| 389 |
ap.add_argument("--which_sensors_must_move", default="all_active",
|
| 390 |
choices=["any", "all_active"])
|