Kinect - How to get a consistent set of data ?
Hi,
I'm currently writing a program which is to use data from Kinect in order to perform image processing. I'm using the OpenNI-Kinect driver with Ubuntu 10.10 and ROS Diamondback.
The image processing needs color image, depth image and point cloud data, then I'm subscribing to the topics "camera/rgb/image_color", "camera/depth/image" and "camera/depth/points", which allows me to save pointers to the data, and - if needed - to save the different data as images or binary files.
My problem is that I don't know how to get a consistent set of these data, i.e. how to get RGB, depth and point cloud data which have the same time stamp.
The program is looping with a while(true) which contains:
- a cvWaitKey(1) to set the saving and to exit the loop,
- and a ros::spinOnce() to actually loop.
For the moment the program saves point cloud and depth data which have the same time stamp but the RGB never matches. Would you see how to get a RGB captured at the same moment ?