Switching between reading from a live Kinect or from a RGBD dataset for debugging
1. Discussion
Due to the difficulty of properly debugging real-time applications, as all those involving robotics sensors, it becomes more convenient to do development offline (on a dataset saved to disk) and, only when it seems all work fine, switch to the real thing.
The following example will show you how to do it in a way that doesn’t affect your program structure: switching will be controlled by a simple bool variable.
Read here about the robotics dataset “rawlog” format and here about recording Kinect datasets.
2. The code
See the entire example in: https://github.com/MRPT/mrpt/tree/master/samples/hwdrivers_kinect_online_offline_example