ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Therefore i need to be able to get the realtime position of the TCP link of the robot. I have been looking at TF2, [..]

this would indeed seem like a task you could use TF for.

i am not sure if i can use it this purpose as it seems it only publishes the transform matrix.

I'm not sure what you mean by this, as "the transform matrix" would seem to be exactly what you'd need (unless you are wondering where the rotation part has gone, but that is included as well).

TF will give you the transform between any two frames in your TF tree. For your case, that would probably be some base frame (perhaps even the base frame in the UR10's urdf) and some tool frame (or the default tool0 frame).

Asking TF for that transform will immediately tell you where the tool frame is wrt the base frame.

That transform is the pose of the TCP (relative to the base you've chosen of course).

If you'd like to track this over time, then perform periodic lookups of that same transform.

A rather arbitrary -- but illustrative -- example of this may be found here: floweisshardt/atf/atf_metrics/src/atf_metrics/calculate_path_length.py.