4 static WAI::WAI
wai(
"");
15 WAI_LOG(
"dataroot set to %s", dataRoot);
16 wai.setDataRoot(dataRoot);
21 WAI_LOG(
"setMode called");
30 WAI_LOG(
"mode not set. Call wai_setMode first.");
42 if (!mapPoint->isBad())
44 *mapPointCoordinate = {
45 mapPoint->worldPosVec().
x,
46 mapPoint->worldPosVec().y,
47 mapPoint->worldPosVec().z,
55 *mapPointCount = count;
60 delete *mapPointCoordinatePtr;
65 WAI_LOG(
"activateSensor called");
66 wai.activateSensor(sensorType, sensorInfo);
71 WAI_LOG(
"updateCamera called");
72 cv::Mat cvFrameRGB = cv::Mat(frameRGB->height,
77 cv::Mat cvFrameGray = cv::Mat(frameGray->height,
83 WAI::CameraData sensorData = {&cvFrameGray, &cvFrameRGB};
85 wai.updateSensor(WAI::SensorType_Camera, &sensorData);
90 WAI_LOG(
"whereAmI called");
93 cv::Mat cvPose = cv::Mat(4, 4, CV_32F);
94 result =
wai.whereAmI(&cvPose);
98 WAI_LOG(
"WAI knows where I am");
99 for (
int y = 0; y < 4; y++)
101 for (
int x = 0; x < 4; x++)
103 pose->
e[x][y] = cvPose.at<
float>(x, y);
113 WAI_LOG(
"getState called");
120 if ((state.size() + 1) < size)
122 size = state.size() + 1;
127 const char*
s = state.c_str();
137 registerDebugCallback(callback);
WAI_API void wai_activateSensor(WAI::SensorType sensorType, void *sensorInfo)
WAI_API void wai_updateCamera(WAI::CameraFrame *frameRGB, WAI::CameraFrame *frameGray)
WAI_API int wai_getState(char *buffer, int size)
WAI_API void wai_setMode(WAI::ModeType modeType)
static WAI::ModeOrbSlam2 * mode
WAI_API bool wai_whereAmI(WAI::M4x4 *pose)
WAI_API void wai_setDataRoot(const char *dataRoot)
WAI_API void wai_registerDebugCallback(DebugLogCallback callback)
WAI_API void wai_getMapPoints(WAIMapPointCoordinate **mapPointCoordinatePtr, int *mapPointCount)
WAI_API void wai_releaseMapPoints(WAIMapPointCoordinate **mapPointCoordinatePtr)
The SLScene class represents the top level instance holding the scene structure.
std::string getPrintableState()
std::vector< WAIMapPoint * > getMapPoints()