unable to construct a 3d pointcloud

asked 2018-06-07 23:56:12 -0500

points gravatar image

updated 2018-06-10 07:42:46 -0500

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.

thanks in advance

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

geometry_msgs::PointStamped laser_point; laser_point.header.frame_id = "laser_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,
    base_point.point.x, base_point.point.y, base_point.point.z, base_point.header.stamp.toSec());

but again the problem pesists!!

edit retag flag offensive close merge delete

Comments

If you look at the data flow of the laser assembler package, it appears that you're not transforming the incoming point clouds into a fixed frame before accumulating them. Can you add the settings you're using to your questions so we can help.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-06-08 04:45:42 -0500 )edit

i have edited the question, adding all the transforms used ,world is the fixed_frame and laser_frame is transformed laser frame

points gravatar image points  ( 2018-06-10 07:46:50 -0500 )edit