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

@@ -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_;