ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This shouldn't be so difficult and wouldn't even require writing a custom TF broadcaster.
If you have a custom frame that is relative to tool0_controller
, you have two options:
if it's a static frame (ie: does not include any dynamic rotation or translation): use static_transform_publisher
. Something like this would add the frame you show in your edit:
rosrun tf2_ros static_transform_publisher 0 2.0 0 0 0 0 1 tool0_controller drillingPin
Two things to note:
2.0
you have there results in a Y-translation of 2 metres relative to tool0_controller
. Most likely not what you intended.add drillingPin
as a link
to your composite xacro/urdf (the one that combines the UR xacro with your end-effector) and use a fixed
type joint
to link the two together. The robot_state_publisher
will then do all the hard work for you.
Which of the two options you choose doesn't really matter I believe. The static_transform_publisher
would need to run all the time, so would result in an additional node, but seeing as it's a static TF frame, won't result in too much overhead.
I tried to add a new frame to tool0_controller and this is the code I am using but the problem here is that: the pose published by drillingPin frame is relative to the tool0_controller not to the base.
re: not relative to base
: well, no. You specify it as a transform relative to tool0_controller
, so it's exactly as you specified.
That doesn't mean you can't query TF for the transform between base
and drillingPin
though.