Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
robot_nav_rviz_plugins::NavGridOfDoublesDisplay Class Reference

Displays a nav_grid of doubles along the XY plane. More...

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

Public Member Functions

 NavGridOfDoublesDisplay ()
 
void onSubscribe (const std::string &topic) override
 Actual subscription logic, called by subscribe. More...
 
void onUnsubscribe () override
 Actual unsubscription logic, called by unsubscribe. More...
 
void updateIgnore ()
 
- Public Member Functions inherited from robot_nav_rviz_plugins::NavGridDisplay
 NavGridDisplay (const std::string &data_type, bool include_ignore_property=false)
 Constructor for the display. More...
 
virtual ~NavGridDisplay ()
 
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
 
virtual QVariant getViewData (int column, int role) const
 
virtual Qt::ItemFlags getViewFlags (int column) const
 
uint32_t getVisibilityBits ()
 
void initialize (DisplayContext *context)
 
bool isEnabled () const
 
virtual void load (const Config &config)
 
virtual void save (Config config) const
 
void setAssociatedWidget (QWidget *widget)
 
virtual void setClassId (const QString &class_id)
 
void setFixedFrame (const QString &fixed_frame)
 
void setName (const QString &name)
 
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)
 
virtual ~Display ()
 
- Public Member Functions inherited from rviz::BoolProperty
 BoolProperty (const QString &name=QString(), bool default_value=false, const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0)
 
virtual bool getBool () const
 
virtual bool getDisableChildren ()
 
bool getDisableChildrenIfFalse ()
 
void setDisableChildrenIfFalse (bool disable)
 
virtual ~BoolProperty ()
 
- 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 ()
 
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 ()
 
virtual QVariant getValue () const
 
void hide ()
 
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=QString(), const QVariant default_value=QVariant(), const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0)
 
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)
 
virtual ~Property ()
 

Protected Member Functions

void newDataCallback (const nav_core2::UIntBounds &bounds)
 
void resetExtremeValues ()
 
- Protected Member Functions inherited from robot_nav_rviz_plugins::NavGridDisplay
void clear ()
 Clear the data and remove the objects from the screen. More...
 
IgnoreType getIgnoreType () const
 
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...
 
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

nav_grid::VectorNavGrid< double > double_data_
 
bool first_data_
 
double ignore_value_
 
rviz::FloatPropertymax_property_
 
double max_value_
 
rviz::FloatPropertymin_property_
 
double min_value_
 
nav_grid_pub_sub::NavGridOfDoublesSubscriber sub_
 
- Protected Attributes inherited from robot_nav_rviz_plugins::NavGridDisplay
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)
 
virtual void setIcon (const QIcon &icon)
 
- Public Slots inherited from rviz::BoolProperty
bool setBool (bool value)
 
- Signals inherited from robot_nav_rviz_plugins::NavGridDisplay
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 (rviz::Display *display, ros::Time time)
 
- Signals inherited from rviz::Property
void aboutToChange ()
 
void changed ()
 
void childListChanged (Property *this_property)
 
- Protected Types inherited from robot_nav_rviz_plugins::NavGridDisplay
enum  IgnoreType { IgnoreType::NONE, IgnoreType::VALUE, IgnoreType::LIMIT }
 
- Protected Slots inherited from robot_nav_rviz_plugins::NavGridDisplay
void updateAlpha ()
 
void updateTopic ()
 
void updatePalette ()
 
void showMap (const nav_core2::UIntBounds &updated_bounds)
 
virtual void updateIgnoreType ()
 

Detailed Description

Displays a nav_grid of doubles along the XY plane.

