Cloud values are not loaded
My code snippet in order to build a point cloud as below:
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", "laser", previous_scan_.header.stamp, ros::Duration(2.0));
projector_.transformLaserScanToPointCloud("base_link", previous_scan_, cloud, tfListener_);
It neither gives error and nor emits warning messages. However, when I run "rostopic echo /cloud" it gives the following information:
header:
seq: 198
stamp:
secs: 0
nsecs: 0
frame_id: cloud
points: []
channels: []
---
header:
seq: 199
stamp:
secs: 0
nsecs: 0
frame_id: cloud
points: []
channels: []
---
header:
seq: 200
stamp:
secs: 0
nsecs: 0
frame_id: cloud
points: []
channels: []
---
header:
seq: 201
stamp:
secs: 0
nsecs: 0
frame_id: cloud
points: []
channels: []
---
It seems that the point cloud is not successfully configured. Apparently, when running the rviz, it complaints that "no messages received".
Any remedy for this weird behavior?
Thanks in advance.
Comments
