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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

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)

View File

@@ -80,10 +80,10 @@
"defaultPosition": {
"x": 150,
"y": 30,
"z": -60,
"a": 270,
"b": 30,
"c": 70,
"z": -30,
"a": 90,
"b": 0,
"c": 0,
"e": 0
},
"recognized": {
@@ -320,25 +320,23 @@
"radius": 4,
"color": [0.95, 0.85, 0.20]
},
"model": [
{
"stlFile": "surfaces/Unterarm.stl",
"originOfModel": [0,-250,0],
"rotationOfModelDegree": [180, 0, -90],
"material": "defaultPlastic"
}
],
"markers":[
{"id":126, "position":[40,120,0], "normal":[1,0,0]},
{"id":228,"on":"Arm2", "position":[-24.75, -112, 24.75],"normal":[-1,0,1], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id": 122,"on":"Arm2", "position":[-24.75, -182, 24.75],"normal":[-1,0,1], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id": 123,"on":"Arm2", "position":[-35,-112,0], "normal":[-1,0,0], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id": 124,"on":"Arm2", "position":[-35,-219,0], "normal":[-1,0,0], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id":223,"on":"Arm2", "position":[-28.67,-112,-20.08], "normal":[-28.67,0,-20.08], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id": 125,"on":"Arm2", "position":[0,-182,-30], "normal":[0,0,-1], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id":218,"on":"Arm2", "position":[35,-112,0], "normal":[1,0,0], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id":219,"on":"Arm2", "position":[35,-219,0], "normal":[1,0,0], "relPosSource":["Fusion","Fusion","Fusion"]},
{"id": 126,"on":"Arm2", "position":[24.75, -182, 24.75], "normal":[1,0,1], "relPosSource":["Fusion","Fusion","Fusion"]}
{
"id": 17,
"name": "aruco_17",
"position": [0, -150, 0],
"normal": [-1, 0, 0],
"size": 25,
"spin": 0
},
{
"id": 18,
"name": "aruco_18",
"position": [0, -180, 0],
"normal": [1, 0, 0],
"size": 25,
"spin": 0
}
]
},
"Hand": {