Ask Your Question
0

Why does world frame get TF prefix?

asked 2019-10-05 11:38:55 -0600

mkb_10062949 gravatar image

Hello I am working with two UR5, I made them launch using <group ns="robot1"> and <group ns="robot2">. I also gave a unique tf_prefix to each robot within the group namespace tag i.e. <param name="tf_prefix" value="robot1_tf" /> and <param name="tf_prefix" value="robot2_tf" />. After running the launch file what I notice in the rqt_tf_tree is that the "world frame" also gets a namespace i.e. robot1_tf/world followed by robot1_tf/baselink and all the other joints of robot1 ............... And then robot2_tf/world and then robot2_tf/base_link 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???

edit retag flag offensive close merge delete

Comments

Have you solved the problem? I am in the same predicament. Can you help me? Please tell me the solution

Angel-J gravatar imageAngel-J ( 2019-11-07 03:46:38 -0600 )edit

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

#!/usr/bin/env python  
import roslib
roslib.load_manifest('ur5_notebook')

    import rospy
    import tf

    if __name__ == '__main__':
        rospy.init_node('broadcaster_fixed')
        br = tf.TransformBroadcaster()
        rate = rospy.Rate(10.0)
        while not rospy.is_shutdown():
            br.sendTransform((0.0, 2.0, 0.0),
                             (0.0, 0.0, 0.0, 1.0),
                             rospy.Time.now(),
                             "robot1_tf/world",
                             "world")
            rate.sleep()
mkb_10062949 gravatar imagemkb_10062949 ( 2019-11-07 08:23:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-07 02:27:57 -0600

gvdhoorn gravatar image

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 groups.

See here. This is also a known issue with these .xacros: ros-industrial/universal_robot#284.

The world frame is not an automatically added frame, it's something that either you, or one of the .xacros 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'.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-10-05 11:38:55 -0600

Seen: 126 times

Last updated: Oct 07