ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The above mentioned method works fine, but I implemented following as it was easy to access points that way
for p in pc2.read_points(point_cloud, field_names = ("x", "y", "z"), skip_nans=True):
print " x : %f y: %f z: %f" %(p[0],p[1],p[2])
2 | No.2 Revision |
The above mentioned method works fine, but I implemented following as it was easy to access points that way
import sensor_msgs.point_cloud2 as pc2
...
for p in pc2.read_points(point_cloud, field_names = ("x", "y", "z"), skip_nans=True):
print " x : %f y: %f z: %f" %(p[0],p[1],p[2])