Why does world frame get TF prefix?
Hello I am working with two UR5, I made them launch using <group ns="robot1">
and <group ns="robot2">
. I also gave a unique tfprefix to each robot within the group namespace tag i.e. `<param name="tfprefix" value="robot1tf" />and
<param name="tfprefix" value="robot2tf" />. After running the launch file what I notice in the
rqttftreeis that the "world frame" also gets a namespace i.e.
robot1tf/worldfollowed by
robot1tf/baselinkand all the other joints of robot1 ............... And then
robot2tf/worldand then
robot2tf/baselink` and all the other joints of robot2.
But what I want is world frame (without having any namespaces) connecting to robot1_tf/baselink
followed by all the joints of robot1............... and also to robot2_tf/baselink
followed by all the joints of robot2.............
How do I avoid the world frame to have any namespaces???
Asked by mkb_10062949 on 2019-10-05 11:38:55 UTC
Answers
Why does world frame get TF prefix?
Because there is a world
frame in the ur5_robot.urdf.xacro
file, which most likely gets loaded in both of your group
s.
See here. This is also a known issue with these .xacro
s: ros-industrial/universal_robot#284.
The world
frame is not an automatically added frame, it's something that either you, or one of the .xacro
s that you're loading needs to add.
In fact, it's not even a special frame: it's just a regular TF frame that happens to have a name you/we recognise as being something 'special'.
Asked by gvdhoorn on 2019-10-07 02:27:57 UTC
Comments
You can use static_transform_publisher to add a common world frame as the parent frame of the both tf_prefix/world frames. In each robot group of your launch file, add:
<node name="world2robot" pkg="tf" type="static_transform_publisher"
args="0 0 0 0 0 0 /world /<your tf_prefix>/world 100" />
You can change the node name and the transformation between /world and your robot's world frame as you like.
Asked by rbtcs1101 on 2021-09-01 08:10:43 UTC
Comments
Have you solved the problem? I am in the same predicament. Can you help me? Please tell me the solution
Asked by Angel-J on 2019-11-07 04:46:38 UTC
yes i did, basically what I did that I created two tf_broadcaster for each of the tf frame i.e for. robot1_tf/world and robot2_tf/world and then I mapped both of them to world frame. Have a look below
Asked by mkb_10062949 on 2019-11-07 09:23:56 UTC