Added stereo support for TYPE_8UC1 encoding and "Kannala Brandt4" (fisheye) distortion model (OpenLORIS).

This commit is contained in:
matlabbe
2021-04-02 19:08:58 -04:00
parent 56e1d6335e
commit 23c06875b9
4 changed files with 83 additions and 20 deletions
+7 -2
View File
@@ -95,7 +95,8 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) :
ROS_INFO("rtabmapviz: Using configuration from \"%s\"", configFile.toStdString().c_str());
uSleep(500);
mainWindow_ = new MainWindow(new PreferencesDialogROS(configFile));
prefDialog_ = new PreferencesDialogROS(configFile);
mainWindow_ = new MainWindow(prefDialog_);
mainWindow_->setWindowTitle(mainWindow_->windowTitle()+" [ROS]");
mainWindow_->show();
bool paused = false;
@@ -699,6 +700,10 @@ void GuiWrapper::commonStereoCallback(
{
lastOdomInfoUpdateTime_ = UTimer::now();
ParametersMap allParameters = prefDialog_->getAllParameters();
bool imagesAlreadyRectified = Parameters::defaultRtabmapImagesAlreadyRectified();
Parameters::parse(allParameters, Parameters::kRtabmapImagesAlreadyRectified(), imagesAlreadyRectified);
if(!rtabmap_ros::convertStereoMsg(
leftImageMsg,
rightImageMsg,
@@ -712,7 +717,7 @@ void GuiWrapper::commonStereoCallback(
stereoModel,
tfListener_,
waitForTransform_?waitForTransformDuration_:0.0,
true))
imagesAlreadyRectified))
{
ROS_ERROR("Could not convert stereo msgs! Aborting rtabmapviz update...");
return;