Fixed Tango odometry variance

This commit is contained in:
matlabbe
2017-02-07 15:57:52 -05:00
parent 5e9c4fde95
commit 1c555f321b
4 changed files with 12 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.introlab.rtabmap"
android:versionCode="35"
android:versionCode="36"
android:versionName="@RTABMAP_VERSION@">
<uses-permission android:name="android.permission.CAMERA" />

View File

@@ -685,8 +685,8 @@ void CameraTango::mainLoop()
stampEpochOffset_ = UTimer::now()-data.stamp();
}
data.setStamp(stampEpochOffset_ + data.stamp());
LOGI("Publish odometry message (variance=%f)", firstFrame_?9999:0.0001);
this->post(new OdometryEvent(data, pose, firstFrame_?9999:0.0001, firstFrame_?9999:0.0001));
LOGI("Publish odometry message (variance=%f)", firstFrame_?9999:0.000001);
this->post(new OdometryEvent(data, pose, firstFrame_?9999:0.000001, firstFrame_?9999:0.000001));
firstFrame_ = false;
}
else if(!this->isKilled())

View File

@@ -101,13 +101,10 @@ rtabmap::ParametersMap RTABMapApp::getRtabmapParameters()
int featuresLoop = uStr2Int(parameters.at(rtabmap::Parameters::kVisMaxFeatures()));
if(featuresVoc==0 || featuresLoop < featuresVoc)
{
// re-use already extracted descriptors
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemRawDescriptorsKept(), std::string("true")));
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kRGBDLoopClosureReextractFeatures(), std::string("false")));
}
else
{
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemRawDescriptorsKept(), std::string("false")));
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kRGBDLoopClosureReextractFeatures(), std::string("true")));
}
}
@@ -2226,8 +2223,15 @@ int RTABMapApp::postProcessing(int approach)
// detect more loop closures
if(approach == -1 || approach == 2)
{
// detect more loop closures
// detect more loop closures, don't re-extract features for this
rtabmap::ParametersMap parameters;
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kRGBDLoopClosureReextractFeatures(), std::string("false")));
rtabmap_->parseParameters(parameters);
returnedValue = rtabmap_->detectMoreLoopClosures(1.0f, M_PI/6.0f, approach == -1?5:1);
// put back re-extraction if it was set
rtabmap_->parseParameters(this->getRtabmapParameters());
}
// graph optimization

View File

@@ -64,7 +64,7 @@
<string name="pref_key_max_texture_distance">pref_key_max_texture_distance</string> <string name="pref_default_max_texture_distance">0</string>
<string name="pref_key_block_render">pref_key_block_render</string> <string name="pref_default_block_render">false</string>
<string name="pref_key_opt_depth">pref_key_opt_depth</string> <string name="pref_default_opt_depth">8</string>
<string name="pref_key_opt_decimation_factor">pref_key_opt_decimation_factor</string><string name="pref_default_opt_decimation_factor">80</string>
<string name="pref_key_opt_decimation_factor">pref_key_opt_decimation_factor</string><string name="pref_default_opt_decimation_factor">60</string>
<string name="pref_key_opt_color_radius">pref_key_opt_color_radius</string> <string name="pref_default_opt_color_radius">0</string>
<string name="pref_key_opt_clean_white">pref_key_opt_clean_white</string> <string name="pref_default_opt_clean_white">true</string>