Updated rtabmap_demos launch files with new structure.

This commit is contained in:
matlabbe
2023-03-04 14:24:18 -08:00
parent 523b4c6e6a
commit a7675b7c09
28 changed files with 166 additions and 152 deletions
+5 -5
View File
@@ -49,7 +49,7 @@ int main(int argc, char** argv)
ULogger::setType(ULogger::kTypeConsole);
ULogger::setLevel(ULogger::kWarning);
ros::init(argc, argv, "rtabmapviz");
ros::init(argc, argv, "rtabmap_viz");
app = new QApplication(argc, argv);
app->connect( app, SIGNAL( lastWindowClosed() ), app, SLOT( quit() ) );
@@ -68,16 +68,16 @@ int main(int argc, char** argv)
spinner = new ros::AsyncSpinner(1); // Use 1 thread
spinner->start();
ROS_INFO("rtabmapviz started.");
ROS_INFO("rtabmap_viz started.");
// Now wait for application to finish
int r = app->exec();// MUST be called by the Main Thread
ROS_INFO("rtabmapviz stopping spinner...");
ROS_INFO("rtabmap_viz stopping spinner...");
delete spinner;
ROS_INFO("rtabmapviz deleting qt stuff...");
ROS_INFO("rtabmap_viz deleting qt stuff...");
delete gui;
delete app;
ROS_INFO("rtabmapviz: All done! Closing...");
ROS_INFO("rtabmap_viz: All done! Closing...");
return r;
}
+12 -12
View File
@@ -98,7 +98,7 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) :
pnh.param("rtabmap", rtabmapNodeName_, rtabmapNodeName_);
ROS_INFO("rtabmapviz: Using configuration from \"%s\"", configFile.toStdString().c_str());
ROS_INFO("rtabmap_viz: Using configuration from \"%s\"", configFile.toStdString().c_str());
uSleep(500);
prefDialog_ = new PreferencesDialogROS(configFile, rtabmapNodeName_);
mainWindow_ = new MainWindow(prefDialog_);
@@ -127,7 +127,7 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) :
{
initCachePath = UDirectory::currentDir(true) + initCachePath;
}
ROS_INFO("rtabmapviz: Initializing cache with local database \"%s\"", initCachePath.c_str());
ROS_INFO("rtabmap_viz: Initializing cache with local database \"%s\"", initCachePath.c_str());
uSleep(2000); // make sure rtabmap node is created if launched at the same time
rtabmap_msgs::GetMap getMapSrv;
getMapSrv.request.global = false;
@@ -136,7 +136,7 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) :
if(!ros::service::call("get_map", getMapSrv))
{
ROS_WARN("Can't call \"get_map\" service. The cache will still be loaded "
"but the clouds won't be created until next time rtabmapviz "
"but the clouds won't be created until next time rtabmap_viz "
"receives the optimized graph.");
}
else
@@ -189,7 +189,7 @@ void GuiWrapper::infoMapCallback(
const rtabmap_msgs::InfoConstPtr & infoMsg,
const rtabmap_msgs::MapDataConstPtr & mapMsg)
{
//ROS_INFO("rtabmapviz: RTAB-Map info ex received!");
//ROS_INFO("rtabmap_viz: RTAB-Map info ex received!");
// Map from ROS struct to rtabmap struct
rtabmap::Statistics stat;
@@ -567,7 +567,7 @@ void GuiWrapper::commonMultiCameraCallback(
waitForTransform_?waitForTransformDuration_:0.0,
imagesAlreadyRectified))
{
ROS_ERROR("Could not convert rgb/depth msgs! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert rgb/depth msgs! Aborting rtabmap_viz update...");
return;
}
}
@@ -583,7 +583,7 @@ void GuiWrapper::commonMultiCameraCallback(
tfListener_,
waitForTransform_?waitForTransformDuration_:0))
{
ROS_ERROR("Could not convert laser scan msg! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert laser scan msg! Aborting rtabmap_viz update...");
return;
}
}
@@ -598,7 +598,7 @@ void GuiWrapper::commonMultiCameraCallback(
tfListener_,
waitForTransform_?waitForTransformDuration_:0))
{
ROS_ERROR("Could not convert 3d laser scan msg! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert 3d laser scan msg! Aborting rtabmap_viz update...");
return;
}
}
@@ -756,7 +756,7 @@ void GuiWrapper::commonStereoCallback(
waitForTransform_?waitForTransformDuration_:0.0,
imagesAlreadyRectified))
{
ROS_ERROR("Could not convert stereo msgs! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert stereo msgs! Aborting rtabmap_viz update...");
return;
}
@@ -771,7 +771,7 @@ void GuiWrapper::commonStereoCallback(
tfListener_,
waitForTransform_?waitForTransformDuration_:0))
{
ROS_ERROR("Could not convert laser scan msg! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert laser scan msg! Aborting rtabmap_viz update...");
return;
}
}
@@ -786,7 +786,7 @@ void GuiWrapper::commonStereoCallback(
tfListener_,
waitForTransform_?waitForTransformDuration_:0))
{
ROS_ERROR("Could not convert 3d laser scan msg! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert 3d laser scan msg! Aborting rtabmap_viz update...");
return;
}
}
@@ -918,7 +918,7 @@ void GuiWrapper::commonLaserScanCallback(
tfListener_,
waitForTransform_?waitForTransformDuration_:0))
{
ROS_ERROR("Could not convert laser scan msg! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert laser scan msg! Aborting rtabmap_viz update...");
return;
}
}
@@ -933,7 +933,7 @@ void GuiWrapper::commonLaserScanCallback(
tfListener_,
waitForTransform_?waitForTransformDuration_:0))
{
ROS_ERROR("Could not convert 3d laser scan msg! Aborting rtabmapviz update...");
ROS_ERROR("Could not convert 3d laser scan msg! Aborting rtabmap_viz update...");
return;
}
}
+7 -7
View File
@@ -118,7 +118,7 @@ bool PreferencesDialogROS::readCoreSettings(const QString & filePath)
}
ros::NodeHandle rnh(rtabmapNodeName_);
ROS_INFO("rtabmapviz: %s", this->getParamMessage().toStdString().c_str());
ROS_INFO("rtabmap_viz: %s", this->getParamMessage().toStdString().c_str());
bool validParameters = true;
int readCount = 0;
rtabmap::ParametersMap parameters = rtabmap::Parameters::getDefaultParameters();
@@ -145,7 +145,7 @@ bool PreferencesDialogROS::readCoreSettings(const QString & filePath)
{
if(!warned)
{
ROS_INFO("rtabmapviz: Cannot get rtabmap's parameters, waiting max 5 seconds in case the node has just been launched.");
ROS_INFO("rtabmap_viz: Cannot get rtabmap's parameters, waiting max 5 seconds in case the node has just been launched.");
warned = true;
}
uSleep(100);
@@ -154,11 +154,11 @@ bool PreferencesDialogROS::readCoreSettings(const QString & filePath)
{
if(UTimer::now()-stamp < 5.0)
{
ROS_INFO("rtabmapviz: rtabmap's parameters seem now there! continuing...");
ROS_INFO("rtabmap_viz: rtabmap's parameters seem now there! continuing...");
}
else
{
ROS_WARN("rtabmapviz: rtabmap's parameters seem not all there yet! continuing with those there if some...");
ROS_WARN("rtabmap_viz: rtabmap's parameters seem not all there yet! continuing with those there if some...");
}
}
}
@@ -207,17 +207,17 @@ bool PreferencesDialogROS::readCoreSettings(const QString & filePath)
}
else
{
ROS_WARN("rtabmapviz: Parameter %s not found", i->first.c_str());
ROS_WARN("rtabmap_viz: Parameter %s not found", i->first.c_str());
validParameters = false;
}
}
}
ROS_INFO("rtabmapviz: Parameters read = %d", readCount);
ROS_INFO("rtabmap_viz: Parameters read = %d", readCount);
if(validParameters)
{
ROS_INFO("rtabmapviz: Parameters successfully read.");
ROS_INFO("rtabmap_viz: Parameters successfully read.");
}
else
{