I2RT YAM Inverse Kinematics (mink + daqp via YamIk)
Use bundled YamIk (pip install mink daqp mujoco, <1 ms/solve on Linux & macOS) parameterized by arm_type ("yam" or "yam_pro") and gripper_type ("linear_4310", "crank_4310", "linear_3507", "flexible_4310", etc.) via combine_arm_and_gripper_xml — never load standalone yam.xml when driving a gripper-equipped arm because bare yam.xml has nsite = 0:
- Dynamic
grasp_siteJaw-Closing Axis & Wrist Camera Extrinsics:- YAM has 3 parallel pitch axes (
J2 || J3 || J4) and a74.0 mmJ4-J5non-spherical wrist offset. +Z_siteis always the forward approach vector, while the parallel-jaw closing stroke is±X_siteini2rt >= v1.4.7(flange-aligned TCP) and±Y_sitein olderi2rt/mujoco_menagerieXMLs.YamIkintrospects the finger slide axis directly fromself.model(ik.closing_axis_siteandik.jaw_perp_axis_site)—never hardcode+X_siteor±Y_siteby hand.- For wrist-mounted D405 CAD priors, call
ik.wrist_cam_extrinsic()(which maps the rigid flange D405 mount into the loaded model's exactgrasp_siteframe) and verify sign with a single hover step. - Use
ik.make_grasp_pose(pos, approach_dir, jaw_perp_axis=...)(for arbitrary 3D approach vectors — top-down, angled, or side grasps) orik.make_topdown_grasp_pose(x, y, z, obj_yaw_rad=None, tilt_deg=0.0)(keeptilt_deg=0.0strictly vertical whenever reachable; only fall back totilt_deg=10–15insideexcept ValueErrorwhen0°IK is kinematically unreachable at extreme outer reach):- Pass
jaw_perp_axis=None(obj_yaw_rad=None) for symmetric objects to keep wrist rollJ6near neutral0. - For anisotropic objects where jaws must close perpendicular to a target
axis
a, passjaw_perp_axis=a(YamIkalignsik.jaw_perp_axis_site || ±asoik.closing_axis_sitecloses across the object, wrapped by±piaroundJ6 = 0soJ6stays inside[-2.094, 2.094] rad).
- Pass
- YAM has 3 parallel pitch axes (
- Reliable Seeding & Mandatory FK Verification (yam_ik.py):
- Instantiate
ik = YamIk(arm_type=..., gripper_type=...)once and callq_goal = ik.solve(T_target, q_seed=...). Q_DEFAULT_SEED = [0.0, 1.2, 1.2, -1.2, 0.0, 0.0]avoids stalling againstJ4 in [-1.693, 1.571] radon downward grasps; passq_seed=q_actual[:6]for local moves soPostureTaskregularizes smoothly around the current configuration.YamIk.solveenforcessolver="daqp",ConfigurationLimit, non-adjacent self-collision limits, frozen gripper DOFs (clamped to each model'sjnt_range), fresh re-seeding every call, and strict MuJoCo FK verification (pos_err <= 2 mm), raisingValueErrorbefore motion if any phase waypoint is unreachable.
- Instantiate


