arbeiten am Arm2
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user