Ask Your Question
1

tf tree is invalide because it contains a loop

asked 2014-09-25 08:19:26 -0500

charkoteow gravatar image

updated 2014-09-26 02:24:40 -0500

I am trying to display my laserscan on rviz but its status flickers between Status:Ok and Status:Error because of Transform.

Transform [sender=/depthimage_to_laserscan]
For frame [camera_depth_frame]: No transform to fixed frame [base_footprint]. 
TF error: [The tf tree is invalid because it contains a loop. 
Frame camera_rgb_optical_frame exists with parent camera_rgb_frame. 
Frame camera_rgb_frame exists with parent base_link. 
Frame base_footprint exists with parent odom. 
Frame base_link exists with parent base_footprint. 
Frame left_cliff_sensor_link exists with parent base_link. 
Frame leftfront_cliff_sensor_link exists with parent base_link. 
Frame right_cliff_sensor_link exists with parent base_link. 
Frame rightfront_cliff_sensor_link exists with parent base_link. 
Frame wall_sensor_link exists with parent base_link. 
Frame camera_depth_frame exists with parent camera_rgb_frame. 
Frame camera_depth_optical_frame exists with parent camera_depth_frame. 
Frame camera_link exists with parent camera_rgb_frame. 
Frame front_wheel_link exists with parent base_link. 
Frame gyro_link exists with parent base_link. 
Frame base_laser_link exists with parent base_link. 
Frame laser exists with parent base_link. 
Frame plate_0_link exists with parent base_link. 
Frame plate_1_link exists with parent plate_0_link. 
Frame plate_2_link exists with parent plate_1_link. 
Frame plate_3_link exists with parent plate_2_link. 
Frame rear_wheel_link exists with parent base_link. 
Frame spacer_0_link exists with parent base_link. 
Frame spacer_1_link exists with parent base_link. 
Frame spacer_2_link exists with parent base_link. 
Frame spacer_3_link exists with parent base_link. 
Frame standoff_2in_0_link exists with parent base_link. 
Frame standoff_2in_1_link exists with parent base_link. 
Frame standoff_2in_2_link exists with parent base_link. 
Frame standoff_2in_3_link exists with parent base_link. 
Frame standoff_2in_4_link exists with parent standoff_2in_0_link. 
Frame standoff_2in_5_link exists with parent standoff_2in_1_link. 
Frame standoff_2in_6_link exists with parent standoff_2in_2_link. 
Frame standoff_2in_7_link exists with parent standoff_2in_3_link. 
Frame standoff_8in_0_link exists with parent standoff_2in_4_link. 
Frame standoff_8in_1_link exists with parent standoff_2in_5_link. 
Frame standoff_8in_2_link exists with parent standoff_2in_6_link. 
Frame standoff_8in_3_link exists with parent standoff_2in_7_link. 
Frame standoff_kinect_0_link exists with parent plate_2_link. 
Frame standoff_kinect_1_link exists with parent plate_2_link. 
Frame left_wheel_link exists with parent base_link. 
Frame right_wheel_link exists with parent base_link. 
Frame scan1 exists with parent cart_frame. 
Frame scan2 exists with parent cart_frame. ]

How do I get rid of the error?

EDIT:

tf frames

image description

edit retag flag offensive close merge delete

Comments

1

Please share frame.pdf screenshot from rosrun tf view_frames

bvbdort gravatar imagebvbdort ( 2014-09-25 08:46:47 -0500 )edit

I've updated the question with my frames.

Ignore the cart_frame, that's something else that I'm trying to figure out.

charkoteow gravatar imagecharkoteow ( 2014-09-26 02:26:14 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-12-18 07:01:33 -0500

Frantisek.Durovsky gravatar image

It can be also caused by openni_launch node if you leave default settings and publish_tf over your urdf model. Set "arg publish_tf" to false in your launch file. Helped in my case.

<include file="$(find openni_launch)/launch/openni.launch" >
    <arg name="publish_tf" value="false" />
</include>
edit flag offensive delete link more

Comments

worked for me too! thank you :)

charkoteow gravatar imagecharkoteow ( 2015-03-03 06:21:31 -0500 )edit

me too! thanks!

luc gravatar imageluc ( 2016-12-07 20:16:52 -0500 )edit
3

answered 2014-09-25 11:31:07 -0500

paulbovbel gravatar image

In general, this means you have a cycle in your tf tree. A tree is comprised of nodes, each with exactly one parent. The relationship is directed. A simple situation causing a loop would be with three nodes (a, b, c), where a is child of b, b is child of c, and c is child of a.

Chances are you mixed up the parent-child relationship somewhere in your config.

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: 2014-09-25 08:19:26 -0500

Seen: 2,335 times

Last updated: Dec 18 '14