mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Working MSCKF
This commit is contained in:
@@ -1324,7 +1324,8 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
|
||||
}
|
||||
else if(odom.info().type == (int)Odometry::kTypeF2F ||
|
||||
odom.info().type == (int)Odometry::kTypeViso2 ||
|
||||
odom.info().type == (int)Odometry::kTypeFovis)
|
||||
odom.info().type == (int)Odometry::kTypeFovis ||
|
||||
odom.info().type == (int)Odometry::kTypeMSCKF)
|
||||
{
|
||||
std::vector<cv::KeyPoint> kpts;
|
||||
cv::KeyPoint::convert(odom.info().newCorners, kpts, 7);
|
||||
@@ -1891,7 +1892,6 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
{
|
||||
_cloudViewer->updateCameraTargetPosition(poses.rbegin()->second);
|
||||
|
||||
Transform localTransform = Transform::getIdentity();
|
||||
std::map<int, Signature>::const_iterator iter = stat.getSignatures().find(poses.rbegin()->first);
|
||||
if(iter != stat.getSignatures().end())
|
||||
{
|
||||
@@ -4866,7 +4866,7 @@ void MainWindow::startDetection()
|
||||
_preferencesDialog->getSourceDriver() == PreferencesDialog::kSrcImages) &&
|
||||
!_preferencesDialog->getIMUPath().isEmpty())
|
||||
{
|
||||
if(odomStrategy != Odometry::kTypeOkvis)
|
||||
if(odomStrategy != Odometry::kTypeOkvis && odomStrategy != Odometry::kTypeMSCKF)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Source IMU Path"),
|
||||
tr("IMU path is set but odometry chosen doesn't support IMU, ignoring IMU..."), QMessageBox::Ok);
|
||||
|
||||
@@ -79,6 +79,7 @@ OdometryViewer::OdometryViewer(
|
||||
|
||||
cloudView_->setCameraTargetLocked();
|
||||
cloudView_->setGridShown(true);
|
||||
cloudView_->setFrustumShown(true);
|
||||
|
||||
QLabel * maxCloudsLabel = new QLabel("Max clouds", this);
|
||||
QLabel * voxelLabel = new QLabel("Voxel", this);
|
||||
@@ -297,6 +298,15 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
|
||||
{
|
||||
lastOdomPose_ = odom.pose();
|
||||
cloudView_->updateCameraTargetPosition(odom.pose());
|
||||
|
||||
if(odom.data().cameraModels().size() && !odom.data().cameraModels()[0].localTransform().isNull())
|
||||
{
|
||||
cloudView_->updateCameraFrustums(odom.pose(), odom.data().cameraModels());
|
||||
}
|
||||
else if(!odom.data().stereoCameraModel().localTransform().isNull())
|
||||
{
|
||||
cloudView_->updateCameraFrustum(odom.pose(), odom.data().stereoCameraModel());
|
||||
}
|
||||
}
|
||||
|
||||
if(scanShown_->isChecked())
|
||||
@@ -391,7 +401,8 @@ void OdometryViewer::processData(const rtabmap::OdometryEvent & odom)
|
||||
}
|
||||
else if(odom.info().type == (int)Odometry::kTypeF2F ||
|
||||
odom.info().type == (int)Odometry::kTypeViso2 ||
|
||||
odom.info().type == (int)Odometry::kTypeFovis)
|
||||
odom.info().type == (int)Odometry::kTypeFovis ||
|
||||
odom.info().type == (int)Odometry::kTypeMSCKF)
|
||||
{
|
||||
std::vector<cv::KeyPoint> kpts;
|
||||
cv::KeyPoint::convert(odom.info().newCorners, kpts, 7);
|
||||
|
||||
@@ -1121,6 +1121,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->OdomMSCKFPatchSize->setObjectName(Parameters::kOdomMSCKFPatchSize().c_str());
|
||||
_ui->OdomMSCKFFastThreshold->setObjectName(Parameters::kOdomMSCKFFastThreshold().c_str());
|
||||
_ui->OdomMSCKFMaxIteration->setObjectName(Parameters::kOdomMSCKFMaxIteration().c_str());
|
||||
_ui->OdomMSCKFMaxCamStateSize->setObjectName(Parameters::kOdomMSCKFMaxCamStateSize().c_str());
|
||||
_ui->OdomMSCKFTrackPrecision->setObjectName(Parameters::kOdomMSCKFTrackPrecision().c_str());
|
||||
_ui->OdomMSCKFRansacThreshold->setObjectName(Parameters::kOdomMSCKFRansacThreshold().c_str());
|
||||
_ui->OdomMSCKFStereoThreshold->setObjectName(Parameters::kOdomMSCKFStereoThreshold().c_str());
|
||||
@@ -5454,7 +5455,7 @@ void PreferencesDialog::testOdometry()
|
||||
this->getSourceDriver() == kSrcImages) &&
|
||||
!_ui->lineEdit_cameraImages_path_imu->text().isEmpty())
|
||||
{
|
||||
if(this->getOdomStrategy() != Odometry::kTypeOkvis)
|
||||
if(this->getOdomStrategy() != Odometry::kTypeOkvis && this->getOdomStrategy() != Odometry::kTypeMSCKF)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Source IMU Path"),
|
||||
tr("IMU path is set but odometry chosen doesn't support IMU, ignoring IMU..."), QMessageBox::Ok);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user