chore(metadata): update beads and sisyphus planning artifacts

This commit is contained in:
2026-02-07 04:16:41 +00:00
parent ddb7054f96
commit cdc4f9eec4
28 changed files with 633 additions and 220 deletions
+20 -6
View File
@@ -1,8 +1,22 @@
import numpy as np
from loguru import logger
from jaxtyping import Float
from typing import TYPE_CHECKING
# Type aliases for shape-aware annotations
if TYPE_CHECKING:
Vec3 = Float[np.ndarray, "3"]
Mat33 = Float[np.ndarray, "3 3"]
Mat44 = Float[np.ndarray, "4 4"]
CornersNC = Float[np.ndarray, "N 3"]
else:
Vec3 = np.ndarray
Mat33 = np.ndarray
Mat44 = np.ndarray
CornersNC = np.ndarray
def compute_face_normal(corners: np.ndarray) -> np.ndarray:
def compute_face_normal(corners: CornersNC) -> Vec3:
"""
Compute the normal vector of a face defined by its corners.
Assumes corners are in order (e.g., clockwise or counter-clockwise).
@@ -37,7 +51,7 @@ def compute_face_normal(corners: np.ndarray) -> np.ndarray:
return (normal / norm).astype(np.float64)
def rotation_align_vectors(from_vec: np.ndarray, to_vec: np.ndarray) -> np.ndarray:
def rotation_align_vectors(from_vec: Vec3, to_vec: Vec3) -> Mat33:
"""
Compute the 3x3 rotation matrix that aligns from_vec to to_vec.
@@ -100,7 +114,7 @@ def rotation_align_vectors(from_vec: np.ndarray, to_vec: np.ndarray) -> np.ndarr
return R.astype(np.float64)
def apply_alignment_to_pose(T: np.ndarray, R_align: np.ndarray) -> np.ndarray:
def apply_alignment_to_pose(T: Mat44, R_align: Mat33) -> Mat44:
"""
Apply an alignment rotation to a 4x4 pose matrix.
The alignment is applied in the global frame (pre-multiplication of rotation).
@@ -127,7 +141,7 @@ def get_face_normal_from_geometry(
face_name: str,
marker_geometry: dict[int, np.ndarray],
face_marker_map: dict[str, list[int]] | None = None,
) -> np.ndarray | None:
) -> Vec3 | None:
"""
Compute the average normal vector for a face based on available marker geometry.
@@ -171,9 +185,9 @@ def get_face_normal_from_geometry(
def detect_ground_face(
visible_marker_ids: set[int],
marker_geometry: dict[int, np.ndarray],
camera_up_vector: np.ndarray = np.array([0, -1, 0]),
camera_up_vector: Vec3 = np.array([0, -1, 0]),
face_marker_map: dict[str, list[int]] | None = None,
) -> tuple[str, np.ndarray] | None:
) -> tuple[str, Vec3] | None:
"""
Detect which face of the object is most likely the ground face.
The ground face is the one whose normal is most aligned with the camera's up vector.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
+3 -3
View File
@@ -234,9 +234,9 @@ class PoseAccumulator:
stats = {
"n_total": n_total,
"n_inliers": n_inliers,
"median_reproj_error": float(np.median(inlier_errors))
if inlier_errors
else 0.0,
"median_reproj_error": (
float(np.median(inlier_errors)) if inlier_errors else 0.0
),
}
return T_mean, stats
+5 -1
View File
@@ -182,7 +182,11 @@ class SVOReader:
return None
depth_mat = sl.Mat()
cam.retrieve_measure(depth_mat, sl.MEASURE.DEPTH)
return depth_mat.get_data().copy()
depth_data = depth_mat.get_data().copy()
# ZED SDK defaults to MILLIMETER units if not specified in InitParameters.
# We convert to meters to match the extrinsics coordinate system.
return depth_data / 1000.0
def _retrieve_confidence(self, cam: sl.Camera) -> np.ndarray | None:
if not self.enable_depth: