Background
Originally reported in #491: DHRobot.ikine_6s() undoes the tool transform on the wrong side. src/roboticstoolbox/robot/DHRobot.py:1892:
if tool is not None:
T = tool.inv() * T
Since forward kinematics composes as T_ee = T_base * T_chain * T_tool, undoing the tool transform to recover T_chain requires right-multiplying by tool.inv() (T = T * tool.inv()), not left-multiplying.
Confirmed still live (2026-08-25)
Reproduced directly: Puma560 with tool = SE3.Tz(0.1), solved via ikine_a (which uses ikine_6s internally, see Puma560.py). Roundtrip fkine(sol.q) does not match the original target pose -- the translation error is shaped exactly like the tool offset (off by ~0.1 in z, consistent with the tool transform being applied on the wrong side / inverted incorrectly).
Next steps
Change line 1892 to T = T * tool.inv(), matching the reporter's proposed fix. Add a regression test: solve ikine_6s/ikine_a for a model with a nonzero tool, assert fkine(sol.q) round-trips to the original target.
Originally reported: #491.
Background
Originally reported in #491:
DHRobot.ikine_6s()undoes the tool transform on the wrong side.src/roboticstoolbox/robot/DHRobot.py:1892:Since forward kinematics composes as
T_ee = T_base * T_chain * T_tool, undoing the tool transform to recoverT_chainrequires right-multiplying bytool.inv()(T = T * tool.inv()), not left-multiplying.Confirmed still live (2026-08-25)
Reproduced directly: Puma560 with
tool = SE3.Tz(0.1), solved viaikine_a(which usesikine_6sinternally, seePuma560.py). Roundtripfkine(sol.q)does not match the original target pose -- the translation error is shaped exactly like the tool offset (off by ~0.1 in z, consistent with the tool transform being applied on the wrong side / inverted incorrectly).Next steps
Change line 1892 to
T = T * tool.inv(), matching the reporter's proposed fix. Add a regression test: solveikine_6s/ikine_afor a model with a nonzerotool, assertfkine(sol.q)round-trips to the original target.Originally reported: #491.