ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

pointcloud access data

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

Pitscho gravatar image

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


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

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

harsha gravatar image

Please look into the documentation of sensor_msgs::PointCloud2 ( and you can use the field "data" to access z values.

Possible duplicate of this question (

edit flag offensive delete link more


Since Indigo, things have changed. See my answer to the possible duplicate question:

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

Question Tools


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

Seen: 1,200 times

Last updated: Oct 21 '12