Ask Your Question

Kinect openni_launch TF2 exception warning

asked 2014-10-06 17:45:21 -0500

yoo00 gravatar image

Hi all,

I tried to run other package with openni_launch of ASUS Xtion. In the launch file of other package, it subscribes to /camera/depth_registered/points, /camera/rgb/image_raw, /camera/depth_registered/image, and /camera/depth/camera_info. When I launched roslaunch openni_launch openni.launch, it was fine. But when I launched the other package, I got this following warning repeating over and over and could not subscribe to kinect rostopics.

[ WARN] [1412634733.035488109]: TF2 exception: Invalid argument "/camera_rgb_optical_frame" passed to lookupTransform argument target_frame in tf2 frame_ids cannot start with a '/' like:

Anyone who has seen this warning before? I am using ubuntu 14.04 and ROS indigo. I did openni-related apt-gets and installed openni_launch. The version of my ASUS Xtion is old one, so openni_launch package is comparable with it, and I was able to subscribe all of rostopics properly, which is fine. It looks like TF2 related problem, but I do not know exactly why it happened.

Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-10-06 17:55:20 -0500

James Diprose gravatar image

Its because the launch file in openni_launch hasn't been updated to remove the slashes from the cameras frame_ids. You can edit the launch file openni.launch and remove the "/" from "/camera_rgb_optical_frame" (I cant remember exactly, but I think that launch file actually includes another file with a whole lot of parameters - which is the one you want to edit).

edit flag offensive delete link more


You're right! After I removed $(arg tf_prefix) prefixes in openni.launch file, it worked fine. Thank you James!

yoo00 gravatar image yoo00  ( 2014-10-06 19:23:54 -0500 )edit

No worries :)

James Diprose gravatar image James Diprose  ( 2014-10-06 21:23:26 -0500 )edit

Hello, I could not solve this problem, Will you kindly explain it in more clear way? I could not find $(arg tf_prefix) in openni.launch. In my openni.launch file it is like this <arg name="rgb_frame_id" default="/$(arg camera)_rgb_optical_frame"/> Thanks

Zari gravatar image Zari  ( 2015-06-09 09:28:27 -0500 )edit

Hi Zari, in the default value, default="/$(arg camera)_rgb_optical_frame"/> there is a '/' right after '='. You need to remove that. Hope this helps.

umair gravatar image umair  ( 2016-06-13 11:42:32 -0500 )edit

answered 2015-06-09 17:10:34 -0500

joq gravatar image

The Indigo version was updated to remove the leading slashes. Unfortunately, that was not a backwards-compatible change.

For those still needing tf_prefix, use this new launch file:

roslaunch openni_launch openni_tf_prefix.launch tf_prefix:=your_namespace


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

1 follower


Asked: 2014-10-06 17:45:21 -0500

Seen: 988 times

Last updated: Jun 09 '15