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

TF tree has two root node

asked 2018-07-15 18:43:42 -0500

AutoCar gravatar image

Hi all,

I am building a MIT-RACECAR with ZED stereo camera and Yokuyo LiDar on it. When I visualized the /tf, it showed two trees:

One tree has 1)odom as root, then 2)base_link as second layer and then 3)Laser, Base_footprint, IMU as children of base_link

Another tree has 1)Map as root, then 2)ZED_center as second layer and then 3)ZED left camera and ZED right camera as children of ZED_Center.

I remember that tf can have only one tree, one root node. Then how can I combine the two trees into one?

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-16 00:48:48 -0500

updated 2018-07-28 23:00:58 -0500

jayess gravatar image

The ROS REP has defined the structure for linking frames together to have one single tree.

As per the REP, you would have a world frame, the child of which would be map, and the child of that would be the odom frame and so on.

edit flag offensive delete link more

Comments

Thanks, can you let me know how to make the changes? Which file I should modify?

AutoCar gravatar image AutoCar  ( 2018-07-16 12:35:03 -0500 )edit

I'm not entirely sure which file you'll have to modify. In ROS the most commonly used nodes for localization are gmapping (if you want to build a map) and amcl (if you want to use an existing map). Both already publish the map -> odom transform.

Sidd gravatar image Sidd  ( 2018-07-16 21:50:18 -0500 )edit

You will have to figure out what node is publishing the map frame and figure out what node is publishing the odom frame and link the two frames.

Sidd gravatar image Sidd  ( 2018-07-16 21:50:57 -0500 )edit

Hi Sidd, thanks a lot for your post. I know which node publishes odom and which one publishes map. What I need to do to link the two?

AutoCar gravatar image AutoCar  ( 2018-07-17 10:55:14 -0500 )edit

I would recommend going through the tutorials on the navigation stack - http://wiki.ros.org/navigation/Tutorials and in particular get familiar with http://wiki.ros.org/navigation/Tutori... .

Sidd gravatar image Sidd  ( 2018-07-19 15:33:37 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-07-15 18:43:42 -0500

Seen: 849 times

Last updated: Jul 28 '18