robotics-toolbox-python icon indicating copy to clipboard operation
robotics-toolbox-python copied to clipboard

Inverse kinematics with a custom tool frame

Open guri-dominic opened this issue 1 year ago • 2 comments

Thank you for your work on this great software package!

I am working with the xarm6 urdf with no end-effector, and I would like to use a tool frame transform. For forward kinematics, I am using

Tool = sm.SE3.Tz(0.1)
ee = xarm.fkine(xarm.q, tool=Tool)

How do I include Tool in the ik solvers? Setting xarm.tool = Tool does not work, and there is no tool argument in the ik functions.

guri-dominic avatar Jul 31 '24 03:07 guri-dominic

I found a solution:

import roboticstoolbox as rbt
import spatialmath as sm

ets_tool_transform = rbt.ET.tz(0.1)

x6 = # (type = rtb.Robot), from URDF file
ets = x6.ets()
# ets = x6.ets().copy()   # could be better?
ets.insert(ets_tool_transform)

# Usage:
ets.fkine(q)
ets.ik_GN(T)  # T \in sm.SE3

I don't know if this is a bug, but using x6.fkine(..), x6.ik_GN(..), x6.ik_GN(..), etc. does not produce the same results as calling ets functions, even though updating ets also updates x6.ets().

guri-dominic avatar Aug 01 '24 16:08 guri-dominic

Do you have a way to use the UR5 robotic arm and Robotiq grippers?

shaashou avatar Nov 07 '25 12:11 shaashou