forked from maksym-taranukhin/slam
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebugger_interface.cpp
More file actions
Latest commit
32 lines (25 loc) · 623 Bytes
/
Copy pathdebugger_interface.cpp
File metadata and controls
32 lines (25 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<debugger_interface.hpp>
const std::string SlamInterface::id_string()
{
return"slam algorithm";
}
SlamInterface::SlamInterface (arstudio::Config::ptr c) : IAbstractAlgorithm (c)
{
frames_counter = 0;
frames_step = atoi(config->get<std::string> ("coreslam.frames_step").c_str());
}
boolSlamInterface::create()
{
slam = newCoreSlam ();
returntrue;
}
boolSlamInterface::run(const cv::Mat &image, const cv::Mat &dmap)
{
LuxFrame * f = new LuxFrame;
f->image = image;
f->depth_map = dmap;
if (frames_counter%frames_step == 0)
slam->run(f);
frames_counter++;
returntrue;
}