CSV anzeigen
This commit is contained in:
@@ -77,6 +77,7 @@ def load_marker_info(robot_path: str) -> Dict[int, dict]:
|
||||
if mid >= 0:
|
||||
out[mid] = {
|
||||
"link": link_name,
|
||||
"set": mk.get("set", ""), # z.B. "A0"
|
||||
"position_mm": mk.get("position"), # [x_mm, y_mm, z_mm] robot coords
|
||||
}
|
||||
return out
|
||||
@@ -158,6 +159,7 @@ def main() -> None:
|
||||
markers_out.append({
|
||||
"marker_id": int(mid),
|
||||
"link": marker_info.get(mid, {}).get("link", "unknown"),
|
||||
"set": marker_info.get(mid, {}).get("set", ""),
|
||||
"position_m": [float(v) for v in center],
|
||||
"position_mm": [float(v * 1000.0) for v in center],
|
||||
"normal": [float(v) for v in normal],
|
||||
@@ -195,7 +197,7 @@ def main() -> None:
|
||||
with open(csv_path, "w", newline="", encoding="utf-8") as fcsv:
|
||||
w = csv.writer(fcsv)
|
||||
# Marker-Tabelle
|
||||
w.writerow(["marker_id", "link", "num_cameras",
|
||||
w.writerow(["marker_id", "link", "set", "num_cameras",
|
||||
"x_mm", "y_mm", "z_mm",
|
||||
"nx", "ny", "nz",
|
||||
"model_x_mm", "model_y_mm", "model_z_mm",
|
||||
@@ -219,7 +221,7 @@ def main() -> None:
|
||||
row_model = ["", "", "", "", ""]
|
||||
|
||||
w.writerow([
|
||||
mid, link, m["num_cameras"],
|
||||
mid, link, m.get("set", ""), m["num_cameras"],
|
||||
round(px, 2), round(py, 2), round(pz, 2),
|
||||
round(mnx, 5), round(mny, 5), round(mnz, 5),
|
||||
*row_model,
|
||||
|
||||
Reference in New Issue
Block a user