Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
robot_nav_rviz_plugins::NavGridDisplay Class Reference

Displays a nav_grid (of unspecified type) along the XY plane. More...

#include <nav_grid_display.h>

Inheritance diagram for robot_nav_rviz_plugins::NavGridDisplay:
Inheritance graph
[legend]

Signals

void mapUpdated (const nav_core2::UIntBounds &updated_bounds)
 Custom signal emitted when new map data is received. More...
 
- Signals inherited from rviz::Display
void timeSignal (ros::Time time, QPrivateSignal)
 
- Signals inherited from rviz::Property
void aboutToChange ()
 
void changed ()
 
void childListChanged (Property *this_property)
 

Public Member Functions

 NavGridDisplay (const std::string &data_type, bool include_ignore_property=false)
 Constructor for the display. More...
 
virtual ~NavGridDisplay ()
 
Public overrides from Display
void reset () override
 
void setTopic (const QString &topic, const QString &datatype) override
 
void update (float wall_dt, float ros_dt) override
 
- Public Member Functions inherited from rviz::Display
virtual void deleteStatus (const QString &name)
 
void deleteStatusStd (const std::string &name)
 
 Display ()
 
void emitTimeSignal (ros::Time time)
 
QWidget * getAssociatedWidget () const
 
PanelDockWidgetgetAssociatedWidgetPanel ()
 
virtual QString getClassId () const
 
Ogre::SceneNode * getSceneNode () const
 
QVariant getViewData (int column, int role) const override
 
Qt::ItemFlags getViewFlags (int column) const override
 
uint32_t getVisibilityBits ()
 
void initialize (DisplayContext *context)
 
bool isEnabled () const
 
void load (const Config &config) override
 
void save (Config config) const override
 
void setAssociatedWidget (QWidget *widget)
 
virtual void setClassId (const QString &class_id)
 
void setFixedFrame (const QString &fixed_frame)
 
void setName (const QString &name) override
 
virtual void setStatus (StatusProperty::Level level, const QString &name, const QString &text)
 
void setStatusStd (StatusProperty::Level level, const std::string &name, const std::string &text)
 
void setVisibilityBits (uint32_t bits)
 
void unsetVisibilityBits (uint32_t bits)
 
 ~Display () override
 
- Public Member Functions inherited from rviz::BoolProperty
 BoolProperty (const QString &name, bool default_value, const QString &description, P *parent, Func &&changed_slot)
 
 BoolProperty (const QString &name, bool default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver)
 
 BoolProperty (const QString &name=QString(), bool default_value=false, const QString &description=QString(), Property *parent=nullptr)
 
virtual bool getBool () const
 
bool getDisableChildren () override
 
bool getDisableChildrenIfFalse ()
 
void setDisableChildrenIfFalse (bool disable)
 
 ~BoolProperty () override
 
- Public Member Functions inherited from rviz::Property
virtual void addChild (Property *child, int index=-1)
 
PropertychildAt (int index) const
 
virtual PropertychildAtUnchecked (int index) const
 
virtual void collapse ()
 
