Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/rviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ add_library(${PROJECT_NAME}
message_filter_display.h
mesh_loader.cpp
new_object_dialog.cpp
noetic_eol_dialog.cpp
add_display_dialog.cpp
ogre_helpers/apply_visibility_bits.cpp
ogre_helpers/arrow.cpp
Expand Down
20 changes: 20 additions & 0 deletions src/rviz/noetic_eol_dialog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <rviz/noetic_eol_dialog.h>

namespace rviz
{
NoeticEOLDialog::NoeticEOLDialog(QWidget* parent) : QMessageBox(parent)
{
setIcon(QMessageBox::Critical);
setTextFormat(Qt::RichText);
setText(
"<p>ROS Noetic goes end-of-life 2025-05-31.</p>"
"<p>Users are encouraged to migrate to ROS 2 as soon as possible!"
"Alternatively, switch to the <a href='https://ros.packages.techfak.net'>ROS One "
"distribution</a>.</p>"
"<p>For more information see <a href='https://www.ros.org/blog/noetic-eol'>this blog post</a>.</p>"
"<p>To disable this dialog, set the <code>DISABLE_ROS1_EOL_WARNINGS</code> environment "
"variable.</p>");
setWindowTitle("ROS 1 End-of-Life is May 31st, 2025");
setStandardButtons(QMessageBox::Ok);
}
} // end namespace rviz
17 changes: 17 additions & 0 deletions src/rviz/noetic_eol_dialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef RVIZ_NOETIC_EOL_DIALOG_H
#define RVIZ_NOETIC_EOL_DIALOG_H

#include <QMessageBox>

namespace rviz
{
class NoeticEOLDialog : public QMessageBox
{
Q_OBJECT
public:
NoeticEOLDialog(QWidget* parent = nullptr);
};

} // end namespace rviz

#endif // RVIZ_WAIT_FOR_MASTER_DIALOG_H
13 changes: 13 additions & 0 deletions src/rviz/visualizer_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/

#include <QApplication>
#include <QProcessEnvironment> // check env variables
#include <QTimer>

#include <boost/program_options.hpp>
Expand All @@ -54,6 +55,7 @@
#include <rviz/visualization_frame.h>
#include <rviz/visualization_manager.h>
#include <rviz/wait_for_master_dialog.h>
#include <rviz/noetic_eol_dialog.h>
#include <rviz/ogre_helpers/render_system.h>

#include <rviz/visualizer_app.h>
Expand Down Expand Up @@ -231,6 +233,17 @@ bool VisualizerApp::init(int argc, char** argv)
save_config_service_ =
private_nh.advertiseService("save_config", &VisualizerApp::saveConfigCallback, this);

// Notify users of ROS 1 EOL Date
// Get the environment variables
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
// If environment variable is not set
if(!env.contains("DISABLE_ROS1_EOL_WARNINGS"))
{
// Create a warning pop up
NoeticEOLDialog eol_dialog;
eol_dialog.exec();
}

#if CATCH_EXCEPTIONS
}
catch (std::exception& e)
Expand Down
Loading