Issue about transformation of a point cloud

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue about transformation of a point cloud

soichiru
Hi I have a question about about using the method pcl::transformPointCloud, in fact I have a point cloud and I just want to rotate with respect to the axis Y, so if I use

 " transform_1.rotate (Eigen::AngleAxisf (theta, Eigen::Vector3f::UnitY()))"

without any translation , this rotate my point cloud in a correct way but also my point cloud appear in a different place instead of just rotate all the points. I don't undertand why, I think it has to be something with the system reference but I not quite sure. Also I tried in the following way

   Eigen::Matrix4f transform_1 = Eigen::Matrix4f::Identity();
    float theta = M_PI/8;
    transform_1 (0,0) = cos (theta);
    transform_1 (0,2) = sin(theta);
    transform_1 (2,0) = -sin (theta);
    transform_1 (2,2) = cos (theta);
    pcl::transformPointCloud (*out_cloud, *transformed_cloud, transform_1);

but it is the same result.

Rotation 90 g
Rotation 90 grad
As you can see in the picture the green points are the original.

I hope you can help me, and give some tips.
Reply | Threaded
Open this post in threaded view
|

Re: Issue about transformation of a point cloud

VictorLamoine
Administrator
Hello,

Please read this:
http://www.pcl-users.org/Rotate-point-cloud-around-it-s-origin-td4040578.html#a4040581

Tell us if it solves your problem!

Bye
Reply | Threaded
Open this post in threaded view
|

Re: Issue about transformation of a point cloud

soichiru
Thank you so much Victor, that was exactly what I was serching and of course it solves my problem. Sorry because I did find this topic, maybe I searched in a wrong way.

Cheers .