mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-06 09:47:46 +08:00
Updated error messages in Preferences dialog (ROS part)
Fixed a compilation error ChangeImageRate service not found git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@573 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -29,10 +29,7 @@ PreferencesDialogROS::~PreferencesDialogROS()
|
||||
|
||||
void PreferencesDialogROS::readCameraSettings(const QString & filePath)
|
||||
{
|
||||
double imgRate = 0;
|
||||
ros::NodeHandle nh;
|
||||
nh.getParam("camera/image_hz", imgRate);
|
||||
this->setInputRate(imgRate);
|
||||
this->setInputRate(0);
|
||||
}
|
||||
|
||||
QString PreferencesDialogROS::getParamMessage()
|
||||
@@ -40,7 +37,7 @@ QString PreferencesDialogROS::getParamMessage()
|
||||
return tr("Reading parameters from the ROS server...");
|
||||
}
|
||||
|
||||
void PreferencesDialogROS::readCoreSettings(const QString & filePath)
|
||||
bool PreferencesDialogROS::readCoreSettings(const QString & filePath)
|
||||
{
|
||||
if(filePath.isEmpty())
|
||||
{
|
||||
@@ -69,14 +66,16 @@ void PreferencesDialogROS::readCoreSettings(const QString & filePath)
|
||||
else
|
||||
{
|
||||
validParameters = false;
|
||||
QString warning = tr("Failed to get some RTAB-Map parameters from ROS server, the rtabmap/core_node may be not started or some parameters won't work...");
|
||||
QString warning = tr("Failed to get some RTAB-Map parameters from ROS server, the rtabmap node may be not started or some parameters won't work...");
|
||||
ROS_ERROR("%s", warning.toStdString().c_str());
|
||||
QMessageBox::warning(this, tr("Can't read parameters from ROS server."), warning);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PreferencesDialog::readCoreSettings(filePath);
|
||||
return PreferencesDialog::readCoreSettings(filePath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user