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

Revision history [back]

The key here is understanding that with /tf the geometry of your system must be specified as a tree. Importantly, every frame can have unlimited children, but only a single parent. The edges between the nodes in the tree are the transform information from the parent to the child. There is no concept of "world" frame, unless you specifically add a "world" frame to your tree.

For your system, there are several ways you could specify the geometry of your robot:

  1. You could arbitrarily choose one of your laser frames to be the "root" of your tree. For example, let's choose hokuyo1_frame as the root. Then you would want to create two static transform publishers; one from hokuyo1_frame -> hokuyo2_frame and one from hokuyo1_frame->Scanner_frame1 (or you could go from hokuyo2_frame->Scanner_frame1.
  2. If you would like your robot to have a base_link frame, then you could make that the root of your tree, and then specify static transforms from base_link to all three laser frames.
  3. Probably the most-standard way of doing this is to create a URDF that represents the geometry of your robot and lasers, and then use the robot_state_publisher to send the /tf information.

The key here is understanding that with /tf the geometry of your system must be specified as a tree. Importantly, every frame can have unlimited children, but only a single parent. The edges between the nodes in the tree are the transform information from the parent to the child. There is no concept of "world" frame, unless you specifically add a "world" frame to your tree.

For your system, there are several ways you could specify the geometry of your robot:

  1. You could arbitrarily choose one of your laser frames to be the "root" of your tree. For example, let's choose hokuyo1_frame as the root. Then you would want to create two static transform publishers; one from hokuyo1_frame -> hokuyo2_frame and one from hokuyo1_frame->Scanner_frame1 (or you . Alternatively the second transform could go from hokuyo2_frame->Scanner_frame1.. It doesn't matter as long as all 3 frames are in your tree, and none of the frames has more than one parent.
  2. If you would like your robot to have a base_link frame, then you could make that the root of your tree, and then specify static transforms from base_link to all three laser frames.
  3. Probably the most-standard way of doing this is to create a URDF that represents the geometry of your robot and lasers, and then use the robot_state_publisher to send the /tf information.