Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Attributes
rviz::Display Class Reference

#include <display.h>

Inheritance diagram for rviz::Display:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual void onEnableChanged ()
void queueRender ()
 Convenience function which calls context_->queueRender().
void setEnabled (bool enabled)
 Enable or disable this Display.
virtual void setIcon (const QIcon &icon)
 Set the Display's icon.

Signals

void timeSignal (rviz::Display *display, ros::Time time)

Public Member Functions

virtual void deleteStatus (const QString &name)
 Delete the status entry with the given name. This is thread-safe.
void deleteStatusStd (const std::string &name)
 Delete the status entry with the given std::string name. This is thread-safe.
 Display ()
void emitTimeSignal (ros::Time time)
 Emit a time signal that other Displays can synchronize to.
QWidget * getAssociatedWidget () const
 Return the current associated widget, or NULL if there is none.
PanelDockWidgetgetAssociatedWidgetPanel ()
 Return the panel containing the associated widget, or NULL if there is none.
virtual QString getClassId () const
 Return the class identifier which was used to create this instance. This version just returns whatever was set with setClassId().
Ogre::SceneNode * getSceneNode () const
 Return the Ogre::SceneNode holding all 3D scene elements shown by this Display.
virtual QVariant getViewData (int column, int role) const
 Return data appropriate for the given column (0 or 1) and role for this Display.
virtual Qt::ItemFlags getViewFlags (int column) const
 Return item flags appropriate for the given column (0 or 1) for this Display.
uint32_t getVisibilityBits ()
void initialize (DisplayContext *context)
 Main initialization, called after constructor, before load() or setEnabled().
bool isEnabled () const
 Return true if this Display is enabled, false if not.
virtual void load (const Config &config)
 Load the settings for this display from the given Config node, which must be a map.
virtual void reset ()
 Called to tell the display to clear its state.
virtual void save (Config config) const
 Write this display to the given Config node.
void setAssociatedWidget (QWidget *widget)
 Associate the given widget with this Display.
virtual void setClassId (const QString &class_id)
 Set the class identifier used to create this instance. Typically this will be set by the factory object which created it.
void setFixedFrame (const QString &fixed_frame)
 Set the fixed frame in this display.
void setName (const QString &name)
 Overridden from Property to set associated widget title to the new name.
virtual void setStatus (StatusProperty::Level level, const QString &name, const QString &text)
 Show status level and text. This is thread-safe.
void setStatusStd (StatusProperty::Level level, const std::string &name, const std::string &text)
 Show status level and text, using a std::string. Convenience function which converts std::string to QString and calls setStatus(). This is thread-safe.
virtual void setTopic (const QString &topic, const QString &datatype)
 Set the ROS topic to listen to for this display.
void setVisibilityBits (uint32_t bits)
void unsetVisibilityBits (uint32_t bits)
virtual void update (float wall_dt, float ros_dt)
 Called periodically by the visualization manager.
virtual ~Display ()

Protected Member Functions

virtual void clearStatuses ()
 Delete all status children. This is thread-safe.
virtual void fixedFrameChanged ()
 Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
bool initialized () const
 Returns true if the display has been initialized.
virtual void onDisable ()
 Derived classes override this to do the actual work of disabling themselves.
virtual void onEnable ()
 Derived classes override this to do the actual work of enabling themselves.
virtual void onInitialize ()
 Override this function to do subclass-specific initialization.

Protected Attributes

DisplayContextcontext_
 This DisplayContext pointer is the main connection a Display has into the rest of rviz. This is how the FrameManager is accessed, the SelectionManager, etc. When a Display subclass wants to signal that a new render should be done right away, call context_->queueRender().
QString fixed_frame_
 A convenience variable equal to context_->getFixedFrame().
Ogre::SceneManager * scene_manager_
 A convenience variable equal to context_->getSceneManager().
Ogre::SceneNode * scene_node_
 The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
ros::NodeHandle threaded_nh_
 A NodeHandle whose CallbackQueue is run from a different thread than the GUI.
ros::NodeHandle update_nh_
 A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).

Private Slots

void associatedPanelVisibilityChange (bool visible)
void clearStatusesInternal ()
void deleteStatusInternal (const QString &name)
void disable ()
void setStatusInternal (int level, const QString &name, const QString &text)

Private Attributes

QWidget * associated_widget_
PanelDockWidgetassociated_widget_panel_
QString class_id_
bool initialized_
StatusListstatus_
uint32_t visibility_bits_

Detailed Description

Definition at line 63 of file display.h.


Constructor & Destructor Documentation

Definition at line 56 of file display.cpp.

rviz::Display::~Display ( ) [virtual]

Definition at line 76 of file display.cpp.


Member Function Documentation

void rviz::Display::associatedPanelVisibilityChange ( bool  visible) [private, slot]

