arbeiten am Arm2

This commit is contained in:
chk
2026-05-28 12:35:36 +02:00
parent 3c81fa2485
commit c535458b2f
3 changed files with 29 additions and 26 deletions

View File

@@ -620,15 +620,14 @@ for link_name, link_info in links_def.items():
base_quat = normal_to_quaternion(normal)
spin_quat = mathutils.Quaternion(
mathutils.Vector((0, 0, 1)),
mathutils.Vector(normal).normalized(),
math.radians(marker_spin_deg)
)
marker_obj.rotation_quaternion = (
base_quat @ spin_quat
)
# Marker-Normale im Welt-/Linkraum
normal_world = (
marker_obj.matrix_world.to_quaternion()
@@ -639,7 +638,7 @@ for link_name, link_info in links_def.items():
# minimal vorziehen gegen Z-Fighting
marker_obj.location = (
mathutils.Vector(marker_pos)
+ normal_world * mm_to_m(0.05)
+ normal_world * mm_to_m(0.5)
)
marker_mat = create_aruco_material(
@@ -651,6 +650,12 @@ for link_name, link_info in links_def.items():
marker_obj.data.materials.append(marker_mat)
else:
marker_obj.data.materials[0] = marker_mat
print("Marker:", marker_name)
print("WORLD POS:", marker_obj.matrix_world.translation)
print("LOCAL POS:", marker_obj.location)
# --------------------------------------------------------
# --------------------------------------------------------
# BACKING PLATE (white PLA behind marker)