mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
fixed max tango pose radius
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<!-- BEGIN_INCLUDE(manifest) -->
|
<!-- BEGIN_INCLUDE(manifest) -->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.introlab.rtabmap"
|
package="com.introlab.rtabmap"
|
||||||
android:versionCode="68"
|
android:versionCode="69"
|
||||||
android:versionName="@RTABMAP_VERSION@">
|
android:versionName="@RTABMAP_VERSION@">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ static rtabmap::Transform opticalRotation(
|
|||||||
0.0f, 0.0f, -1.0f, 0.0f);
|
0.0f, 0.0f, -1.0f, 0.0f);
|
||||||
void CameraTango::poseReceived(const Transform & pose)
|
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
|
// send pose of the camera (without optical rotation), not the device
|
||||||
Transform p = pose*deviceTColorCamera_*opticalRotation;
|
Transform p = pose*deviceTColorCamera_*opticalRotation;
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ RTABMapApp::RTABMapApp() :
|
|||||||
lastDrawnCloudsCount_(0),
|
lastDrawnCloudsCount_(0),
|
||||||
renderingTime_(0.0f),
|
renderingTime_(0.0f),
|
||||||
lastPostRenderEventTime_(0.0),
|
lastPostRenderEventTime_(0.0),
|
||||||
|
lastPoseEventTime_(0.0),
|
||||||
visualizingMesh_(false),
|
visualizingMesh_(false),
|
||||||
exportedMeshUpdated_(false),
|
exportedMeshUpdated_(false),
|
||||||
optMesh_(new pcl::TextureMesh),
|
optMesh_(new pcl::TextureMesh),
|
||||||
@@ -254,6 +255,7 @@ void RTABMapApp::onCreate(JNIEnv* env, jobject caller_activity)
|
|||||||
lastDrawnCloudsCount_ = 0;
|
lastDrawnCloudsCount_ = 0;
|
||||||
renderingTime_ = 0.0f;
|
renderingTime_ = 0.0f;
|
||||||
lastPostRenderEventTime_ = 0.0;
|
lastPostRenderEventTime_ = 0.0;
|
||||||
|
lastPoseEventTime_ = 0.0;
|
||||||
bufferedStatsData_.clear();
|
bufferedStatsData_.clear();
|
||||||
progressionStatus_.setJavaObjects(jvm, RTABMapActivity);
|
progressionStatus_.setJavaObjects(jvm, RTABMapActivity);
|
||||||
main_scene_.setBackgroundColor(backgroundColor_, backgroundColor_, backgroundColor_);
|
main_scene_.setBackgroundColor(backgroundColor_, backgroundColor_, backgroundColor_);
|
||||||
@@ -1041,6 +1043,7 @@ int RTABMapApp::Render()
|
|||||||
notifyCameraStarted = true;
|
notifyCameraStarted = true;
|
||||||
cameraJustInitialized_ = false;
|
cameraJustInitialized_ = false;
|
||||||
}
|
}
|
||||||
|
lastPoseEventTime_ = UTimer::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
rtabmap::OdometryEvent odomEvent;
|
rtabmap::OdometryEvent odomEvent;
|
||||||
@@ -1249,6 +1252,7 @@ int RTABMapApp::Render()
|
|||||||
lastDrawnCloudsCount_ = 0;
|
lastDrawnCloudsCount_ = 0;
|
||||||
renderingTime_ = 0.0f;
|
renderingTime_ = 0.0f;
|
||||||
lastPostRenderEventTime_ = 0.0;
|
lastPostRenderEventTime_ = 0.0;
|
||||||
|
lastPoseEventTime_ = 0.0;
|
||||||
bufferedStatsData_.clear();
|
bufferedStatsData_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1652,6 +1656,12 @@ int RTABMapApp::Render()
|
|||||||
rtabmapEvents.clear();
|
rtabmapEvents.clear();
|
||||||
|
|
||||||
lastPostRenderEventTime_ = UTimer::now();
|
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_)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ class RTABMapApp : public UEventsHandler {
|
|||||||
int lastDrawnCloudsCount_;
|
int lastDrawnCloudsCount_;
|
||||||
float renderingTime_;
|
float renderingTime_;
|
||||||
double lastPostRenderEventTime_;
|
double lastPostRenderEventTime_;
|
||||||
|
double lastPoseEventTime_;
|
||||||
std::map<std::string, float> bufferedStatsData_;
|
std::map<std::string, float> bufferedStatsData_;
|
||||||
|
|
||||||
bool visualizingMesh_;
|
bool visualizingMesh_;
|
||||||
|
|||||||
@@ -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);
|
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
|
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)
|
if(str!=null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user