Definition at line 388 of file display.cpp.

void rviz::Display::clearStatuses ( ) [protected, virtual]

Delete all status children. This is thread-safe.

This removes all status children and updates the top-level status.

Definition at line 224 of file display.cpp.

void rviz::Display::clearStatusesInternal ( ) [private, slot]

Definition at line 229 of file display.cpp.

void rviz::Display::deleteStatus ( const QString &  name) [virtual]

Delete the status entry with the given name. This is thread-safe.

Definition at line 210 of file display.cpp.

void rviz::Display::deleteStatusInternal ( const QString &  name) [private, slot]

Definition at line 216 of file display.cpp.

void rviz::Display::deleteStatusStd ( const std::string &  name) [inline]

Delete the status entry with the given std::string name. This is thread-safe.

Definition at line 158 of file display.h.

void rviz::Display::disable ( ) [private, slot]

Definition at line 276 of file display.cpp.

Emit a time signal that other Displays can synchronize to.

Definition at line 295 of file display.cpp.

virtual void rviz::Display::fixedFrameChanged ( ) [inline, protected, virtual]
QWidget* rviz::Display::getAssociatedWidget ( ) const [inline]

Return the current associated widget, or NULL if there is none.

See also:
setAssociatedWidget()

Definition at line 185 of file display.h.

Return the panel containing the associated widget, or NULL if there is none.

See also:
setAssociatedWidget()

Definition at line 189 of file display.h.

virtual QString rviz::Display::getClassId ( ) const [inline, virtual]

Return the class identifier which was used to create this instance. This version just returns whatever was set with setClassId().

Definition at line 85 of file display.h.

Ogre::SceneNode* rviz::Display::getSceneNode ( ) const [inline]

Return the Ogre::SceneNode holding all 3D scene elements shown by this Display.

Definition at line 166 of file display.h.

QVariant rviz::Display::getViewData ( int  column,
int  role 
) const [virtual]

Return data appropriate for the given column (0 or 1) and role for this Display.

Reimplemented from rviz::Property.

Reimplemented in rviz::FailedDisplay.

Definition at line 107 of file display.cpp.

Qt::ItemFlags rviz::Display::getViewFlags ( int  column) const [virtual]

Return item flags appropriate for the given column (0 or 1) for this Display.

Reimplemented from rviz::Property.

Reimplemented in rviz::DisplayGroup.

Definition at line 181 of file display.cpp.

uint32_t rviz::Display::getVisibilityBits ( ) [inline]

Definition at line 163 of file display.h.

Main initialization, called after constructor, before load() or setEnabled().

Definition at line 84 of file display.cpp.

bool rviz::Display::initialized ( ) const [inline, protected]

Returns true if the display has been initialized.

Definition at line 239 of file display.h.

bool rviz::Display::isEnabled ( ) const

Return true if this Display is enabled, false if not.

Definition at line 281 of file display.cpp.

void rviz::Display::load ( const Config config) [virtual]

Load the settings for this display from the given Config node, which must be a map.

Overridden from Property::load() to load the Display's name and enabled state, then call Property::load().

load() is called after initialize().

Reimplemented from rviz::Property.

Reimplemented in rviz::MarkerDisplay, rviz::DisplayGroup, rviz::TFDisplay, and rviz::FailedDisplay.

Definition at line 242 of file display.cpp.

virtual void rviz::Display::onDisable ( ) [inline, protected, virtual]
virtual void rviz::Display::onEnable ( ) [inline, protected, virtual]
void rviz::Display::onEnableChanged ( ) [virtual, slot]

Reimplemented in rviz::DisplayGroup.

Definition at line 305 of file display.cpp.

virtual void rviz::Display::onInitialize ( ) [inline, protected, virtual]

Override this function to do subclass-specific initialization.

This is called after vis_manager_ and scene_manager_ are set, and before load() or setEnabled().

setName() may or may not have been called before this.

