mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-10 11:59:50 +08:00
MainWindow: Odometry visualization not updated if msgs are received faster than they can be visualized. ZED: self-calibration set to true by default (should be true for ZED-M vio)
This commit is contained in:
@@ -123,7 +123,7 @@ public:
|
|||||||
bool computeOdometry = false,
|
bool computeOdometry = false,
|
||||||
float imageRate=0.0f,
|
float imageRate=0.0f,
|
||||||
const Transform & localTransform = Transform::getIdentity(),
|
const Transform & localTransform = Transform::getIdentity(),
|
||||||
bool selfCalibration = false);
|
bool selfCalibration = true);
|
||||||
CameraStereoZed(
|
CameraStereoZed(
|
||||||
const std::string & svoFilePath,
|
const std::string & svoFilePath,
|
||||||
int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
|
int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
|
||||||
@@ -132,7 +132,7 @@ public:
|
|||||||
bool computeOdometry = false,
|
bool computeOdometry = false,
|
||||||
float imageRate=0.0f,
|
float imageRate=0.0f,
|
||||||
const Transform & localTransform = Transform::getIdentity(),
|
const Transform & localTransform = Transform::getIdentity(),
|
||||||
bool selfCalibration = false);
|
bool selfCalibration = true);
|
||||||
virtual ~CameraStereoZed();
|
virtual ~CameraStereoZed();
|
||||||
|
|
||||||
virtual bool init(const std::string & calibrationFolder = ".", const std::string & cameraName = "");
|
virtual bool init(const std::string & calibrationFolder = ".", const std::string & cameraName = "");
|
||||||
|
|||||||
@@ -1000,16 +1000,17 @@ SensorData CameraStereoZed::captureImage(CameraInfo * info)
|
|||||||
{
|
{
|
||||||
UTimer timer;
|
UTimer timer;
|
||||||
bool res = zed_->grab(rparam);
|
bool res = zed_->grab(rparam);
|
||||||
while (src_ == CameraVideo::kUsbDevice && res && timer.elapsed() < 2.0)
|
while (src_ == CameraVideo::kUsbDevice && res!=sl::SUCCESS && timer.elapsed() < 2.0)
|
||||||
{
|
{
|
||||||
// maybe there is a latency with the USB, try again in 10 ms (for the next 2 seconds)
|
// maybe there is a latency with the USB, try again in 10 ms (for the next 2 seconds)
|
||||||
uSleep(10);
|
uSleep(10);
|
||||||
res = zed_->grab(rparam);
|
res = zed_->grab(rparam);
|
||||||
}
|
}
|
||||||
if(!res)
|
if(res==sl::SUCCESS)
|
||||||
{
|
{
|
||||||
// get left image
|
// get left image
|
||||||
sl::Mat tmp;zed_->retrieveImage(tmp,sl::VIEW_LEFT);
|
sl::Mat tmp;
|
||||||
|
zed_->retrieveImage(tmp,sl::VIEW_LEFT);
|
||||||
cv::Mat rgbaLeft = slMat2cvMat(tmp);
|
cv::Mat rgbaLeft = slMat2cvMat(tmp);
|
||||||
|
|
||||||
cv::Mat left;
|
cv::Mat left;
|
||||||
|
|||||||
@@ -874,13 +874,7 @@ bool MainWindow::handleEvent(UEvent* anEvent)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we receive too many odometry events! just send without data
|
// we receive too many odometry events! ignore them
|
||||||
SensorData data(cv::Mat(), cameraEvent->data().id(), cameraEvent->data().stamp());
|
|
||||||
data.setCameraModels(cameraEvent->data().cameraModels());
|
|
||||||
data.setStereoCameraModel(cameraEvent->data().stereoCameraModel());
|
|
||||||
data.setGroundTruth(cameraEvent->data().groundTruth());
|
|
||||||
OdometryEvent tmp(data, cameraEvent->info().odomPose, odomInfo);
|
|
||||||
emit odometryReceived(tmp, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1622,7 +1622,7 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox)
|
|||||||
_ui->spinBox_stereo_right_device->setValue(-1);
|
_ui->spinBox_stereo_right_device->setValue(-1);
|
||||||
_ui->comboBox_stereoZed_resolution->setCurrentIndex(2);
|
_ui->comboBox_stereoZed_resolution->setCurrentIndex(2);
|
||||||
_ui->comboBox_stereoZed_quality->setCurrentIndex(1);
|
_ui->comboBox_stereoZed_quality->setCurrentIndex(1);
|
||||||
_ui->checkbox_stereoZed_selfCalibration->setChecked(false);
|
_ui->checkbox_stereoZed_selfCalibration->setChecked(true);
|
||||||
_ui->comboBox_stereoZed_sensingMode->setCurrentIndex(0);
|
_ui->comboBox_stereoZed_sensingMode->setCurrentIndex(0);
|
||||||
_ui->spinBox_stereoZed_confidenceThr->setValue(100);
|
_ui->spinBox_stereoZed_confidenceThr->setValue(100);
|
||||||
_ui->checkbox_stereoZed_odom->setChecked(false);
|
_ui->checkbox_stereoZed_odom->setChecked(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user