mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
Parameters --params: don't show those related to dependencies not built in RTAB-Map
This commit is contained in:
@@ -620,14 +620,44 @@ ParametersMap Parameters::parseArguments(int argc, char * argv[], bool onlyParam
|
|||||||
{
|
{
|
||||||
for(rtabmap::ParametersMap::const_iterator iter=parameters.begin(); iter!=parameters.end(); ++iter)
|
for(rtabmap::ParametersMap::const_iterator iter=parameters.begin(); iter!=parameters.end(); ++iter)
|
||||||
{
|
{
|
||||||
std::string str = "Param: " + iter->first + " = \"" + iter->second + "\"";
|
bool ignore = false;
|
||||||
std::cout <<
|
UASSERT(uSplit(iter->first, '/').size() == 2);
|
||||||
str <<
|
std::string group = uSplit(iter->first, '/').front();
|
||||||
std::setw(60 - str.size()) <<
|
#ifndef RTABMAP_GTSAM
|
||||||
" [" <<
|
if(group.compare("GTSAM") == 0)
|
||||||
rtabmap::Parameters::getDescription(iter->first).c_str() <<
|
{
|
||||||
"]" <<
|
ignore = true;
|
||||||
std::endl;
|
}
|
||||||
|
#endif
|
||||||
|
#ifndef RTABMAP_G2O
|
||||||
|
if(group.compare("g2o") == 0)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifndef RTABMAP_FOVIS
|
||||||
|
if(group.compare("OdomFovis") == 0)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifndef RTABMAP_VISO2
|
||||||
|
if(group.compare("OdomViso2") == 0)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if(!ignore)
|
||||||
|
{
|
||||||
|
std::string str = "Param: " + iter->first + " = \"" + iter->second + "\"";
|
||||||
|
std::cout <<
|
||||||
|
str <<
|
||||||
|
std::setw(60 - str.size()) <<
|
||||||
|
" [" <<
|
||||||
|
rtabmap::Parameters::getDescription(iter->first).c_str() <<
|
||||||
|
"]" <<
|
||||||
|
std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UWARN("App will now exit after showing default RTAB-Map parameters because "
|
UWARN("App will now exit after showing default RTAB-Map parameters because "
|
||||||
"argument \"--params\" is detected!");
|
"argument \"--params\" is detected!");
|
||||||
|
|||||||
Reference in New Issue
Block a user