API

API

class indem::CIMRSDK

This is SDK interface.

Public Functions

bool Init(MRCONFIG config = {0})

start all thread to get driver data and pose with config

参数

config -- if config is not use, all default config will be set

void Release()

release all resources which SDK used

int GetCapbility(MRCapbility cap)

depreciate

ModuleInfo GetModuleInfo()

query module informations

MoudleAllParam GetModuleParams()

query calibration of module

void RegistModulePoseCallback(DataCallback cb, void *param)

add callback function to get pose data

参数
  • cb -- callback function to regist

  • param -- pass to callback function

void RegistModuleCameraCallback(ModuleImageCallback cb, void *param)

add callback function to get image data

参数
  • cb -- callback function to regist

  • param -- pass to callback function

void RegistImgCallback(ImgCallback cb)

add callback function to get rectified image data

参数

cb -- callback function to regist

void RegistRectifiedImgCallback(RectifiedImgCallback cb)

add callback function to get rectified image data

参数

cb -- callback function to regist

void RegistDisparityCallback(DisparityCallback cb)

add callback function to get disparity data

参数

cb -- callback function to regist

void RegistDepthCallback(DepthCallback cb)

add callback function to get depth data

参数

cb -- callback function to regist

void RegistPointCloudCallback(PointCloudCallback cb)

add callback function to get point cloud

参数

cb -- callback function to regist

void RegistDetectorCallback(DetectorImgCallback cb)

add callback function to get detector image

参数

cb -- callback function to regist

void RegistModuleIMUCallback(ModuleIMUCallback cb)

add callback function to get imu data

参数
  • cb -- callback function to regist

  • param -- pass to callback function

void BeforeSlamInit(void *inParam)

data callback function

参数

inParam -- pass params to slam before it inited

bool ImportMap(const char *fullpath)

import map to slam module

参数

fullpath -- fullpath of the map

返回

true if success, else false.

bool ExportMap(const char *fullpath)

export map from slam module

参数

fullpath -- fullpath of the map which wante to save

返回

true if success, else false.

void BeforePluginInit(const char *pluginName, void *param)

some plugin may be init with params.

This interface pass params to Init() function of plugins.

参数
  • pluginName -- which plugin should be given.

  • param -- params to be pass.

int LoadPlugin(const char *pluginName)

load plugin manually.

参数

pluginName -- which plugin should be loaded.

int AddPluginCallback(const char *pluginName, const char *callbackName, PluginCallback cb, void *param)

some plugin may have outputs.

Here give a way to get plugin output data.

参数
  • pluginName -- which plugin should be add.

  • callbackName -- which callback function should be add or replace.

  • cb -- pointer of callback function.

  • param -- which will be passed to callback function.

返回

true if success

int InvokePluginMethod(const char *pluginName, const char *methodName, void *inParam, void *outParam)

some plugin may have its own method.

Here give a way to invoke these method.

参数
  • pluginName -- which plugin should be added.

  • methodName -- which method should be called.

  • inParam -- pointer passed in.

  • outParam -- pointer to retrieved.

返回

false if fail

void ReleasePlugin(const char *pluginName)

release plugin manually.

参数

pluginName -- which plugin should be release.

bool EnableRectifyProcessor()

enable rectify process.

返回

if success return true.

bool EnableDisparityProcessor()

enable disparity process.

返回

if success return true.

bool EnableDepthProcessor()

enable depth process.

返回

if success return true.

bool EnablePointProcessor()

enable point cloud process.

返回

if success return true.

bool EnableDetectorProcessor()

enable detector process.

返回

if success return true.

bool DisableAllProcessors()

disanable all processors.

返回

if success return true.

bool EnableLRConsistencyCheck()

enable L-R Consistency check.

返回

if success return true.

bool DisableLRConsistencyCheck()

disanable L-R Consistency check.

返回

if success return true.

bool SetDepthCalMode(indem::DepthCalMode mode)

Set depth calculate mode.

返回

if success return true.

Public Static Functions

static void ListPluginsInfo(int *pluginNum, char **pluginsName)

display all plugins loaded currently

参数
  • pluginNum -- plugin's count retrieved

  • pluginName -- plugin's names retrieved

static void ListPluginInfo(const char *pluginsName, int *major, int *minor, char *developer)

display all plugin's information

参数
  • pluginName -- which plugin information to be query

  • major..........plugin's -- major version

  • minor..........plugin's -- minor version

  • developer......plugin's -- developer name