Translation

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

Translation

Ponzifex Maximus
Hi PCL users,

I have this simple code:
        
Eigen::Matrix4f t = Eigen::Matrix4f::Identity();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);

/*
* 0,1,2,3
* 4,5,6,7
* 8,9,0,1
* 2,3,4,5
*/

t(3) = 10; // translate on x axis

pcl::transformPointCloud(*cloud, *cloud, t);

But points does not get translated by 10 on the X axis.
Scaling and rotating works as expected, but translation.


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Translation

Sergey
Administrator
Hi,

A new tutorial on transforming point clouds was contributed to PCL recently.
Unfortunately as far as I can see it did not make its way to the website yet,
but you can view it in raw format in the repository:

https://raw.github.com/PointCloudLibrary/pcl/master/doc/tutorials/content/matrix_transform.rst

Perhaps that might help.

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Translation

Ponzifex Maximus
Ok, thanks, it works now but setting transformation matrix like t(0,3)...



On Sat, Mar 8, 2014 at 4:13 PM, Sergey <[hidden email]> wrote:
Hi,

A new tutorial on transforming point clouds was contributed to PCL recently.
Unfortunately as far as I can see it did not make its way to the website
yet,
but you can view it in raw format in the repository:

https://raw.github.com/PointCloudLibrary/pcl/master/doc/tutorials/content/matrix_transform.rst

Perhaps that might help.

Regards,
Sergey



--
View this message in context: http://www.pcl-users.org/Translation-tp4032777p4032778.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Translation

nizar sallem
What you wanted is t.coeffRef (3) = 10;
t (3) doesn't refer to t_x component.

--
Nizar
On 08/03/2014 16:55, Ponzi Fex wrote:
Ok, thanks, it works now but setting transformation matrix like t(0,3)...



On Sat, Mar 8, 2014 at 4:13 PM, Sergey <[hidden email]> wrote:
Hi,

A new tutorial on transforming point clouds was contributed to PCL recently.
Unfortunately as far as I can see it did not make its way to the website
yet,
but you can view it in raw format in the repository:

https://raw.github.com/PointCloudLibrary/pcl/master/doc/tutorials/content/matrix_transform.rst

Perhaps that might help.

Regards,
Sergey



--
View this message in context: http://www.pcl-users.org/Translation-tp4032777p4032778.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users



_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users