Skip to content

Commit

Permalink
updating to 2x2 version
Browse files Browse the repository at this point in the history
Signed-off-by: PRP <[email protected]>
  • Loading branch information
padhupradheep committed Feb 8, 2024
1 parent 100bbd5 commit 20d9044
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
4 changes: 3 additions & 1 deletion nav2_rviz_plugins/include/nav2_rviz_plugins/selector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class Selector : public rviz_common::Panel
bool plugins_loaded_ = false;

QBasicTimer timer_;
QVBoxLayout * main_layout_;
QHBoxLayout * main_layout_;
QVBoxLayout * left_layout_;
QVBoxLayout * right_layout_;
QComboBox * controller_;
QComboBox * planner_;
QComboBox * goal_checker_;
Expand Down
23 changes: 14 additions & 9 deletions nav2_rviz_plugins/src/selector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,27 @@ Selector::Selector(QWidget * parent)
client_node_->create_publisher<std_msgs::msg::String>("goal_checker_selector", qos);
pub_smoother_ = client_node_->create_publisher<std_msgs::msg::String>("smoother_selector", qos);

main_layout_ = new QVBoxLayout;
main_layout_ = new QHBoxLayout;
left_layout_ = new QVBoxLayout;
right_layout_ = new QVBoxLayout;
controller_ = new QComboBox;
planner_ = new QComboBox;
goal_checker_ = new QComboBox;
smoother_ = new QComboBox;

main_layout_->setContentsMargins(10, 10, 10, 10);

main_layout_->addWidget(new QLabel("Controller"));
main_layout_->addWidget(controller_);
main_layout_->addWidget(new QLabel("Planner"));
main_layout_->addWidget(planner_);
main_layout_->addWidget(new QLabel("Goal Checker"));
main_layout_->addWidget(goal_checker_);
main_layout_->addWidget(new QLabel("Smoother"));
main_layout_->addWidget(smoother_);
left_layout_->addWidget(new QLabel("Controller"));
left_layout_->addWidget(controller_);
left_layout_->addWidget(new QLabel("Planner"));
left_layout_->addWidget(planner_);
right_layout_->addWidget(new QLabel("Goal Checker"));
right_layout_->addWidget(goal_checker_);
right_layout_->addWidget(new QLabel("Smoother"));
right_layout_->addWidget(smoother_);

main_layout_->addLayout(left_layout_);
main_layout_->addLayout(right_layout_);

setLayout(main_layout_);
timer_.start(200, this);
Expand Down

0 comments on commit 20d9044

Please sign in to comment.