5 #include <QRadioButton> 7 #include <QDoubleSpinBox> 11 #include <QtConcurrent/QtConcurrentRun> 18 setObjectName(
"PathPlanningWidget_");
19 QLabel* surfacing_mode_label =
new QLabel(
"Surfacing mode ");
22 QHBoxLayout* surfacing_mode_layout =
new QHBoxLayout;
23 surfacing_mode_layout->addWidget(surfacing_mode_label);
32 QHBoxLayout* depth_of_pass_layout =
new QHBoxLayout;
36 QLabel* covering_percentage_label =
new QLabel(
"Covering percentage:");
41 QHBoxLayout* covering_percentage_layout =
new QHBoxLayout;
42 covering_percentage_layout->addWidget(covering_percentage_label);
45 QLabel* extrication_radius_label =
new QLabel(
"Extrication radius:");
50 QHBoxLayout* extrication_radius_layout =
new QHBoxLayout;
51 extrication_radius_layout->addWidget(extrication_radius_label);
54 QLabel* grind_diameter_label =
new QLabel(
"Grinder width:");
60 QHBoxLayout* grind_diameter_layout =
new QHBoxLayout;
61 grind_diameter_layout->addWidget(grind_diameter_label);
64 QLabel* lean_angle_axis_label =
new QLabel(
"Axis of rotation:");
68 QHBoxLayout* lean_angle_axis_layout =
new QHBoxLayout;
69 lean_angle_axis_layout->addWidget(lean_angle_axis_label);
70 lean_angle_axis_layout->addStretch(1);
74 lean_angle_axis_layout->addStretch(1);
76 QLabel* angle_value_label =
new QLabel(
"Angle value:");
80 QHBoxLayout* angle_value_layout =
new QHBoxLayout;
81 angle_value_layout->addWidget(angle_value_label);
87 QLabel* trajectory_z_offset_label =
new QLabel(
"Trajectory Z offset:");
91 QHBoxLayout* trajectory_z_offset_layout =
new QHBoxLayout();
92 trajectory_z_offset_layout->addWidget(trajectory_z_offset_label);
99 QVBoxLayout* path_planning_layout =
new QVBoxLayout(
this);
100 path_planning_layout->addLayout(surfacing_mode_layout);
101 path_planning_layout->addLayout(depth_of_pass_layout);
102 path_planning_layout->addLayout(covering_percentage_layout);
103 path_planning_layout->addLayout(extrication_radius_layout);
104 path_planning_layout->addLayout(grind_diameter_layout);
105 path_planning_layout->addLayout(lean_angle_axis_layout);
106 path_planning_layout->addLayout(angle_value_layout);
107 path_planning_layout->addStretch(2);
109 path_planning_layout->addStretch(1);
110 path_planning_layout->addWidget(trajectory_z_offset_label);
113 path_planning_layout->addStretch(8);
149 Q_EMIT
sendStatus(QString::fromStdString(msg->data));
212 const QString scan_filename)
215 defect_mesh_file +=
"/meshes/DAC_580813_defect.ply";
228 std::vector<bool> tmp;
257 msgBox.setText(
"Values have been modified");
258 msgBox.setIcon(QMessageBox::Warning);
259 msgBox.setInformativeText(
"If you continue, you will deal with an old trajectory");
260 msgBox.setStandardButtons(QMessageBox::Abort | QMessageBox::Ok);
261 msgBox.setDefaultButton(QMessageBox::Ok);
263 if(msgBox.exec() == QMessageBox::Abort)
302 Q_EMIT
sendMsgBox(
"Error in path planning service",
342 ROS_INFO_STREAM(objectName().toStdString() +
" service connections have been made");
379 if (config.
mapGetBool(objectName() +
"surfacing_mode", &tmp_bool))
383 if (config.
mapGetInt(objectName() +
"covering_percentage", &tmp_int))
388 if (config.
mapGetInt(objectName() +
"extrication_radius", &tmp_int))
393 if (config.
mapGetInt(objectName() +
"grinder_width", &tmp_int))
398 if (config.
mapGetInt(objectName() +
"depth_of_path", &tmp_int))
403 if (config.
mapGetBool(objectName() +
"radio_x", &tmp_bool))
405 if (config.
mapGetBool(objectName() +
"radio_y", &tmp_bool))
407 if (config.
mapGetBool(objectName() +
"radio_z", &tmp_bool))
414 if (config.
mapGetFloat(objectName() +
"angle_value", &tmp_float))
419 if (config.
mapGetFloat(objectName() +
"trajectory_z_offset", &tmp_float))
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
bool call(MReq &req, MRes &res)
bool mapGetFloat(const QString &key, float *value_out) const
void mapSetValue(const QString &key, QVariant value)
bool waitForExistence(ros::Duration timeout=ros::Duration(-1))
bool mapGetBool(const QString &key, bool *value_out) const
#define ROS_WARN_STREAM(args)
bool mapGetInt(const QString &key, int *value_out) const
ROSLIB_DECL std::string getPath(const std::string &package_name)
#define ROS_INFO_STREAM(args)