fixed max tango pose radius

This commit is contained in:
matlabbe
2017-10-29 10:48:04 -04:00
parent 461dba87db
commit 85273b9ed7
5 changed files with 18 additions and 3 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="68"
android:versionCode="69"
android:versionName="@RTABMAP_VERSION@">
<uses-permission android:name="android.permission.CAMERA" />

View File

@@ -505,7 +505,7 @@ static rtabmap::Transform opticalRotation(
0.0f, 0.0f, -1.0f, 0.0f);
void CameraTango::poseReceived(const Transform & pose)
{
if(!pose.isNull() && pose.getNormSquared() < 100000)
if(!pose.isNull())
{
// send pose of the camera (without optical rotation), not the device
Transform p = pose*deviceTColorCamera_*opticalRotation;

View File

@@ -184,6 +184,7 @@ RTABMapApp::RTABMapApp() :
lastDrawnCloudsCount_(0),
renderingTime_(0.0f),
lastPostRenderEventTime_(0.0),
lastPoseEventTime_(0.0),
visualizingMesh_(false),
exportedMeshUpdated_(false),
optMesh_(new pcl::TextureMesh),
@@ -254,6 +255,7 @@ void RTABMapApp::onCreate(JNIEnv* env, jobject caller_activity)
lastDrawnCloudsCount_ = 0;
renderingTime_ = 0.0f;
lastPostRenderEventTime_ = 0.0;
lastPoseEventTime_ = 0.0;
bufferedStatsData_.clear();
progressionStatus_.setJavaObjects(jvm, RTABMapActivity);
main_scene_.setBackgroundColor(backgroundColor_, backgroundColor_, backgroundColor_);
@@ -1041,6 +1043,7 @@ int RTABMapApp::Render()
notifyCameraStarted = true;
cameraJustInitialized_ = false;
}
lastPoseEventTime_ = UTimer::now();
}
rtabmap::OdometryEvent odomEvent;
@@ -1249,6 +1252,7 @@ int RTABMapApp::Render()
lastDrawnCloudsCount_ = 0;
renderingTime_ = 0.0f;
lastPostRenderEventTime_ = 0.0;
lastPoseEventTime_ = 0.0;
bufferedStatsData_.clear();
}
@@ -1652,6 +1656,12 @@ int RTABMapApp::Render()
rtabmapEvents.clear();
lastPostRenderEventTime_ = UTimer::now();
if(lastPoseEventTime_>0.0 && UTimer::now()-lastPoseEventTime_ > 1.0)
{
UERROR("TangoPoseEventNotReceived");
UEventsManager::post(new rtabmap::CameraTangoEvent(10, "TangoPoseEventNotReceived", uNumber2Str(UTimer::now()-lastPoseEventTime_)));
}
}
}

View File

@@ -228,6 +228,7 @@ class RTABMapApp : public UEventsHandler {
int lastDrawnCloudsCount_;
float renderingTime_;
double lastPostRenderEventTime_;
double lastPoseEventTime_;
std::map<std::string, float> bufferedStatsData_;
bool visualizingMesh_;

View File

@@ -1385,9 +1385,13 @@ public class RTABMapActivity extends Activity implements OnClickListener, OnItem
{
str = String.format("Too close! Tip: Scan from at least ~1 meter from surfaces.", value);
}
else if(key.equals("TangoPoseEventNotReceived"))
{
str = String.format("No valid tango pose event received since %s sec.", value);
}
else
{
str = String.format("Unknown Tango event detected!? (type=%d)", type);
str = String.format("Unknown Tango event detected!? (type=%d, key=%s, value=%s)", type, key, value);
}
if(str!=null)
{