Ask Your Question
0

Frame id / does not exist!

asked 2014-11-07 12:19:21 -0500

Ruud gravatar image

updated 2014-11-07 15:10:45 -0500

Hey,

I am getting an error when transforming a pointcloud, after a couple of hours, I am still not sure why..

Below is the code I used. I hardcoded the frame's names and the times to transform them to as present time.

transform_listener.waitForTransform("/base", "/right_hand", ros::Time::now(), ros::Duration(3.0));

transform_listener.transformPointCloud ("/base", ros::Time::now(), input_pointcloud, "/right_hand", transformed_pointcloud);

The transform_listener is created as a private variable inside a class object, of which one instance is created in the main function of my program. The ros::init function is called first in the main function, thereafter the class instance is created.

I read about scoping issues with the TF here which tells me:

We create a TransformListener object. Once the listener is created, it starts receiving tf transformations over the wire, and buffers them for up to 10 seconds. The TransformListener object should be scoped to persist otherwise it's cache will be unable to fill and almost every query will fail. A common method is to make the TransformListener object a member variable of a class.

However, as far as I know my tf::TransformListener is in scope?

And this is the error during runtime.

[ WARN] [1415383382.159412441]: Could not transform received slam pointcloud from '/right_hand' to '/base' frame : Frame id / does not exist! Frames (101):

Also see : Image with all the frames and relations

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-11-07 12:46:35 -0500

Tom Moore gravatar image

updated 2014-11-07 12:49:28 -0500

I think this is your issue:

transform_listener.transformPointCloud ("/base", ros::Time::now(), input_pointcloud, "/right_hand", transformed_pointcloud);

Looking at the documentation for that method, you appear to be using the wrong method signature. The source frame comes from your point cloud message, i.e., argument 3. If I had to guess, if you look at the header on your point cloud message, it has an empty frame_id, or a frame_id of just "/". In the function call you used, "/right_hand" refers to the fixed frame, not the source frame. In other words, I think you used this:

http://docs.ros.org/indigo/api/tf/htm...

...and you meant to use this:

http://docs.ros.org/indigo/api/tf/htm...

EDIT: ...and you also need to fill out the frame_id in the header of your point cloud message.

edit flag offensive delete link more

Comments

Hi Tom,

Thank you for the reply. I will check on Monday, this is a good lead I think.

Sidenote: the frame_id is also in the header, but I hard coded it in the function call to check. I also printed it. All were identical.

Ruud gravatar image Ruud  ( 2014-11-07 15:02:33 -0500 )edit

I spotted the error. Indeed the header of the input pointcloud was not properly copied and hence empty. I did need to use the first link in you comment, as I transform the pointcloud at a specific time. Thank you!

Ruud gravatar image Ruud  ( 2014-11-10 09:01:26 -0500 )edit
0

answered 2014-11-07 12:41:41 -0500

paulbovbel gravatar image

updated 2014-11-07 12:45:17 -0500

First off, can you please remove all the / from your frame names (just in case)? This has been deprecated with the removal of frame_prefixes.

Also, instead of the text block, can you please attach a screenshot of your tf view_frames output :)

edit flag offensive delete link more

Comments

Good point. I tried before removing the deprecated '/' from the frames, but didn't help. So I left them there.

I will update the question with the visual representation of the frame tree. :)

Ruud gravatar image Ruud  ( 2014-11-07 15:03:59 -0500 )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

Stats

Asked: 2014-11-07 12:19:21 -0500

Seen: 1,527 times

Last updated: Nov 07 '14