Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
#include <nav2_rviz_plugins/include/nav2_rviz_plugins/route_tool.hpp>
Public Member Functions | |
RouteTool (QWidget *parent=nullptr) | |
void | onInitialize () override |
virtual void | save (rviz_common::Config config) const |
virtual void | load (const rviz_common::Config &config) |
Protected Attributes | |
std::unique_ptr< Ui::route_tool > | ui_ |
Here we declare our new subclass of rviz::Panel. Every panel which can be added via the Panels/Add_New_Panel menu is a subclass of rviz::Panel.
Definition at line 43 of file route_tool.hpp.
|
explicit |
This class uses Qt slots and is a subclass of QObject, so it needs the Q_OBJECT macro. QWidget subclass constructors usually take a parent widget parameter (which usually defaults to 0). At the same time, pluginlib::ClassLoader creates instances by calling the default constructor (with no arguments). Taking the parameter and giving a default of 0 let's the default constructor work and also let's someone using the class for something else to pass in a parent widget as they normally would with Qt.
Definition at line 25 of file route_tool.cpp.
References ui_.
|
virtual |
Now we declare overrides of rviz_common::Panel functions for saving and loading data from the config file. Here the data is the topic name.
Definition at line 256 of file route_tool.cpp.
|
protected |
Finally, we close up with protected member variables
Definition at line 98 of file route_tool.hpp.
Referenced by RouteTool().