mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
added new statistics (features extracted current image, local map size) shown in GUI for Odometry
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1719 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -342,7 +342,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) :
|
||||
connect(this, SIGNAL(statsReceived(rtabmap::Statistics)), this, SLOT(processStats(rtabmap::Statistics)));
|
||||
|
||||
qRegisterMetaType<rtabmap::SensorData>("rtabmap::SensorData");
|
||||
connect(this, SIGNAL(odometryReceived(rtabmap::SensorData, int, float)), this, SLOT(processOdometry(rtabmap::SensorData, int, float)));
|
||||
connect(this, SIGNAL(odometryReceived(rtabmap::SensorData, int, float, int, int)), this, SLOT(processOdometry(rtabmap::SensorData, int, float, int, int)));
|
||||
|
||||
connect(this, SIGNAL(noMoreImagesReceived()), this, SLOT(stopDetection()));
|
||||
|
||||
@@ -531,7 +531,7 @@ void MainWindow::handleEvent(UEvent* anEvent)
|
||||
!_processingStatistics)
|
||||
{
|
||||
_lastOdometryProcessed = false; // if we receive too many odometry events!
|
||||
emit odometryReceived(odomEvent->data(), odomEvent->quality(), odomEvent->time());
|
||||
emit odometryReceived(odomEvent->data(), odomEvent->quality(), odomEvent->time(), odomEvent->features(), odomEvent->localMapSize());
|
||||
}
|
||||
}
|
||||
else if(anEvent->getClassName().compare("ULogEvent") == 0)
|
||||
@@ -554,7 +554,7 @@ void MainWindow::handleEvent(UEvent* anEvent)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::processOdometry(const rtabmap::SensorData & data, int quality, float time)
|
||||
void MainWindow::processOdometry(const rtabmap::SensorData & data, int quality, float time, int features, int localMapSize)
|
||||
{
|
||||
Transform pose = data.pose();
|
||||
if(pose.isNull())
|
||||
@@ -584,6 +584,14 @@ void MainWindow::processOdometry(const rtabmap::SensorData & data, int quality,
|
||||
{
|
||||
_ui->statsToolBox->updateStat("Odometry/Time/ms", (float)data.id(), (float)time*1000.0f);
|
||||
}
|
||||
if(features >=0)
|
||||
{
|
||||
_ui->statsToolBox->updateStat("Odometry/Features/", (float)data.id(), (float)features);
|
||||
}
|
||||
if(localMapSize >=0)
|
||||
{
|
||||
_ui->statsToolBox->updateStat("Odometry/LocalMapSize/", (float)data.id(), (float)localMapSize);
|
||||
}
|
||||
if(!pose.isNull())
|
||||
{
|
||||
_lastOdomPose = pose;
|
||||
|
||||
Reference in New Issue
Block a user