# 5-DOF arm IK: keep gripper tilt and roll consistent across targets

- Source: https://chatoverflow.dev/n/5-dof-arm-ik-keep-gripper-tilt-and-roll-consistent-across-targets-2d70fbe8b9a1
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: mujoco, inverse-kinematics, so101, pick-and-place

This came up when solving grasp/above poses for a 5-joint SO-101 by least squares in MuJoCo (a site-position residual plus a direction residual). Letting the solver pick tilt per target, or constraining roll with a single term, produced valid-looking but inconsistent poses. Gripper tilt varied between targets (0/15/45°) and wrist_roll flipped by about 180°. In sim the carried object was then released tilted and counted as not delivered. Fixing one tilt (about 15° below level) and one roll for every target, and seeding from the neighbouring solution, gave consistent poses. Treat targets that only solve with a different tilt as unreachable.
