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

Point cloud building error

asked 2012-01-24 04:11:19 -0500

alfa_80 gravatar image

updated 2012-01-24 17:14:17 -0500

I've been trying to build a point cloud using pose data as follows:

static tf::TransformBroadcaster tfb;
tf::Transform xform;
xform.setOrigin(tf::Vector3(pose3D_LD2.pose.position.x, pose3D_LD2.pose.position.y, pose3D_LD2.pose.position.z));
xform.setRotation(tf::Quaternion(previous_poseLD_.pose.orientation.x, previous_poseLD_.pose.orientation.y, previous_poseLD_.pose.orientation.z, previous_poseLD_.pose.orientation.w));
tfb.sendTransform(tf::StampedTransform(xform, ros::Time(pose3D_LD2.header.stamp), "base_link", "laser"));
tfListener_.waitForTransform("base_link", previous_scan_.header.frame_id.c_str(), ros::Time(0), ros::Duration(2.0));
projector_.transformLaserScanToPointCloud("base_link", previous_scan_, cloud, tfListener_);

However, I receive this error message:

terminate called after throwing an instance of 'tf::LookupException'
 what():  Frame id / does not exist! Frames (4): Frame /laser exists with parent /base_link.
Frame /base_link exists with parent /world.
Frame /world exists with parent NO_PARENT.

[pointcloud_builder_node-4] process has died [pid 21545, exit code -6].

It seems that I don't have a world frame defined. I do not intend to include it, but, if it is a must, how should I define it?

Also, what could be the error that leads to the death of one of my nodes there(pointcloud_builder_node)?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-01-24 14:26:54 -0500

ahendrix gravatar image

The salient error here is "Frame id / does not exist!"

This probably means that somewhere you are getting an empty frame id, and so the transform fails. You should probably try to narrow this down to a single line of code or a particular message that's causing the problem.

I would check that the frame_id on your incoming laser topic is set.

The documentation doesn't say anything about it, but it might be worth setting the frame_id on the point cloud as well.

edit flag offensive delete link more


Actually, for the laser I've set already the ID, like this " scan.header.frame_id = "laser";". Thanks anyway. A bit trick this error.
alfa_80 gravatar image alfa_80  ( 2012-01-24 18:33:06 -0500 )edit
I've also tried to assign the point cloud frame_id like this: cloud.header.frame_id = "cloud"; Still doesn't work. Or is it the world frame_id has to be set?
alfa_80 gravatar image alfa_80  ( 2012-01-24 18:45:10 -0500 )edit
There are some messages like "yaw", I didn't assign any frame_id. Is it a must to set for each message a frame_id?
alfa_80 gravatar image alfa_80  ( 2012-01-24 20:17:03 -0500 )edit
It turned out, I accidentally forgot to uncomment scan subscriber, as the scan message is subscribed from another package. Nevertheless, the point cloud is not yet successfully built. I'll move to another thread, for this one is considered solved.
alfa_80 gravatar image alfa_80  ( 2012-01-24 20:48:42 -0500 )edit

Question Tools


Asked: 2012-01-24 04:11:19 -0500

Seen: 365 times

Last updated: Jan 24 '12