0
$\begingroup$

Rosanswers logo

i've taken a sensor_msgs/LaserScan and used transformLaserScanToPointCloud to get a new sensor_msgs/PointCloud.

originally my laserScan only had single values but after this, when i cout the ->points, there seems to be three values, (something, something, 0)

and since i want to be able to perform some pcl functions on my laser data i then use pcl::fromROSMsgs to take the sensor_msgs/PointCloud and transform it into a PointCloud of type PointXYZ.

and now using cout to view the ->points, there are now three values, (something, something, something).

what exaclty has happened to my original laser readings which were in meters? i thought i could access the laser values in the PointXYZ form by using ->points._x as is shown on the struct page here... http://docs.pointclouds.org/1.3.1/structpcl_1_1_point_x_y_z.html


Originally posted by liquidmonkey on ROS Answers with karma: 37 on 2012-03-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I'm not really sure, what your problem is. What has happened is exactly what should have happened and as I read it also what you want. The laser scan distances in meters have been converted into a point cloud with coordinates. The (something, something, 0) is the point coordinates (x,y,z) and the z is 0 because there is no height information. They are still in meters. Is this what you want?


Originally posted by dornhege with karma: 31395 on 2012-03-07

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by liquidmonkey on 2012-03-08:
yes it is and its working, thank you :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.