Unlike NavGridOfCharsDisplay, this requires a bit more processing before writing the data into `panel_data_. The double data must be scaled to values [0, 255] so as to map to colors in the palette. This requires tracking the extreme values of the grid to the best of our ability and scaling accordingly.

If only NavGridOfDoubles messages (with no NavGridOfDoublesUpdate messages) are published, then the min/max vals will be accurate. However, if update messages are published too, its possible that the update could overwrite the previous extreme values.

Consider a simple 4x1 grid containing [0.0, 10.0, 5.0, 5.0]. The min/max values will be 0.0 and 10.0 respectively. However, if an update is recieved that updates the first two values only to 6.0, the new grid will contain [6.0, 6.0, 5.0, 5.0] but the min/max will still be 0.0/10.0, because the entire grid will not be rescanned.

Definition at line 61 of file nav_grid_of_doubles_display.cpp.

Constructor & Destructor Documentation

robot_nav_rviz_plugins::NavGridOfDoublesDisplay::NavGridOfDoublesDisplay ( )
inline

Definition at line 64 of file nav_grid_of_doubles_display.cpp.

Member Function Documentation

void robot_nav_rviz_plugins::NavGridOfDoublesDisplay::newDataCallback ( const nav_core2::UIntBounds bounds)
inlineprotected

Definition at line 103 of file nav_grid_of_doubles_display.cpp.

void robot_nav_rviz_plugins::NavGridOfDoublesDisplay::onSubscribe ( const std::string &  topic)
inlineoverridevirtual

Actual subscription logic, called by subscribe.

Parameters
topicNonempty string with topic to subscribe to

Reimplemented from robot_nav_rviz_plugins::NavGridDisplay.

Definition at line 79 of file nav_grid_of_doubles_display.cpp.

void robot_nav_rviz_plugins::NavGridOfDoublesDisplay::onUnsubscribe ( )
inlineoverridevirtual

Actual unsubscription logic, called by unsubscribe.

Reimplemented from robot_nav_rviz_plugins::NavGridDisplay.

Definition at line 86 of file nav_grid_of_doubles_display.cpp.

void robot_nav_rviz_plugins::NavGridOfDoublesDisplay::resetExtremeValues ( )
inlineprotected

Definition at line 97 of file nav_grid_of_doubles_display.cpp.

void robot_nav_rviz_plugins::NavGridOfDoublesDisplay::updateIgnore ( )
inlinevirtual

Reimplemented from robot_nav_rviz_plugins::NavGridDisplay.

Definition at line 91 of file nav_grid_of_doubles_display.cpp.

Member Data Documentation

nav_grid::VectorNavGrid<double> robot_nav_rviz_plugins::NavGridOfDoublesDisplay::double_data_
protected

Definition at line 189 of file nav_grid_of_doubles_display.cpp.

bool robot_nav_rviz_plugins::NavGridOfDoublesDisplay::first_data_
protected

Definition at line 195 of file nav_grid_of_doubles_display.cpp.

double robot_nav_rviz_plugins::NavGridOfDoublesDisplay::ignore_value_
protected

Definition at line 191 of file nav_grid_of_doubles_display.cpp.

rviz::FloatProperty* robot_nav_rviz_plugins::NavGridOfDoublesDisplay::max_property_
protected

Definition at line 193 of file nav_grid_of_doubles_display.cpp.

double robot_nav_rviz_plugins::NavGridOfDoublesDisplay::max_value_
protected

Definition at line 191 of file nav_grid_of_doubles_display.cpp.

rviz::FloatProperty* robot_nav_rviz_plugins::NavGridOfDoublesDisplay::min_property_
protected

Definition at line 192 of file nav_grid_of_doubles_display.cpp.

double robot_nav_rviz_plugins::NavGridOfDoublesDisplay::min_value_
protected

Definition at line 191 of file nav_grid_of_doubles_display.cpp.

nav_grid_pub_sub::NavGridOfDoublesSubscriber robot_nav_rviz_plugins::NavGridOfDoublesDisplay::sub_
protected

Definition at line 190 of file nav_grid_of_doubles_display.cpp.


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


robot_nav_rviz_plugins
Author(s):
autogenerated on Sun Jan 10 2021 04:08:58