|
Functions | |
int64_t | fromCarto (::cartographer::common::Time time) |
Convert cartographer time to unix time in [µs]. More... | |
std::unique_ptr<::cartographer::mapping::MapBuilderInterface > | loadMap (const std::filesystem::path &mapPath, const std::filesystem::path &configPath) |
Creates a map builder object from a stored map. More... | |
std::unique_ptr<::cartographer::common::LuaParameterDictionary > | resolveLuaParameters (const std::string &luaCode, const std::filesystem::path &configPath) |
Helper function to create Lua parameter object from string. More... | |
::cartographer::common::Time | toCarto (const int64_t &time) |
Convert unix time in [µs] to cartographer time. More... | |
int64_t fromCarto | ( | ::cartographer::common::Time | time | ) |
Convert cartographer time to unix time in [µs].
time | cartographer time |
Definition at line 22 of file cartographer_utils.cpp.
std::unique_ptr<::cartographer::mapping::MapBuilderInterface > loadMap | ( | const std::filesystem::path & | mapPath, |
const std::filesystem::path & | configPath | ||
) |
Creates a map builder object from a stored map.
mapPath | The path to the map (e.g. /path/to/map.carto) |
configPath | The path where the lua config files reside. |
Definition at line 45 of file cartographer_utils.cpp.
std::unique_ptr<::cartographer::common::LuaParameterDictionary > resolveLuaParameters | ( | const std::string & | luaCode, |
const std::filesystem::path & | configPath | ||
) |
Helper function to create Lua parameter object from string.
Example:
const std::string mapBuilderLuaCode = R"text( include "map_builder.lua" return MAP_BUILDER)text"; auto paramsDict = resolveLuaParameters(mapBuilderLuaCode, ...);
luaCode | The lua code that will be evaluated. |
configPath | The path where the lua config files reside. |
Definition at line 11 of file cartographer_utils.cpp.
cartographer::common::Time toCarto | ( | const int64_t & | time | ) |
Convert unix time in [µs] to cartographer time.
time | in [µs] |
Definition at line 35 of file cartographer_utils.cpp.