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,10 +620,9 @@ for link_name, link_info in links_def.items():
base_quat = normal_to_quaternion(normal) base_quat = normal_to_quaternion(normal)
spin_quat = mathutils.Quaternion( spin_quat = mathutils.Quaternion(
mathutils.Vector((0, 0, 1)), mathutils.Vector(normal).normalized(),
math.radians(marker_spin_deg) math.radians(marker_spin_deg)
) )
marker_obj.rotation_quaternion = ( marker_obj.rotation_quaternion = (
base_quat @ spin_quat base_quat @ spin_quat
) )
@@ -639,7 +638,7 @@ for link_name, link_info in links_def.items():
# minimal vorziehen gegen Z-Fighting # minimal vorziehen gegen Z-Fighting
marker_obj.location = ( marker_obj.location = (
mathutils.Vector(marker_pos) mathutils.Vector(marker_pos)
+ normal_world * mm_to_m(0.05) + normal_world * mm_to_m(0.5)
) )
marker_mat = create_aruco_material( 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) marker_obj.data.materials.append(marker_mat)
else: else:
marker_obj.data.materials[0] = marker_mat 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) # BACKING PLATE (white PLA behind marker)

View File

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