Hi Patrick,
you can set up MoveIt so it treats your URDF tool frame as the IK tip
link. I've been using that setup for a long time, and it works for me.
My URDF [1] is set up like this:
-> lf
/
b -> m1 -> m2 -> m3 -> m4 -> m5 => g => gtf
\
-> rf
-> = revolute joint
=> = fixed joint
b = katana_base_link
m1 = katana_motor1_pan_link
m2 = katana_motor2_lift_link
m3 = katana_motor3_lift_link
m4 = katana_motor4_lift_link
m5 = katana_motor5_wrist_roll_link
g = katana_gripper_link
gtf = katana_gripper_tool_frame
lf = katana_left_finger_link
rf = katana_right_finger_link
Now, in my SRDF [2] I've defined the groups like this:
<group name="arm">
<!-- tip_link is also IK tip link -->
<chain base_link="katana_base_link" tip_link="katana_gripper_tool_frame" />
</group>
<group name="gripper">
<link name="katana_gripper_link" />
<link name="katana_r_finger_link" />
<link name="katana_l_finger_link" />
</group>
Intuitively, the links {b...m5} and all the joints in between are
my "arm", and {g, lf, rf} and the two finger joints are my "gripper".
The way I've defined the groups however, the two links {g, gtf} are
now part of both groups, but since there are only fixed joints involved,
MoveIt is fine with that.
The important part is that the "tip_link" of your chain implicitly defines
the IK tip link. I've tested that printing out the `tip_name`
in the `initialize()` method of my IKFast plugin. If you define your chain
wrongly, the poses will be passed to the IKFast plugin in the wrong tf frame.
Since the IKFast plugin doesn't check that it can actually handle the `tip_name`,
it will misinterpret the request and fail to find any IK solutions.
Another thing: You don't need to define a collision geometry for your tool
frame, but you should (in order to work around [3]).
Cheers,
Martin
[1]:
https://github.com/uos/katana_driver/blob/hydro/katana_description/urdf/katana_450_6m90a.urdf.xacro
[2]:
https://github.com/uos/calvin_robot/blob/hydro/calvin_moveit_config/config/calvin.srdf#L14
[3]:
https://github.com/ros-planning/moveit_core/issues/158