Reimplemented in rviz::EffortDisplay, rviz::MessageFilterJointStateDisplay, rviz::DepthCloudDisplay, rviz::MessageFilterDisplay< MessageType >, rviz::MessageFilterDisplay< geometry_msgs::PoseArray >, rviz::MessageFilterDisplay< geometry_msgs::PolygonStamped >, rviz::MessageFilterDisplay< nav_msgs::Path >, rviz::MessageFilterDisplay< geometry_msgs::PointStamped >, rviz::MessageFilterDisplay< geometry_msgs::PoseStamped >, rviz::MessageFilterDisplay< sensor_msgs::PointCloud2 >, rviz::MessageFilterDisplay< sensor_msgs::LaserScan >, rviz::MessageFilterDisplay< sensor_msgs::Range >, rviz::MessageFilterDisplay< geometry_msgs::WrenchStamped >, rviz::MessageFilterDisplay< sensor_msgs::FluidPressure >, rviz::MessageFilterDisplay< sensor_msgs::Illuminance >, rviz::MessageFilterDisplay< sensor_msgs::Temperature >, rviz::MessageFilterDisplay< sensor_msgs::PointCloud >, rviz::MessageFilterDisplay< sensor_msgs::RelativeHumidity >, rviz::ImageDisplayBase, rviz::CameraDisplay, rviz::MapDisplay, rviz::MarkerDisplay, rviz::TFDisplay, rviz::PathDisplay, rviz::ImageDisplay, rviz::InteractiveMarkerDisplay, rviz::PointCloudDisplay, rviz::GridCellsDisplay, rviz::RobotModelDisplay, rviz::OdometryDisplay, rviz::PointCloud2Display, rviz::PoseDisplay, rviz::GridDisplay, rviz::FluidPressureDisplay, rviz::IlluminanceDisplay, rviz::LaserScanDisplay, rviz::RangeDisplay, rviz::RelativeHumidityDisplay, rviz::TemperatureDisplay, rviz::PolygonDisplay, rviz::PoseArrayDisplay, rviz::AxesDisplay, rviz::PointStampedDisplay, and rviz::WrenchStampedDisplay.

Definition at line 222 of file display.h.

void rviz::Display::queueRender ( ) [slot]

Convenience function which calls context_->queueRender().

Definition at line 99 of file display.cpp.

void rviz::Display::reset ( ) [virtual]

Called to tell the display to clear its state.

Reimplemented in rviz::EffortDisplay, rviz::MessageFilterJointStateDisplay, rviz::DisplayGroup, rviz::DepthCloudDisplay, rviz::MessageFilterDisplay< MessageType >, rviz::MessageFilterDisplay< geometry_msgs::PoseArray >, rviz::MessageFilterDisplay< geometry_msgs::PolygonStamped >, rviz::MessageFilterDisplay< nav_msgs::Path >, rviz::MessageFilterDisplay< geometry_msgs::PointStamped >, rviz::MessageFilterDisplay< geometry_msgs::PoseStamped >, rviz::MessageFilterDisplay< sensor_msgs::PointCloud2 >, rviz::MessageFilterDisplay< sensor_msgs::LaserScan >, rviz::MessageFilterDisplay< sensor_msgs::Range >, rviz::MessageFilterDisplay< geometry_msgs::WrenchStamped >, rviz::MessageFilterDisplay< sensor_msgs::FluidPressure >, rviz::MessageFilterDisplay< sensor_msgs::Illuminance >, rviz::MessageFilterDisplay< sensor_msgs::Temperature >, rviz::MessageFilterDisplay< sensor_msgs::PointCloud >, rviz::MessageFilterDisplay< sensor_msgs::RelativeHumidity >, rviz::ImageDisplayBase, rviz::CameraDisplay, rviz::MarkerDisplay, rviz::MapDisplay, rviz::TFDisplay, rviz::InteractiveMarkerDisplay, rviz::GridCellsDisplay, rviz::ImageDisplay, rviz::RobotModelDisplay, rviz::OdometryDisplay, rviz::PathDisplay, rviz::PoseDisplay, rviz::PolygonDisplay, rviz::PointCloudDisplay, rviz::RangeDisplay, rviz::PointCloud2Display, rviz::PoseArrayDisplay, rviz::FluidPressureDisplay, rviz::IlluminanceDisplay, rviz::LaserScanDisplay, rviz::RelativeHumidityDisplay, rviz::TemperatureDisplay, rviz::PointStampedDisplay, and rviz::WrenchStampedDisplay.

Definition at line 300 of file display.cpp.

void rviz::Display::save ( Config  config) const [virtual]

Write this display to the given Config node.

Overridden from Property::save().

Reimplemented from rviz::Property.

Reimplemented in rviz::DisplayGroup.

Definition at line 260 of file display.cpp.

void rviz::Display::setAssociatedWidget ( QWidget *  widget)

Associate the given widget with this Display.

Each Display can have one QWidget which is shown when the Display is enabled and hidden when the Display is disabled. If there is a WindowManagerInterface registered with the VisualizationManager, like if you are using a VisualizationFrame, this also adds widget as a pane within it (with WindowManagerInterface::addPane() ).

Since there is only one slot for such a widget, this dis-associates any previously associated widget.

Call this with NULL to disassociate the current associated widget.

Definition at line 357 of file display.cpp.

virtual void rviz::Display::setClassId ( const QString &  class_id) [inline, virtual]

Set the class identifier used to create this instance. Typically this will be set by the factory object which created it.

Definition at line 89 of file display.h.

void rviz::Display::setEnabled ( bool  enabled) [slot]

Enable or disable this Display.

SetEnabled is called after initialize() and at the end of load(), if the Display settings are being loaded from a file.

