Ask Your Question
1

pointcloud access data

asked 2012-10-21 06:48:19 -0500

Pitscho gravatar image

updated 2012-10-21 06:48:42 -0500

Hi

I have a subscribed topic with the type sensor_msgs::PointCloud2.

I do not need the pcl library. I just want to iterate through each point and take the Z value. but i have no clue how to do this with sensor_msgs::PointCloud2 and i dont find an example.

Do I really need pcl for easy element access? Ciao

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-10-21 11:43:26 -0500

harsha gravatar image

Please look into the documentation of sensor_msgs::PointCloud2 (http://ros.org/doc/api/sensor_msgs/html/msg/PointCloud2.html) and you can use the field "data" to access z values.

Possible duplicate of this question (http://answers.ros.org/question/11556/datatype-to-access-pointcloud2/)

edit flag offensive delete link more

Comments

Since Indigo, things have changed. See my answer to the possible duplicate question: http://answers.ros.org/question/11556...

peci1 gravatar image peci1  ( 2015-08-13 18:06:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-21 06:48:19 -0500

Seen: 1,027 times

Last updated: Oct 21 '12