mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-13 13:09:50 +08:00
GUI/Download map: Fixed parameters not read when downloading map
This commit is contained in:
@@ -33,11 +33,18 @@ include_directories(
|
|||||||
${catkin_INCLUDE_DIRS}
|
${catkin_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(rtabmap_viz src/GuiNode.cpp src/GuiWrapper.cpp src/PreferencesDialogROS.cpp)
|
add_executable(rtabmap_viz src/GuiNode.cpp src/GuiWrapper.cpp src/PreferencesDialogROS.cpp include/${PROJECT_NAME}/PreferencesDialogROS.h)
|
||||||
IF(Qt5_FOUND)
|
IF(Qt5_FOUND)
|
||||||
QT5_USE_MODULES(rtabmap_viz Widgets Core Gui)
|
QT5_USE_MODULES(rtabmap_viz Widgets Core Gui)
|
||||||
ENDIF(Qt5_FOUND)
|
ENDIF(Qt5_FOUND)
|
||||||
target_link_libraries(rtabmap_viz ${catkin_LIBRARIES})
|
target_link_libraries(rtabmap_viz ${catkin_LIBRARIES})
|
||||||
|
SET_TARGET_PROPERTIES(
|
||||||
|
rtabmap_viz
|
||||||
|
PROPERTIES
|
||||||
|
AUTOUIC ON
|
||||||
|
AUTOMOC ON
|
||||||
|
AUTORCC ON
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ using namespace rtabmap;
|
|||||||
|
|
||||||
class PreferencesDialogROS : public PreferencesDialog
|
class PreferencesDialogROS : public PreferencesDialog
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
PreferencesDialogROS(const QString & configFile, const std::string & rtabmapNodeName);
|
PreferencesDialogROS(const QString & configFile, const std::string & rtabmapNodeName);
|
||||||
virtual ~PreferencesDialogROS();
|
virtual ~PreferencesDialogROS();
|
||||||
@@ -43,7 +44,7 @@ public:
|
|||||||
virtual QString getTmpIniFilePath() const;
|
virtual QString getTmpIniFilePath() const;
|
||||||
bool hasAllParameters();
|
bool hasAllParameters();
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
void readRtabmapNodeParameters();
|
void readRtabmapNodeParameters();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -89,7 +89,9 @@ bool PreferencesDialogROS::hasAllParameters()
|
|||||||
rtabmap::ParametersMap parameters = rtabmap::Parameters::getDefaultParameters();
|
rtabmap::ParametersMap parameters = rtabmap::Parameters::getDefaultParameters();
|
||||||
for(rtabmap::ParametersMap::const_iterator i=parameters.begin(); i!=parameters.end(); ++i)
|
for(rtabmap::ParametersMap::const_iterator i=parameters.begin(); i!=parameters.end(); ++i)
|
||||||
{
|
{
|
||||||
if(i->first.compare(rtabmap::Parameters::kRtabmapWorkingDirectory()) != 0 && !nh.hasParam(i->first))
|
if(i->first.compare(rtabmap::Parameters::kRtabmapWorkingDirectory()) != 0 &&
|
||||||
|
!nh.hasParam(i->first) &&
|
||||||
|
i->first.find("Odom") != 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -101,7 +103,9 @@ bool PreferencesDialogROS::hasAllParameters(const ros::NodeHandle & nh, const rt
|
|||||||
{
|
{
|
||||||
for(rtabmap::ParametersMap::const_iterator i=parameters.begin(); i!=parameters.end(); ++i)
|
for(rtabmap::ParametersMap::const_iterator i=parameters.begin(); i!=parameters.end(); ++i)
|
||||||
{
|
{
|
||||||
if(i->first.compare(rtabmap::Parameters::kRtabmapWorkingDirectory()) != 0 && !nh.hasParam(i->first))
|
if(i->first.compare(rtabmap::Parameters::kRtabmapWorkingDirectory()) != 0 &&
|
||||||
|
!nh.hasParam(i->first) &&
|
||||||
|
i->first.find("Odom") != 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user