Fix arm to column joint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 10:35:05 +09:00
co-authored by Claude Opus 5.5
parent be2b33e542
commit 82966ccc84
2 changed files with 12 additions and 4 deletions
+11 -3
View File
@@ -213,9 +213,17 @@ def torso():
def link2_in_controller(model):
"""link_2's frame in the controller frame: the fit's base is link_2 moved to joint_l_a1's origin (-0.104, 0, 0.069)."""
base = model[0]
return base @ hmat(np.eye(3), np.array([0.104, 0.0, -0.069]))
"""link_2's frame in the controller frame, the way the Lumi app joins the arm to the column: the arm's first link
(at joint 1 = 0) where the app's chain puts it, and link_2 behind it by the URDF's joint_l_a1 origin. The fitted
base frame carries a ~6 deg tilt that belongs to the arm's zero angles, not to the mount: placing the column from it
left the column leaning against the shoulder (owner, 2026-11-26)."""
m = mujoco.MjModel.from_xml_path(str(SIM / "lumi.xml"))
d = mujoco.MjData(m)
mujoco.mj_kinematics(m, d)
W = lambda b: hmat(d.xmat[m.body(b).id].reshape(3, 3), d.xpos[m.body(b).id])
a1_in_2 = np.linalg.inv(W("link_2")) @ W("link_a1") # joint_l_a1's origin, at zero angle
a1_in_ctrl = app_chain([0.0] * 6)[0]
return a1_in_ctrl @ np.linalg.inv(a1_in_2)
# ---------- writing ----------
+1 -1
View File
@@ -101,7 +101,7 @@
<camera name="torso_cam" pos="-0.257663 0.013721 -0.041359" xyaxes="0.999523 -0.02739 -0.014242 0.014152 -0.003442 0.999894" fovy="61.23"/>
<camera name="overview" pos="0.55 1.35 0.25" xyaxes="-0.92 0.39 0 -0.15 -0.36 0.92" fovy="50"/>
<camera name="top" pos="-0.10 0.58 0.55" xyaxes="1 0 0 0 1 0" fovy="70"/>
<body name="torso" pos="-0.07587 -0.019453 -0.053978" quat="-0.04149432 -0.00522993 0.05028068 0.99785907">
<body name="torso" pos="-0.0736 -0.000401 -0.0689" quat="-0.00000367 0.00000212 0 1">
<geom class="visual" mesh="app0_base_link_Lamp" pos="0 0 -0.6395" quat="1 0 0 0" material="app0_base_link_Lamp"/>
<geom class="visual" mesh="app1_base_link_Logo" pos="0 0 -0.6395" quat="1 0 0 0" material="app1_base_link_Logo"/>
<geom class="visual" mesh="app2_base_link_Matte" pos="0 0 -0.6395" quat="1 0 0 0" material="app2_base_link_Matte"/>