Before I use ros, I transform the pointcloud into numpy with shape (720,1280,4). The 4 mean for information: xyz location information and RGB information in one float32 number.
Now I open the camera with ROS. It output the pointcloud by pointcloud2 message. How can I transform the pointcloud2 msg in to the numpy array with shape (720,1280,3)? 3 is the xyz location information.