9 setObjectName(
"Trajectory info");
13 file_->setWordWrap(
true);
27 QVBoxLayout *scroll_widget_layout =
new QVBoxLayout();
28 QWidget *scroll_widget =
new QWidget;
29 scroll_widget->setLayout(scroll_widget_layout);
30 QScrollArea *scroll_area =
new QScrollArea;
31 scroll_area->setWidget(scroll_widget);
32 scroll_area->setWidgetResizable(
true);
33 scroll_area->setFrameShape(QFrame::NoFrame);
34 QVBoxLayout* main_layout =
new QVBoxLayout(
this);
35 main_layout->addWidget(scroll_area);
37 QGridLayout* grid_layout =
new QGridLayout;
38 scroll_widget_layout->addLayout(grid_layout);
40 grid_layout->addWidget(
new QLabel(
"File:"), 0, 0);
41 grid_layout->addWidget(
file_, 0, 1);
43 grid_layout->addWidget(
new QLabel(
"Generated at:"));
46 grid_layout->addWidget(
new QLabel(
"Modified at:"));
49 grid_layout->addWidget(
new QLabel(
"Similar layers:"));
52 grid_layout->addWidget(
new QLabel(
"Number of layers levels:"));
55 grid_layout->addWidget(
new QLabel(
"Number of layers indices:"));
58 grid_layout->addWidget(
new QLabel(
"Number of polygons:"));
61 grid_layout->addWidget(
new QLabel(
"Number of poses:"));
64 grid_layout->addWidget(
new QLabel(
"Trajectory length:"));
67 grid_layout->addWidget(
new QLabel(
"Execution time:"));
70 grid_layout->addWidget(
new QLabel(
"Wire length:"));
73 grid_layout->addWidget(
new QLabel(
"Information:"));
88 Q_EMIT setEnabled(
false);
96 "RViz panel " <<
getName().toStdString() <<
" topic " <<
sub_.
getTopic() <<
" has at least one publisher");
102 "RViz panel " <<
getName().toStdString() <<
" topic " <<
sub_.
getTopic() <<
" has zero publishers!");
107 Q_EMIT setEnabled(
true);
112 std::lock_guard<std::recursive_mutex> lock(
msg_mutex_);
119 std::lock_guard<std::recursive_mutex> lock(
msg_mutex_);
120 file_->setText(QString::fromStdString(
msg_.file));
122 time.setTime_t(uint(
msg_.generated.toSec()));
123 generated_->setText(time.toString(
"dd/MM/yyyy - hh:mm:ss"));
124 time.setTime_t(uint(
msg_.modified.toSec()));
125 modified_->setText(time.toString(
"dd/MM/yyyy - hh:mm:ss"));
132 execution_time_->setText(QDateTime::fromMSecsSinceEpoch(
msg_.execution_time * 1000.0).toUTC().toString(
"hh:mm:ss"));
133 wire_length_->setText(QString::number(
msg_.wire_length,
'f', 1) +
" meters");
void updateGUIFromParameters()
QLabel * number_of_poses_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void save(rviz::Config config) const
QLabel * number_of_polygons_
virtual void setName(const QString &name)
QLabel * number_of_layers_indices_
void load(const rviz::Config &config)
void checkForPublishers()
uint32_t getNumPublishers() const
std::string getTopic() const
virtual QString getName() const
void callback(const ram_msgs::AdditiveManufacturingTrajectoryInfoConstPtr &msg)
#define ROS_INFO_STREAM(args)
QLabel * trajectory_length_
QLabel * number_of_layers_levels_
virtual void save(Config config) const
TrajInfo(QWidget *parent=NULL)
#define ROS_ERROR_STREAM(args)
virtual void load(const Config &config)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
ram_msgs::AdditiveManufacturingTrajectoryInfo msg_
std::recursive_mutex msg_mutex_