# unable to construct a 3d pointcloud

i am using a LIDAR mounted on a tiltpan to make a 3D plot, got 2D LaserScan data from Lidar , then transformed the frame_id of LaserScan data to reflect changes by the tiltpan , upto now i have only 2D LaserScan data with its frame transformed in such a way so as to account for the tilts with respect to the fixed frame in my case it is World frame.

i have converted these transformed 2D scans to pointcloud data and assembled these using Laser assembler package, but but whenever the pan tilts by successive angles , the whole plot shifts to the new angle along with the plot of z=0 also.

now at each successive increments of angle, i am getting the plot of all previous datas assembled together in a single plane.

edit1:frame_id of laserscan data is laser_frame

transform broadcaster between laser_frame and world

br1.sendTransform(tf::StampedTransform(transform1, ros::Time::now(), "world", "laser_frame"));
rate.sleep();
ros::spinOnce();


where q.setRPY(0.0,angle1,0.0); transform1.setOrigin( tf::Vector3(0.0, 0.0, 0.0) ); angle1 is the angle by which servo rotates..

thus after converting it to pointcloud and transforming each pointcloud data into world frame

try{ geometry_msgs::PointStamped base_point; listener.transformPoint("world", laser_point, base_point);

ROS_INFO("base_laser: (%.2f, %.2f. %.2f) -----> laser_frame: (%.2f, %.2f, %.2f) at time %.2f",
laser_point.point.x, laser_point.point.y, laser_point.point.z,


but again the problem pesists!!

edit retag close merge delete