2026-08-02 01:36:11 +00:00
<!-- HTML header for doxygen 1.9.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" />
< meta http-equiv = "X-UA-Compatible" content = "IE=11" />
< meta name = "generator" content = "Doxygen 1.9.8" />
< meta name = "viewport" content = "width=device-width, initial-scale=1" />
< title > RTAB-Map: uResourceGenerator</ title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "jquery.js" ></ script >
< script type = "text/javascript" src = "dynsections.js" ></ script >
2026-08-02 07:56:38 +00:00
< link href = "navtree.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "resize.js" ></ script >
< script type = "text/javascript" src = "navtreedata.js" ></ script >
< script type = "text/javascript" src = "navtree.js" ></ script >
2026-08-02 01:36:11 +00:00
< link href = "search/search.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "search/searchdata.js" ></ script >
< script type = "text/javascript" src = "search/search.js" ></ script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" />
2026-08-02 17:35:14 +00:00
< link href = "doxygen-awesome.css" rel = "stylesheet" type = "text/css" />
< link href = "custom.css" rel = "stylesheet" type = "text/css" />
2026-08-02 01:36:11 +00:00
< script type = "text/javascript" > window . RTABMAP_DOC_ROOT = "" ;</ script >
< script type = "text/javascript" src = "../versions.js" ></ script >
< script type = "text/javascript" src = "version-switcher.js" ></ script >
2026-08-02 17:35:14 +00:00
< script type = "text/javascript" src = "doxygen-awesome-darkmode-toggle.js" ></ script >
< script type = "text/javascript" > DoxygenAwesomeDarkModeToggle . init ();</ script >
2026-08-02 01:36:11 +00:00
</ head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr id = "projectrow" >
< td id = "projectalign" >
< div id = "projectname" > RTAB-Map< span id = "projectnumber" >   0.23.10</ span >
</ div >
2026-08-02 07:56:38 +00:00
< div id = "projectbrief" > Real-Time Appearance-Based Mapping</ div >
2026-08-02 01:36:11 +00:00
</ td >
</ tr >
</ tbody >
</ table >
</ div >
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox ( "searchBox" , "search/" , '.html' );
/* @license-end */
</ script >
< script type = "text/javascript" src = "menudata.js" ></ script >
< script type = "text/javascript" src = "menu.js" ></ script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( function () {
initMenu ( '' , true , false , 'search.php' , 'Search' );
$ ( document ). ready ( function () { init_search (); });
});
/* @license-end */
</ script >
< div id = "main-nav" ></ div >
2026-08-02 07:56:38 +00:00
</ div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" ></ div >
</ div >
</ div >
< div id = "splitbar" style = "-moz-user-select:none;"
class = "ui-resizable-handle" >
</ div >
</ div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( document ). ready ( function (){ initNavTree ( 'uResourceGeneratorPage.html' , '' ); initResizable (); });
/* @license-end */
</ script >
< div id = "doc-content" >
2026-08-02 01:36:11 +00:00
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover = "return searchBox.OnSearchSelectShow()"
onmouseout = "return searchBox.OnSearchSelectHide()"
onkeydown = "return searchBox.OnSearchSelectKey(event)" >
</ div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" ></ div >
< div class = "SRStatus" id = "Loading" > Loading...</ div >
< div class = "SRStatus" id = "Searching" > Searching...</ div >
< div class = "SRStatus" id = "NoMatches" > No Matches</ div >
</ div >
</ div >
</ div >
</ div >
< div >< div class = "header" >
< div class = "headertitle" >< div class = "title" > uResourceGenerator</ div ></ div >
</ div > <!--header-->
< div class = "contents" >
2026-08-02 07:56:38 +00:00
< div class = "textblock" >< p > UtiLite provides a utility application called < a class = "el" href = "uResourceGeneratorPage.html" > uResourceGenerator</ a > to generate resources to include in an executable. For example: </ p >< div class = "fragment" >< div class = "line" > $ < a class = "code hl_namespace" href = "namespacertabmap.html" > rtabmap</ a > -res_tool DatabaseSchema.sql</ div >
< div class = "ttc" id = "anamespacertabmap_html" >< div class = "ttname" >< a href = "namespacertabmap.html" > rtabmap</ a ></ div >< div class = "ttdef" >< b > Definition</ b > < a href = "BayesFilter_8h_source.html#l00039" > BayesFilter.h:39</ a ></ div ></ div >
2026-08-02 01:36:11 +00:00
</ div > <!-- fragment --> < p > This will generate a HEX file "DatabaseSchema_sql.h" which can be included in source files. Data of the file is global and can be accessed by the generated const char * DATABASESCHEMA_SQL. </ p >< div class = "fragment" >< div class = "line" >< span class = "preprocessor" > #include " DatabaseSchema_sql.h" </ span ></ div >
< div class = "line" > ...</ div >
< div class = "line" > std::string hex = DATABASESCHEMA_SQL;</ div >
< div class = "line" >< span class = "comment" > // Assuming there are only ASCII characters, we can directly convert to a string:</ span ></ div >
< div class = "line" > std::string schema = < a class = "code hl_function" href = "UConversion_8h.html#a6d66453336bccd040539ac9905a9c409" > uHex2Str</ a > (hex);</ div >
< div class = "line" >< span class = "comment" > // For binary data:</ span ></ div >
< div class = "line" > std::vector< char> bytes = < a class = "code hl_function" href = "UConversion_8h.html#aafb2c6939780df0241eb35ab4fc8b91b" > uHex2Bytes</ a > (hex);</ div >
< div class = "ttc" id = "aUConversion_8h_html_a6d66453336bccd040539ac9905a9c409" >< div class = "ttname" >< a href = "UConversion_8h.html#a6d66453336bccd040539ac9905a9c409" > uHex2Str</ a ></ div >< div class = "ttdeci" > std::string UTILITE_EXPORT uHex2Str(const std::string & hex)</ div ></ div >
< div class = "ttc" id = "aUConversion_8h_html_aafb2c6939780df0241eb35ab4fc8b91b" >< div class = "ttname" >< a href = "UConversion_8h.html#aafb2c6939780df0241eb35ab4fc8b91b" > uHex2Bytes</ a ></ div >< div class = "ttdeci" > std::vector< char > UTILITE_EXPORT uHex2Bytes(const std::string & hex)</ div ></ div >
</ div > <!-- fragment --> < p > The generator can be automated in a CMake build like: </ p >< div class = "fragment" >< div class = "line" > ADD_CUSTOM_COMMAND(</ div >
< div class = "line" > OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DatabaseSchema_sql.h</ div >
2026-08-02 07:56:38 +00:00
< div class = "line" > COMMAND ${RTABMAP_RES_TOOL} -n my_namespace -p ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/DatabaseSchema.sql</ div >
2026-08-02 01:36:11 +00:00
< div class = "line" > COMMENT < span class = "stringliteral" > " [Creating database resource]" </ span ></ div >
< div class = "line" > DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/DatabaseSchema.sql</ div >
< div class = "line" > )</ div >
< div class = "line" > SET(RESOURCES</ div >
< div class = "line" > ${CMAKE_CURRENT_BINARY_DIR}/DatabaseSchema_sql.h</ div >
< div class = "line" > )</ div >
< div class = "line" > ADD_LIBRARY(mylib ${SRC_FILES} ${RESOURCES})</ div >
< div class = "line" > ADD_EXECUTABLE(myexecutable ${SRC_FILES} ${RESOURCES})</ div >
2026-08-02 07:56:38 +00:00
</ div > <!-- fragment --> < p > The tool is installed as < code > rtabmap-res_tool</ code > . It is not exported by FIND_PACKAGE(RTABMap), so locate it with FIND_PROGRAM(RTABMAP_RES_TOOL rtabmap-res_tool). Inside RTAB-Map's own build, the < code > res_tool</ code > CMake target can be used directly as the COMMAND instead. </ p >
2026-08-02 01:36:11 +00:00
</ div ></ div > <!-- contents -->
</ div > <!-- PageDoc -->
2026-08-02 07:56:38 +00:00
</ div > <!-- doc-content -->
2026-08-02 01:36:11 +00:00
<!-- start footer part -->
2026-08-02 07:56:38 +00:00
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" >< img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" /></ a > 1.9.8 </ li >
</ ul >
</ div >
2026-08-02 01:36:11 +00:00
</ body >
</ html >