Skip to content

Commit

Permalink
[MSA] Open a directory where setup_assistant.launch was started. (mov…
Browse files Browse the repository at this point in the history
…eit#509)

**Issue**
When editing an existing moveit_config pkg, MSA opens the location of MSA packace, which is useless.

**Approach with the suggested change**
Opens the "current" directory where `setup_assistant.launch` was started, which is often where the existing moveit_config package you'd like to edit is located.
  • Loading branch information
130s authored and v4hn committed May 20, 2017
1 parent 781d35c commit f36b720
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions moveit_setup_assistant/src/widgets/setup_assistant_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <QPushButton>
#include <QCloseEvent>
#include <QMessageBox>
#include <QString>
#include <pluginlib/class_loader.h> // for loading all avail kinematic planners
// Rviz
#include <rviz/render_panel.h>
Expand Down Expand Up @@ -106,6 +107,16 @@ SetupAssistantWidget::SetupAssistantWidget(QWidget* parent, boost::program_optio
ssw_->stack_path_->setPath(args["config_pkg"].as<std::string>());
ssw_->select_mode_->btn_exist_->click();
}
else
{
// Open the directory where the MSA was started from.
// cf. http://stackoverflow.com/a/7413516/577001
QString pwdir("");
char* pwd;
pwd = getenv("PWD");
pwdir.append(pwd);
ssw_->stack_path_->setPath(pwdir);
}

// Add Navigation Buttons (but do not load widgets yet except start screen)
nav_name_list_ << "Start";
Expand Down

0 comments on commit f36b720

Please sign in to comment.