Skip to content

Commit

Permalink
Fix size of text
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Tudela <[email protected]>
  • Loading branch information
ajtudela committed Jun 21, 2024
1 parent 46b4798 commit 0ed7f18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions nav2_rviz_plugins/src/docking_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ DockingPanel::DockingPanel(QWidget * parent)
docking_feedback_indicator_->setText(getDockFeedbackLabel());
docking_goal_status_indicator_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
docking_feedback_indicator_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
nav_to_staging_checkbox_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
nav_to_staging_checkbox_->setFixedWidth(150);

info_layout_->addWidget(docking_goal_status_indicator_);
info_layout_->addWidget(docking_result_indicator_);
Expand Down Expand Up @@ -241,8 +241,9 @@ void DockingPanel::startDocking()
goal_msg.dock_type = combo_box->currentText().toStdString();

RCLCPP_INFO(
client_node_->get_logger(), "DockRobot will be called using dock pose: (%f, %f)",
goal_msg.dock_pose.pose.position.x, goal_msg.dock_pose.pose.position.y);
client_node_->get_logger(), "DockRobot will be called using dock pose: (%f, %f) and type: %s",
goal_msg.dock_pose.pose.position.x, goal_msg.dock_pose.pose.position.y,
goal_msg.dock_type.c_str());
}

// Enable result awareness by providing an empty lambda function
Expand Down
12 changes: 6 additions & 6 deletions nav2_rviz_plugins/src/nav2_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ Nav2Panel::Nav2Panel(QWidget * parent)
const char * nft_goal_msg = "Start navigating through poses";
const char * cancel_waypoint_msg = "Cancel waypoint / viapoint accumulation mode";

const QString navigation_active("<table><tr><td width=100><b>Navigation:</b></td>"
const QString navigation_active("<table><tr><td width=150><b>Navigation:</b></td>"
"<td><font color=green>active</color></td></tr></table>");
const QString navigation_inactive("<table><tr><td width=100><b>Navigation:</b></td>"
const QString navigation_inactive("<table><tr><td width=150><b>Navigation:</b></td>"
"<td>inactive</td></tr></table>");
const QString navigation_unknown("<table><tr><td width=100><b>Navigation:</b></td>"
const QString navigation_unknown("<table><tr><td width=150><b>Navigation:</b></td>"
"<td>unknown</td></tr></table>");
const QString localization_active("<table><tr><td width=100><b>Localization:</b></td>"
const QString localization_active("<table><tr><td width=150><b>Localization:</b></td>"
"<td><font color=green>active</color></td></tr></table>");
const QString localization_inactive("<table><tr><td width=100><b>Localization:</b></td>"
const QString localization_inactive("<table><tr><td width=150><b>Localization:</b></td>"
"<td>inactive</td></tr></table>");
const QString localization_unknown("<table><tr><td width=100><b>Localization:</b></td>"
const QString localization_unknown("<table><tr><td width=150><b>Localization:</b></td>"
"<td>unknown</td></tr></table>");

navigation_status_indicator_->setText(navigation_unknown);
Expand Down
2 changes: 1 addition & 1 deletion nav2_rviz_plugins/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ QString getGoalStatusLabel(std::string title, int8_t status)
}
return QString(
std::string(
"<table><tr><td width=100><b>" + title + ":</b></td><td>" +
"<table><tr><td width=150><b>" + title + ":</b></td><td>" +
status_str + "</td></tr></table>").c_str());
}

Expand Down

0 comments on commit 0ed7f18

Please sign in to comment.