#include <display.h>
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. | |
PanelDockWidget * | getAssociatedWidgetPanel () |
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. | |
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_. | |
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 | |
DisplayContext * | context_ |
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_ |
PanelDockWidget * | associated_widget_panel_ |
QString | class_id_ |
bool | initialized_ |
StatusList * | status_ |
uint32_t | visibility_bits_ |
Definition at line 56 of file display.cpp.
rviz::Display::~Display | ( | ) | [virtual] |
Definition at line 76 of file display.cpp.
void rviz::Display::associatedPanelVisibilityChange | ( | bool | visible | ) | [private, slot] |
Definition at line 385 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 221 of file display.cpp.
void rviz::Display::clearStatusesInternal | ( | ) | [private, slot] |
Definition at line 226 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] |
void rviz::Display::disable | ( | ) | [private, slot] |
Definition at line 273 of file display.cpp.
void rviz::Display::emitTimeSignal | ( | ros::Time | time | ) |
Emit a time signal that other Displays can synchronize to.
Definition at line 292 of file display.cpp.
virtual void rviz::Display::fixedFrameChanged | ( | ) | [inline, protected, virtual] |
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
Reimplemented in rviz::MessageFilterJointStateDisplay, 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::PointCloud >, rviz::DepthCloudDisplay, rviz::DisplayGroup, rviz::ImageDisplayBase, rviz::MarkerDisplay, rviz::CameraDisplay, rviz::TFDisplay, rviz::InteractiveMarkerDisplay, rviz::MapDisplay, rviz::GridCellsDisplay, rviz::RobotModelDisplay, and rviz::OdometryDisplay.
QWidget* rviz::Display::getAssociatedWidget | ( | ) | const [inline] |
Return the current associated widget, or NULL if there is none.
PanelDockWidget* rviz::Display::getAssociatedWidgetPanel | ( | ) | [inline] |
Return the panel containing the associated widget, or NULL if there is none.
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().
Ogre::SceneNode* rviz::Display::getSceneNode | ( | ) | const [inline] |
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] |
void rviz::Display::initialize | ( | DisplayContext * | context | ) |
Main initialization, called after constructor, before load() or setEnabled().
Definition at line 84 of file display.cpp.
bool rviz::Display::isEnabled | ( | ) | const |
Return true if this Display is enabled, false if not.
Definition at line 278 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::DisplayGroup, and rviz::FailedDisplay.
Definition at line 239 of file display.cpp.
virtual void rviz::Display::onDisable | ( | ) | [inline, protected, virtual] |
Derived classes override this to do the actual work of disabling themselves.
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::PointCloud >, rviz::TFDisplay, rviz::CameraDisplay, rviz::MapDisplay, rviz::RobotModelDisplay, rviz::MarkerDisplay, rviz::InteractiveMarkerDisplay, rviz::ImageDisplay, rviz::GridCellsDisplay, rviz::OdometryDisplay, and rviz::AxesDisplay.
virtual void rviz::Display::onEnable | ( | ) | [inline, protected, virtual] |
Derived classes override this to do the actual work of enabling themselves.
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::PointCloud >, rviz::TFDisplay, rviz::CameraDisplay, rviz::MapDisplay, rviz::RobotModelDisplay, rviz::MarkerDisplay, rviz::InteractiveMarkerDisplay, rviz::ImageDisplay, rviz::GridCellsDisplay, rviz::OdometryDisplay, rviz::PoseDisplay, and rviz::AxesDisplay.
void rviz::Display::onEnableChanged | ( | ) | [virtual, slot] |
Reimplemented in rviz::DisplayGroup.
Definition at line 302 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::PointCloud >, rviz::CameraDisplay, rviz::MarkerDisplay, rviz::TFDisplay, rviz::MapDisplay, rviz::InteractiveMarkerDisplay, rviz::PointCloudDisplay, rviz::GridCellsDisplay, rviz::ImageDisplay, rviz::RobotModelDisplay, rviz::OdometryDisplay, rviz::PointCloud2Display, rviz::PoseDisplay, rviz::GridDisplay, rviz::PathDisplay, rviz::LaserScanDisplay, rviz::RangeDisplay, rviz::PolygonDisplay, rviz::PoseArrayDisplay, rviz::AxesDisplay, rviz::PointStampedDisplay, and rviz::WrenchStampedDisplay.
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::PointCloud >, rviz::CameraDisplay, rviz::MarkerDisplay, rviz::ImageDisplayBase, rviz::InteractiveMarkerDisplay, rviz::TFDisplay, rviz::MapDisplay, rviz::GridCellsDisplay, rviz::RobotModelDisplay, rviz::ImageDisplay, rviz::OdometryDisplay, rviz::PoseDisplay, rviz::PolygonDisplay, rviz::PathDisplay, rviz::PointCloudDisplay, rviz::RangeDisplay, rviz::PointCloud2Display, rviz::PoseArrayDisplay, rviz::LaserScanDisplay, rviz::PointStampedDisplay, and rviz::WrenchStampedDisplay.
Definition at line 297 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 257 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 354 of file display.cpp.
virtual void rviz::Display::setClassId | ( | const QString & | class_id | ) | [inline, virtual] |
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 267 of file display.cpp.
void rviz::Display::setFixedFrame | ( | const QString & | fixed_frame | ) |
Set the fixed frame in this display.
Definition at line 283 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 394 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 403 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.
level | One of StatusProperty::Ok, StatusProperty::Warn, or StatusProperty::Error. |
name | The name of the child entry to set. |
text | Description 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.
void rviz::Display::setVisibilityBits | ( | uint32_t | bits | ) |
Default is all bits ON.
Definition at line 342 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 348 of file display.cpp.
virtual void rviz::Display::update | ( | float | wall_dt, |
float | ros_dt | ||
) | [inline, virtual] |
Called periodically by the visualization manager.
wall_dt | Wall-clock time, in seconds, since the last time the update list was run through. |
ros_dt | ROS time, in seconds, since the last time the update list was run through. |
Reimplemented in rviz::DisplayGroup, rviz::DepthCloudDisplay, rviz::CameraDisplay, rviz::MarkerDisplay, rviz::MapDisplay, rviz::InteractiveMarkerDisplay, rviz::ImageDisplay, rviz::OdometryDisplay, rviz::RobotModelDisplay, rviz::TFDisplay, rviz::GridDisplay, rviz::PointCloudDisplay, rviz::AxesDisplay, rviz::PointCloud2Display, and rviz::LaserScanDisplay.
QWidget* rviz::Display::associated_widget_ [private] |
QString rviz::Display::class_id_ [private] |
DisplayContext* rviz::Display::context_ [protected] |
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.
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.
bool rviz::Display::initialized_ [private] |
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.
Ogre::SceneNode* rviz::Display::scene_node_ [protected] |
StatusList* rviz::Display::status_ [private] |
ros::NodeHandle rviz::Display::threaded_nh_ [protected] |
A NodeHandle whose CallbackQueue is run from a different thread than the GUI.
This is configured after the constructor and before onInitialize() is called.
ros::NodeHandle rviz::Display::update_nh_ [protected] |
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.
uint32_t rviz::Display::visibility_bits_ [private] |