9 setObjectName(
"PathPlanning");
12 QHBoxLayout *select_algorithm_layout =
new QHBoxLayout;
13 select_algorithm_layout->addWidget(
new QLabel(
"Generation algorithm:"));
25 QVBoxLayout *scroll_widget_layout =
new QVBoxLayout();
26 QWidget *scroll_widget =
new QWidget;
27 scroll_widget->setLayout(scroll_widget_layout);
28 QScrollArea *scroll_area =
new QScrollArea;
29 scroll_area->setWidget(scroll_widget);
30 scroll_area->setWidgetResizable(
true);
31 scroll_area->setFrameShape(QFrame::NoFrame);
34 QVBoxLayout* main_layout =
new QVBoxLayout(
this);
35 main_layout->addWidget(scroll_area);
36 scroll_widget_layout->addLayout(select_algorithm_layout);
38 scroll_widget_layout->addStretch(1);
40 scroll_widget_layout->addStretch(2);
88 Q_EMIT setEnabled(
false);
102 Q_EMIT setEnabled(
true);
107 Q_EMIT setEnabled(
false);
139 Q_EMIT setEnabled(
true);
146 Q_EMIT setEnabled(
false);
152 Q_EMIT setEnabled(
true);
169 Q_EMIT setEnabled(
true);
173 const ram_path_planning::DonghongDingResultConstPtr &result)
179 if (result->error_msg.empty())
192 QString::fromStdString(result->error_msg),
208 Q_EMIT
progress_dialog_->drawProgress(feedback->progress_value, QString::fromStdString(feedback->progress_msg));
215 Q_EMIT setEnabled(
false);
221 Q_EMIT setEnabled(
true);
238 Q_EMIT setEnabled(
true);
242 const ram_path_planning::ContoursResultConstPtr &result)
248 if (result->error_msg.empty())
260 QString::fromStdString(result->error_msg),
269 Q_EMIT setEnabled(
true);
275 Q_EMIT
progress_dialog_->drawProgress(feedback->progress_value, QString::fromStdString(feedback->progress_msg));
282 Q_EMIT setEnabled(
false);
288 Q_EMIT setEnabled(
true);
305 Q_EMIT setEnabled(
true);
310 const ram_path_planning::FollowPosesResultConstPtr &result)
316 if (result->error_msg.empty())
328 QString::fromStdString(result->error_msg),
337 Q_EMIT setEnabled(
true);
343 Q_EMIT
progress_dialog_->drawProgress(feedback->progress_value, QString::fromStdString(feedback->progress_msg));
348 const QString message,
349 const QString info_msg)
351 const bool old_state(isEnabled());
352 Q_EMIT setEnabled(
false);
354 msg_box.setWindowTitle(title);
355 msg_box.setText(message);
356 msg_box.setInformativeText(info_msg);
357 msg_box.setIcon(QMessageBox::Critical);
358 msg_box.setStandardButtons(QMessageBox::Ok);
360 Q_EMIT setEnabled(old_state);
369 if (config.
mapGetInt(
"algorithm", &tmp_int))
void contoursDoneCb(const actionlib::SimpleClientGoalState &state, const ram_path_planning::ContoursResultConstPtr &result)
void contoursFeedbackCb(const ram_path_planning::ContoursFeedbackConstPtr &feedback)
QComboBox * select_algorithm_
actionlib::SimpleActionClient< ram_path_planning::ContoursAction > ContoursActionClient
ram_path_planning::FollowPoses< ram_path_planning::FollowPosesAction > follow_poses_generator
void FollowPosesFeedbackCb(const ram_path_planning::FollowPosesFeedbackConstPtr &feedback)
ContoursWidget * contours_ui_
void displayErrorBoxHandler(const QString title, const QString message, const QString info_msg)
QPushButton * generate_trajectory_button_
void donghongDingDoneCb(const actionlib::SimpleClientGoalState &state, const ram_path_planning::DonghongDingResultConstPtr &result)
const std::string description_
actionlib::SimpleActionClient< ram_path_planning::DonghongDingAction > DonghongDingActionClient
void mapSetValue(const QString &key, QVariant value)
QLabel * algorithm_description_
std::shared_ptr< ProgressDialog > progress_dialog_
virtual void setName(const QString &name)
void donghongDingButtonHandler()
void FollowPosesDoneCb(const actionlib::SimpleClientGoalState &state, const ram_path_planning::FollowPosesResultConstPtr &result)
std::unique_ptr< ContoursActionClient > contours_ac_
void displayErrorMessageBox(const QString, const QString, const QString)
const std::string service_name_
virtual QString getName() const
void FollowPosesButtonHandler()
void load(const rviz::Config &config)
void contoursButtonHandler()
std::vector< std::string > algorithm_descriptions_
bool mapGetInt(const QString &key, int *value_out) const
ram_path_planning::DonghongDingGoal donghong_ding_goal_
actionlib::SimpleActionClient< ram_path_planning::FollowPosesAction > FollowPosesActionClient
ram_path_planning::FollowPosesGoal follow_poses_goal_
std::unique_ptr< DonghongDingActionClient > donghong_ding_ac_
#define ROS_INFO_STREAM(args)
std::unique_ptr< FollowPosesActionClient > follow_poses_ac_
unsigned loaded_last_algorithm_
virtual void save(Config config) const
void save(rviz::Config config) const
virtual void load(const Config &config)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
ram_path_planning::ContoursGoal contours_goal_
PathPlanning(QWidget *parent=NULL)
void donghongDingFeedbackCb(const ram_path_planning::DonghongDingFeedbackConstPtr &feedback)
DonghongDingWidget * donghong_ding_ui_
FollowPosesWidget * follow_poses_ui_
QStackedWidget * algorithm_stacked_widget_