Point cloud building error
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)?