8 setObjectName(
"Fill trajectory");
16 QHBoxLayout *movement_type_layout =
new QHBoxLayout;
17 movement_type_layout->addWidget(
new QLabel(
"Movement type:"));
24 QHBoxLayout *approach_type_layout =
new QHBoxLayout;
25 approach_type_layout->addWidget(
new QLabel(
"Approach type:"));
33 QHBoxLayout *blend_radius_layout =
new QHBoxLayout;
34 blend_radius_layout->addWidget(
new QLabel(
"Blend radius:"));
37 speed_ =
new QDoubleSpinBox;
38 speed_->setRange(0.001, 100);
39 speed_->setSingleStep(0.1);
40 QHBoxLayout *speed_layout =
new QHBoxLayout;
41 speed_layout->addWidget(
new QLabel(
"Speed:"));
42 speed_layout->addWidget(
speed_);
48 QHBoxLayout *laser_power_layout =
new QHBoxLayout;
49 laser_power_layout->addWidget(
new QLabel(
"Laser power:"));
56 QHBoxLayout *feed_rate_layout =
new QHBoxLayout;
57 feed_rate_layout->addWidget(
new QLabel(
"Feed rate:"));
62 QVBoxLayout *scroll_widget_layout =
new QVBoxLayout();
63 QWidget *scroll_widget =
new QWidget;
64 scroll_widget->setLayout(scroll_widget_layout);
65 QScrollArea *scroll_area =
new QScrollArea;
66 scroll_area->setWidget(scroll_widget);
67 scroll_area->setWidgetResizable(
true);
68 scroll_area->setFrameShape(QFrame::NoFrame);
69 QVBoxLayout* main_layout =
new QVBoxLayout(
this);
70 main_layout->addWidget(scroll_area);
72 scroll_widget_layout->addLayout(movement_type_layout);
73 scroll_widget_layout->addLayout(approach_type_layout);
74 scroll_widget_layout->addLayout(blend_radius_layout);
75 scroll_widget_layout->addLayout(speed_layout);
76 scroll_widget_layout->addLayout(laser_power_layout);
77 scroll_widget_layout->addLayout(feed_rate_layout);
78 scroll_widget_layout->addStretch(1);
94 pub_ =
nh_.
advertise<ram_msgs::AdditiveManufacturingParams>(
"ram/fill_trajectory/parameters", 1);
113 Q_EMIT setEnabled(
false);
122 speed_->setSuffix(
" meters/min");
127 Q_EMIT setEnabled(
true);
132 Q_EMIT setEnabled(
false);
142 Q_EMIT setEnabled(
true);
148 Q_EMIT setEnabled(
false);
159 "Published message will be lost: ",
160 QString::fromStdString(
pub_.
getTopic() +
" has no subscriber"),
"");
165 Q_EMIT setEnabled(
true);
173 float tmp_float(0.01);
175 if (config.
mapGetInt(
"movement_type", &tmp_int))
178 if (config.
mapGetInt(
"approach_type", &tmp_int))
181 if (config.
mapGetFloat(
"blend_radius", &tmp_float))
185 speed_->setValue(tmp_float);
208 Q_EMIT setEnabled(
false);
211 Q_EMIT setEnabled(
true);
233 const QString message,
234 const QString info_msg)
236 bool old_state(isEnabled());
237 Q_EMIT setEnabled(
false);
239 msg_box.setWindowTitle(title);
240 msg_box.setText(message);
241 msg_box.setInformativeText(info_msg);
242 msg_box.setIcon(QMessageBox::Critical);
243 msg_box.setStandardButtons(QMessageBox::Ok);
245 Q_EMIT setEnabled(old_state);
void movementTypeChanged()
void approachTypeChanged()
virtual ~FillTrajectory()
void publish(const boost::shared_ptr< M > &message) const
double conversion_factor_
void load(const rviz::Config &config)
bool mapGetFloat(const QString &key, float *value_out) const
QDoubleSpinBox * feed_rate_
FillTrajectory(QWidget *parent=NULL)
void mapSetValue(const QString &key, QVariant value)
QComboBox * approach_type_
QPushButton * send_button_
virtual void setName(const QString &name)
void displayErrorMessageBox(const QString, const QString, const QString)
void displayErrorBoxHandler(const QString title, const QString message, const QString info_msg)
void updateInternalParameters()
ram_msgs::AdditiveManufacturingParams params_
void save(rviz::Config config) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
bool mapGetInt(const QString &key, int *value_out) const
uint32_t getNumSubscribers() const
void sendInformationButtonHandler()
virtual void save(Config config) const
std::string getTopic() const
virtual void load(const Config &config)
ROSCPP_DECL void spinOnce()
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
QComboBox * movement_type_
void sendLoadedInformation()