I am trying to setup a simple program to use OpenKinect to connect a Kinect and somehow test the communication to my laptop. I can run the demos fine, but I want to test it through code to make sure I know whats going on. So far I am still unable to connect it. The code as of now is -
#include "/usr/local/include/libfreenect.hpp"
#include <iostream>
using namespace std;
Freenect::FreenectDevice::FreenectDevice* device;
int main(int argc, char** argv) {
Freenect::Freenect k;
device = &k.createDevice<Freenect::FreenectDevice>(0); //line 8
cout<<"\ndeviceCount:"<<k.deviceCount();
return 0;
}
When I compile, it tells me
In member function ‘ConcreteDevice& Freenect::Freenect::createDevice(int) [with ConcreteDevice = Freenect::FreenectDevice]’:
test_kinect.cpp:8: instantiated from here
libfreenect.hpp:196: error: cannot allocate an object of abstract type ‘Freenect::FreenectDevice’
So the FreenectDevice class is abstract...well how am I supposed to create a device then? Am I expected to write my own class that inherits this one whenever I want to use OpenKinect? I'm very confused about how to actually use the code this library provides. I have been searching for some kind of basic tutorial, but have found nothing. If someone knows of a good tutorial, that would be the best thing for me right now. Any help is appreciated, thanks.