Getting PointCloud2 data in Python?
Hello,
I am trying to translate the TurtleBot "follower" program (written in C++) to Python but I'm not sure how to read the (x, y, z) values from the PointCloud2 message returned by the Kinect without using PCL. I know I can use the depth image from the Kinect on /camera/depth/image but I'd rather use the PointCloud2 message type if possible.
I can subscribe to the /camera/depth/points or /camera/rgb/points topic and print back things like the message header and field names, but I'm not sure how to get the actual x, y and z data values so that I can iterate through them and compute average values. Does anyone know the magic incantation?
Thanks!
patrick