Skip to content

Commit

Permalink
feat(rtc_manager_rviz_plugin): add the number of rtc status (autoware…
Browse files Browse the repository at this point in the history
…foundation#2791)

* feat(rtc_manager_rviz_plugin): add the number of rtc status

Signed-off-by: taikitanaka3 <[email protected]>

* chore: simplify layout

Signed-off-by: taikitanaka3 <[email protected]>

---------

Signed-off-by: taikitanaka3 <[email protected]>
Co-authored-by: Tomoya Kimura <[email protected]>
  • Loading branch information
taikitanaka3 and tkimura4 committed Feb 1, 2023
1 parent f450775 commit d6c0c09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ RTCManagerPanel::RTCManagerPanel(QWidget * parent) : rviz_common::Panel(parent)
}
v_layout->addWidget(auto_mode_table_);

num_rtc_status_ptr_ = new QLabel("Init");
v_layout->addWidget(num_rtc_status_ptr_);

// lateral execution
auto * exe_path_change_layout = new QHBoxLayout;
{
Expand Down Expand Up @@ -327,6 +330,8 @@ void RTCManagerPanel::onRTCStatus(const CooperateStatusArray::ConstSharedPtr msg
{
cooperate_statuses_ptr_ = std::make_shared<CooperateStatusArray>(*msg);
rtc_table_->clearContents();
num_rtc_status_ptr_->setText(
QString::fromStdString("The Number of RTC Statuses: " + std::to_string(msg->statuses.size())));
if (msg->statuses.empty()) return;
// this is to stable rtc display not to occupy too much
size_t min_display_size{5};
Expand Down
1 change: 1 addition & 0 deletions common/rtc_manager_rviz_plugin/src/rtc_manager_panel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public Q_SLOTS:
QPushButton * wait_vel_change_button_ptr_ = {nullptr};
QPushButton * exec_button_ptr_ = {nullptr};
QPushButton * wait_button_ptr_ = {nullptr};
QLabel * num_rtc_status_ptr_ = {nullptr};

size_t column_size_ = {7};
std::string enable_auto_mode_namespace_ = "/planning/enable_auto_mode";
Expand Down

0 comments on commit d6c0c09

Please sign in to comment.