Skip to content

Commit

Permalink
Fix logo in nav2 panel (#4505)
Browse files Browse the repository at this point in the history
* Fix logo in nav2 panel

Signed-off-by: Alberto Tudela <[email protected]>

* Move icon

Signed-off-by: Alberto Tudela <[email protected]>

---------

Signed-off-by: Alberto Tudela <[email protected]>
  • Loading branch information
ajtudela authored Jun 28, 2024
1 parent 94c6421 commit 30f028d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
File renamed without changes
1 change: 0 additions & 1 deletion nav2_rviz_plugins/include/nav2_rviz_plugins/nav2_panel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ private Q_SLOTS:
QState * paused_wp_{nullptr};
QState * resumed_wp_{nullptr};

QImage * image_{nullptr};
QLabel * imgDisplayLabel_{nullptr};

// The following states are added to allow for the state of the button to only expose reset
Expand Down
5 changes: 3 additions & 2 deletions nav2_rviz_plugins/src/nav2_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "nav2_rviz_plugins/goal_common.hpp"
#include "nav2_rviz_plugins/utils.hpp"
#include "rviz_common/display_context.hpp"
#include "rviz_common/load_resource.hpp"
#include "ament_index_cpp/get_package_share_directory.hpp"
#include "yaml-cpp/yaml.h"
#include "geometry_msgs/msg/pose2_d.hpp"
Expand Down Expand Up @@ -523,9 +524,9 @@ Nav2Panel::Nav2Panel(QWidget * parent)
QVBoxLayout * group_box_layout = new QVBoxLayout;

QGroupBox * groupBox = new QGroupBox(tr("Tools for WP-Following"));
image_ = new QImage("src/navigation2/doc/nav2_logo_small.png");
imgDisplayLabel_ = new QLabel("");
imgDisplayLabel_->setPixmap(QPixmap::fromImage(*image_));
imgDisplayLabel_->setPixmap(
rviz_common::loadPixmap("package://nav2_rviz_plugins/icons/classes/nav2_logo_small.png"));

status_layout->addWidget(navigation_status_indicator_);
status_layout->addWidget(localization_status_indicator_);
Expand Down

0 comments on commit 30f028d

Please sign in to comment.