Definition at line 270 of file display.cpp.

void rviz::Display::setFixedFrame ( const QString &  fixed_frame)

Set the fixed frame in this display.

Definition at line 286 of file display.cpp.

void rviz::Display::setIcon ( const QIcon &  icon) [virtual, slot]

Set the Display's icon.

Reimplemented from rviz::Property.

Definition at line 401 of file display.cpp.

void rviz::Display::setName ( const QString &  name) [virtual]

Overridden from Property to set associated widget title to the new name.

Reimplemented from rviz::Property.

Definition at line 410 of file display.cpp.

void rviz::Display::setStatus ( StatusProperty::Level  level,
const QString &  name,
const QString &  text 
) [virtual]

Show status level and text. This is thread-safe.

Parameters:
levelOne of StatusProperty::Ok, StatusProperty::Warn, or StatusProperty::Error.
nameThe name of the child entry to set.
textDescription of the child's state.

Every Display has a StatusList to indicate how it is doing. The StatusList has StatusPropertychildren indicating the status of various subcomponents of the Display. Each child of the status has a level, a name, and descriptive text. The top-level StatusList has a level which is set to the worst of all the children's levels.

Definition at line 186 of file display.cpp.

void rviz::Display::setStatusInternal ( int  level,
const QString &  name,
const QString &  text 
) [private, slot]

Definition at line 194 of file display.cpp.

void rviz::Display::setStatusStd ( StatusProperty::Level  level,
const std::string &  name,
const std::string &  text 
) [inline]

Show status level and text, using a std::string. Convenience function which converts std::string to QString and calls setStatus(). This is thread-safe.

Definition at line 149 of file display.h.

virtual void rviz::Display::setTopic ( const QString &  topic,
const QString &  datatype 
) [inline, virtual]
void rviz::Display::setVisibilityBits ( uint32_t  bits)

Default is all bits ON.

Definition at line 345 of file display.cpp.

void rviz::Display::timeSignal ( rviz::Display display,
ros::Time  time 
) [signal]
void rviz::Display::unsetVisibilityBits ( uint32_t  bits)

Definition at line 351 of file display.cpp.

virtual void rviz::Display::update ( float  wall_dt,
float  ros_dt 
) [inline, virtual]

Called periodically by the visualization manager.

Parameters:
wall_dtWall-clock time, in seconds, since the last time the update list was run through.
ros_dtROS time, in seconds, since the last time the update list was run through.

Reimplemented in rviz::DisplayGroup, rviz::DepthCloudDisplay, rviz::MapDisplay, rviz::CameraDisplay, rviz::MarkerDisplay, rviz::InteractiveMarkerDisplay, rviz::ImageDisplay, rviz::OdometryDisplay, rviz::RobotModelDisplay, rviz::TFDisplay, rviz::GridDisplay, rviz::PointCloudDisplay, rviz::AxesDisplay, rviz::PointCloud2Display, rviz::FluidPressureDisplay, rviz::IlluminanceDisplay, rviz::LaserScanDisplay, rviz::RelativeHumidityDisplay, and rviz::TemperatureDisplay.

Definition at line 127 of file display.h.


Member Data Documentation

Definition at line 290 of file display.h.

Definition at line 291 of file display.h.

QString rviz::Display::class_id_ [private]

Definition at line 287 of file display.h.

This DisplayContext pointer is the main connection a Display has into the rest of rviz. This is how the FrameManager is accessed, the SelectionManager, etc. When a Display subclass wants to signal that a new render should be done right away, call context_->queueRender().

This is set after the constructor and before onInitialize() is called.

Definition at line 248 of file display.h.

QString rviz::Display::fixed_frame_ [protected]

A convenience variable equal to context_->getFixedFrame().

This is set after the constructor and before onInitialize() is called. Every time it is updated (via setFixedFrame()), fixedFrameChanged() is called.

Definition at line 273 of file display.h.

Definition at line 288 of file display.h.

Ogre::SceneManager* rviz::Display::scene_manager_ [protected]

A convenience variable equal to context_->getSceneManager().

This is set after the constructor and before onInitialize() is called.

Definition at line 253 of file display.h.

Ogre::SceneNode* rviz::Display::scene_node_ [protected]

The Ogre::SceneNode to hold all 3D scene elements shown by this Display.

Definition at line 256 of file display.h.

Definition at line 286 of file display.h.

A NodeHandle whose CallbackQueue is run from a different thread than the GUI.

This is configured after the constructor and before onInitialize() is called.

Definition at line 266 of file display.h.

A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).

This is configured after the constructor and before onInitialize() is called.

Definition at line 261 of file display.h.

uint32_t rviz::Display::visibility_bits_ [private]

Definition at line 289 of file display.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Jun 6 2019 18:02:16