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

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

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

kidargueta gravatar image

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

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

Comments

Remove any slash before any frame anywhere for TF2

stevemacenski gravatar image stevemacenski  ( 2020-08-26 20:57:05 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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 turtle_tf2_message_broadcaster.py 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 turtle_tf2_message_broadcaster.py without the '/' in the "world" frame, and then everything worked beautifully.

edit flag offensive delete link more

Comments

1

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 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-08-26 17:02:31 -0500

Seen: 1,434 times

Last updated: Aug 26 '20