Ask Your Question

Problem with leading '/' when running tf2::MessageFilter tutorial

asked 2020-08-26 17:02:31 -0600

kidargueta gravatar image

updated 2020-08-26 18:50:35 -0600

jayess gravatar image

Hi guys,

I am following the tf2::MessageFilter tutorial and when I run the message_filter.cpp code I get the following error:

Warning: Invalid argument "/world" passed to canTransform argument source_frame in tf2 frame_ids cannot start with a '/' like: 
         at line 134 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp
[ WARN] [1598479161.890484911]: Failure Invalid argument "/world" passed to lookupTransform argument source_frame in tf2 frame_ids cannot start with a '/' like

I understand that this is something related to the change from tf to tf2. I know what the error is. But I don't know where I need to remove the "/" from the frame name.

Any help please? Thanks!

edit retag flag offensive close merge delete


Remove any slash before any frame anywhere for TF2

stevemacenski gravatar image stevemacenski  ( 2020-08-26 20:57:05 -0600 )edit

@stevemacenski thanks for the reply. I know that that is what I need to do. The problem was that I did not have access to the source code generating the frames. I figured which script was doing it, and coded it myself and solved the problem.

kidargueta gravatar image kidargueta  ( 2020-08-26 21:34:40 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-08-26 21:40:24 -0600

kidargueta gravatar image

So after struggling for a couple of hours, I figured it out. The main issue was that I did not have access to the source code of the demo, but noticed using rostopic that was publishing the PointStamped message with "/world" frame. I had to remove the command that runs that script from the launch file of the demo, implemented my own without the '/' in the "world" frame, and then everything worked beautifully.

edit flag offensive delete link more


Hi, i am facing the same issue. Can you tell me how to find the specific code that is publishing /world frame. For instance in my case I am using a quadcopter example taken from github repo. how to find the file name to make the change in? Pls let me know thanks

afaroo01 gravatar image afaroo01  ( 2021-10-11 08:13:44 -0600 )edit

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: 2020-08-26 17:02:31 -0600

Seen: 546 times

Last updated: Aug 26 '20