std::enable_if<!QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type connect (const QObject *context, Func &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
QMetaObject::Connection connect (const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection)
 
std::enable_if< QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type connect (const R *receiver, Func &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
std::enable_if<!QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type connect (Func &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
bool contains (Property *possible_child) const
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 
virtual void expand ()
 
virtual QString getDescription () const
 
virtual bool getHidden () const
 
virtual QIcon getIcon () const
 
PropertyTreeModelgetModel () const
 
virtual QString getName () const
 
std::string getNameStd () const
 
PropertygetParent () const
 
virtual bool getReadOnly () const
 
virtual QVariant getValue () const
 
void hide ()
 
void insertChildSorted (Property *child)
 
bool isAncestorOf (Property *possible_child) const
 
virtual void moveChild (int from_index, int to_index)
 
virtual int numChildren () const
 
virtual bool paint (QPainter *painter, const QStyleOptionViewItem &option) const
 
 Property (const QString &name, const QVariant &default_value, const QString &description, P *parent, Func &&changed_slot)
 
 Property (const QString &name, const QVariant &default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver)
 
 Property (const QString &name=QString(), const QVariant &default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr)
 
virtual void removeChildren (int start_index=0, int count=-1)
 
int rowNumberInParent () const
 
virtual void setDescription (const QString &description)
 
virtual void setHidden (bool hidden)
 
virtual void setIcon (const QIcon &icon)
 
void setModel (PropertyTreeModel *model)
 
void setParent (Property *new_parent)
 
virtual void setReadOnly (bool read_only)
 
void setShouldBeSaved (bool save)
 
virtual bool setValue (const QVariant &new_value)
 
bool shouldBeSaved () const
 
void show ()
 
virtual PropertysubProp (const QString &sub_name)
 
PropertytakeChild (Property *child)
 
virtual PropertytakeChildAt (int index)
 
 ~Property () override
 

Protected Types

enum  IgnoreType { IgnoreType::NONE, IgnoreType::VALUE, IgnoreType::LIMIT }
 

Protected Slots

Custom events triggered by changing properties
void updateAlpha ()
 
void updateTopic ()
 
void updatePalette ()
 
void showMap (const nav_core2::UIntBounds &updated_bounds)
 
virtual void updateIgnoreType ()
 
virtual void updateIgnore ()
 

Protected Member Functions

void clear ()
 Clear the data and remove the objects from the screen. More...
 
IgnoreType getIgnoreType () const
 
virtual void onSubscribe (const std::string &topic)
 Actual subscription logic, called by subscribe. More...
 
virtual void onUnsubscribe ()
 Actual unsubscription logic, called by unsubscribe. More...
 
void subscribe ()
 Called to trigger subscription, handles empty topics setting status. More...
 
void transformMap ()
 Put the map in its proper place. More...
 
void unsubscribe ()
 Called to trigger unsubscribing. More...
 
Protected overrides from Display
void onInitialize () override
 
void fixedFrameChanged () override
 
void onEnable () override
 
void onDisable () override
 
- Protected Member Functions inherited from rviz::Display
virtual void clearStatuses ()
 
bool initialized () const
 
- Protected Member Functions inherited from rviz::Property
void loadValue (const Config &config)
 

Protected Attributes

rviz::FloatPropertyalpha_property_
 
nav_grid::NavGridInfo cached_info_
 
std::vector< std::string > color_scheme_names_
 
rviz::EnumPropertycolor_scheme_property_
 
rviz::BoolPropertydraw_behind_property_
 
rviz::IntPropertyheight_property_
 
rviz::FloatPropertyignore_property_
 
rviz::EnumPropertyignore_type_property_
 
pluginlib::ClassLoader< NavGridPalettepalette_loader_
 
nav_grid::VectorNavGrid< unsigned char > panel_data_
 
OgrePanel::Ptr panel_display_
 
rviz::FloatPropertyresolution_property_
 
rviz::RosTopicPropertytopic_property_
 
rviz::BoolPropertyunreliable_property_
 
rviz::IntPropertywidth_property_
 
- Protected Attributes inherited from rviz::Display
DisplayContextcontext_
 
QString fixed_frame_
 
Ogre::SceneManager * scene_manager_
 
Ogre::SceneNode * scene_node_
 
ros::NodeHandle threaded_nh_
 
ros::NodeHandle update_nh_
 
- Protected Attributes inherited from rviz::Property
bool child_indexes_valid_
 
QIcon icon_
 
PropertyTreeModelmodel_
 
QVariant value_
 

Additional Inherited Members

- Public Slots inherited from rviz::Display
virtual void onEnableChanged ()
 
void queueRender ()
 
void setEnabled (bool enabled)
 
void setIcon (const QIcon &icon) override
 
- Public Slots inherited from rviz::BoolProperty
bool setBool (bool value)
 

Detailed Description

Displays a nav_grid (of unspecified type) along the XY plane.

The actual object is rendered using the OgrePanel class. This class contains the rviz/QT logic for displaying the options/properties in the Displays list and connecting changes there to the appropriate events.

This class does not subscribe to any data. That functionality is relegated to subclasses which will specify the underlying data type and possibly translate it.

Definition at line 71 of file nav_grid_display.h.

Member Enumeration Documentation

◆ IgnoreType

Enumerator
NONE 
VALUE 
LIMIT 

Definition at line 120 of file nav_grid_display.h.

Constructor & Destructor Documentation

◆ NavGridDisplay()

robot_nav_rviz_plugins::NavGridDisplay::NavGridDisplay ( const std::string &  data_type,
bool  include_ignore_property = false 
)
explicit

Constructor for the display.

Parameters
data_typeThe string representing the datatype (needed for setting up topic_property_)
include_ignore_propertyWhether to include the ignore property, which is only needed by some subclasses

Specifying the ignore_property_ in the subclass would necessitate defining a separate MOC generating header for each subclass, which is a little bit of a pain, so instead, it is included in this, the parent class for a bit of cleanliness.

Definition at line 53 of file nav_grid_display.cpp.

◆ ~NavGridDisplay()

robot_nav_rviz_plugins::NavGridDisplay::~NavGridDisplay ( )
virtual

Definition at line 106 of file nav_grid_display.cpp.

Member Function Documentation

◆ clear()

void robot_nav_rviz_plugins::NavGridDisplay::clear ( )
protected

Clear the data and remove the objects from the screen.

Definition at line 291 of file nav_grid_display.cpp.

◆ fixedFrameChanged()

void robot_nav_rviz_plugins::NavGridDisplay::fixedFrameChanged ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 165 of file nav_grid_display.cpp.

◆ getIgnoreType()

IgnoreType robot_nav_rviz_plugins::NavGridDisplay::getIgnoreType ( ) const
inlineprotected

Definition at line 121 of file nav_grid_display.h.

◆ mapUpdated

void robot_nav_rviz_plugins::NavGridDisplay::mapUpdated ( const nav_core2::UIntBounds updated_bounds)
signal

Custom signal emitted when new map data is received.

◆ onDisable()

void robot_nav_rviz_plugins::NavGridDisplay::onDisable ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 140 of file nav_grid_display.cpp.

◆ onEnable()

void robot_nav_rviz_plugins::NavGridDisplay::onEnable ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 135 of file nav_grid_display.cpp.

◆ onInitialize()

void robot_nav_rviz_plugins::NavGridDisplay::onInitialize ( )
overrideprotectedvirtual

Reimplemented from rviz::Display.

Definition at line 115 of file nav_grid_display.cpp.

◆ onSubscribe()

virtual void robot_nav_rviz_plugins::NavGridDisplay::onSubscribe ( const std::string &  topic)
inlineprotectedvirtual

Actual subscription logic, called by subscribe.

Parameters
topicNonempty string with topic to subscribe to

Reimplemented in robot_nav_rviz_plugins::NavGridOfDoublesDisplay, robot_nav_rviz_plugins::NavGridOfCharsDisplay, and robot_nav_rviz_plugins::OccupancyGridDisplay.

Definition at line 146 of file nav_grid_display.h.

◆ onUnsubscribe()

virtual void robot_nav_rviz_plugins::NavGridDisplay::onUnsubscribe ( )
inlineprotectedvirtual

Actual unsubscription logic, called by unsubscribe.

Reimplemented in robot_nav_rviz_plugins::NavGridOfDoublesDisplay, robot_nav_rviz_plugins::OccupancyGridDisplay, and robot_nav_rviz_plugins::NavGridOfCharsDisplay.

Definition at line 158 of file nav_grid_display.h.

◆ reset()

void robot_nav_rviz_plugins::NavGridDisplay::reset ( )
overridevirtual

Reimplemented from rviz::Display.

Definition at line 146 of file nav_grid_display.cpp.

◆ setTopic()

void robot_nav_rviz_plugins::NavGridDisplay::setTopic ( const QString &  topic,
const QString &  datatype 
)
overridevirtual

Reimplemented from rviz::Display.

Definition at line 154 of file nav_grid_display.cpp.

◆ showMap

void robot_nav_rviz_plugins::NavGridDisplay::showMap ( const nav_core2::UIntBounds updated_bounds)
protectedslot

Definition at line 193 of file nav_grid_display.cpp.

◆ subscribe()

void robot_nav_rviz_plugins::NavGridDisplay::subscribe ( )
protected

Called to trigger subscription, handles empty topics setting status.

Actual subscription logic should be handled by subclass via onSubscribe method

Definition at line 262 of file nav_grid_display.cpp.

◆ transformMap()

void robot_nav_rviz_plugins::NavGridDisplay::transformMap ( )
protected

Put the map in its proper place.

Definition at line 297 of file nav_grid_display.cpp.

◆ unsubscribe()

void robot_nav_rviz_plugins::NavGridDisplay::unsubscribe ( )
protected

Called to trigger unsubscribing.

Actual unsubscribing logic should be handled by subclass via onUnsubscribe method

Definition at line 286 of file nav_grid_display.cpp.

◆ update()

void robot_nav_rviz_plugins::NavGridDisplay::update ( float  wall_dt,
float  ros_dt 
)
overridevirtual

Reimplemented from rviz::Display.

Definition at line 159 of file nav_grid_display.cpp.

◆ updateAlpha

void robot_nav_rviz_plugins::NavGridDisplay::updateAlpha ( )
protectedslot

Definition at line 174 of file nav_grid_display.cpp.

◆ updateIgnore

virtual void robot_nav_rviz_plugins::NavGridDisplay::updateIgnore ( )
inlineprotectedvirtualslot

Reimplemented in robot_nav_rviz_plugins::NavGridOfDoublesDisplay.

Definition at line 114 of file nav_grid_display.h.

◆ updateIgnoreType

void robot_nav_rviz_plugins::NavGridDisplay::updateIgnoreType ( )
protectedvirtualslot

Definition at line 243 of file nav_grid_display.cpp.

◆ updatePalette

void robot_nav_rviz_plugins::NavGridDisplay::updatePalette ( )
protectedslot

Definition at line 186 of file nav_grid_display.cpp.

◆ updateTopic

void robot_nav_rviz_plugins::NavGridDisplay::updateTopic ( )
protectedslot

Definition at line 179 of file nav_grid_display.cpp.

Member Data Documentation

◆ alpha_property_

rviz::FloatProperty* robot_nav_rviz_plugins::NavGridDisplay::alpha_property_
protected

Definition at line 185 of file nav_grid_display.h.

◆ cached_info_

nav_grid::NavGridInfo robot_nav_rviz_plugins::NavGridDisplay::cached_info_
protected

Definition at line 176 of file nav_grid_display.h.

◆ color_scheme_names_

std::vector<std::string> robot_nav_rviz_plugins::NavGridDisplay::color_scheme_names_
protected

Definition at line 195 of file nav_grid_display.h.

◆ color_scheme_property_

rviz::EnumProperty* robot_nav_rviz_plugins::NavGridDisplay::color_scheme_property_
protected

Definition at line 188 of file nav_grid_display.h.

◆ draw_behind_property_

rviz::BoolProperty* robot_nav_rviz_plugins::NavGridDisplay::draw_behind_property_
protected

Definition at line 187 of file nav_grid_display.h.

◆ height_property_

rviz::IntProperty* robot_nav_rviz_plugins::NavGridDisplay::height_property_
protected

Definition at line 181 of file nav_grid_display.h.

◆ ignore_property_

rviz::FloatProperty* robot_nav_rviz_plugins::NavGridDisplay::ignore_property_
protected

Definition at line 192 of file nav_grid_display.h.

◆ ignore_type_property_

rviz::EnumProperty* robot_nav_rviz_plugins::NavGridDisplay::ignore_type_property_
protected

Definition at line 191 of file nav_grid_display.h.

◆ palette_loader_

pluginlib::ClassLoader<NavGridPalette> robot_nav_rviz_plugins::NavGridDisplay::palette_loader_
protected

Definition at line 196 of file nav_grid_display.h.

◆ panel_data_

nav_grid::VectorNavGrid<unsigned char> robot_nav_rviz_plugins::NavGridDisplay::panel_data_
protected

Definition at line 175 of file nav_grid_display.h.

◆ panel_display_

OgrePanel::Ptr robot_nav_rviz_plugins::NavGridDisplay::panel_display_
protected

Definition at line 172 of file nav_grid_display.h.

◆ resolution_property_

rviz::FloatProperty* robot_nav_rviz_plugins::NavGridDisplay::resolution_property_
protected

Definition at line 179 of file nav_grid_display.h.

◆ topic_property_

rviz::RosTopicProperty* robot_nav_rviz_plugins::NavGridDisplay::topic_property_
protected

Definition at line 184 of file nav_grid_display.h.

◆ unreliable_property_

rviz::BoolProperty* robot_nav_rviz_plugins::NavGridDisplay::unreliable_property_
protected

Definition at line 186 of file nav_grid_display.h.

◆ width_property_

rviz::IntProperty* robot_nav_rviz_plugins::NavGridDisplay::width_property_
protected

Definition at line 180 of file nav_grid_display.h.


The documentation for this class was generated from the following files:


robot_nav_rviz_plugins
Author(s):
autogenerated on Sun May 18 2025 02:47:50