The VisualizationManager class is the central manager class of rviz, holding all the Displays, Tools, ViewControllers, and other managers. More...
#include <visualization_manager.h>
Public Types | |
typedef std::set< std::string > | S_string |
Signals | |
void | configChanged () |
Emitted whenever the display configuration changes. | |
void | displayAdded (DisplayWrapper *) |
Emitted after a DisplayWrapper has been added and its Display has been created, but before the display is enabled for the first time. | |
void | displayAdding (DisplayWrapper *) |
Emitted just before a DisplayWrapper is added to the list of displays. | |
void | displayRemoved (DisplayWrapper *) |
Emitted just after a DisplayWrapper is removed from the list of displays, and before it is deleted. | |
void | displayRemoving (DisplayWrapper *) |
Emitted just before a DisplayWrapper is removed from the list of displays. | |
void | displaysConfigLoaded (const boost::shared_ptr< Config > &) |
Emitted by loadDisplayConfig() after Displays are loaded. | |
void | displaysConfigSaved (const boost::shared_ptr< Config > &) |
Emitted by saveDisplayConfig() after Displays are saved. | |
void | displaysRemoved (const V_DisplayWrapper &) |
Emitted by removeAllDisplays() just after the list of displays is emptied. | |
void | displaysRemoving (const V_DisplayWrapper &) |
Emitted by removeAllDisplays() just before the list of displays is emptied. | |
void | timeChanged () |
Emitted at most once every 100ms. | |
void | toolAdded (Tool *) |
Emitted by addTool() after the tool is added to the list of tools. | |
void | toolChanged (Tool *) |
Emitted by setCurrentTool() after the newly chosen tool is activated. | |
void | viewControllerChanged (ViewController *) |
Emitted after the current ViewController has changed. | |
void | viewControllerTypeAdded (const std::string &class_name, const std::string &name) |
Emitted when a new ViewController type is added. | |
Public Member Functions | |
void | addTool (Tool *tool) |
Add a tool. Adds a tool to the list of tools and emits the toolAdded(Tool*) signal. | |
DisplayWrapper * | createDisplay (const std::string &class_lookup_name, const std::string &name, bool enabled) |
Create and add a display to this panel, by class lookup name. | |
template<class T > | |
T * | createTool (const std::string &name, char shortcut_key) |
Create and add a tool. This will go away in visualization 1.9, it is just a wrapper around the constructor for T and a call to addTool(). | |
const Color & | getBackgroundColor () |
Return the background color of the main RenderWindow. | |
Tool * | getCurrentTool () |
Return the tool currently in use. | |
ViewController * | getCurrentViewController () |
Return the current ViewController in use for the main RenderWindow. | |
std::string | getCurrentViewControllerType () |
Return the type of the current ViewController as a std::string, like "rviz::OrbitViewController". | |
Tool * | getDefaultTool () |
Get the default tool. | |
pluginlib::ClassLoader< Display > * | getDisplayClassLoader () |
Return the pluginlib::ClassLoader instance to use for loading Display subclasses. | |
void | getDisplayNames (S_string &displays) |
Return a std::set with all the current display names. | |
V_DisplayWrapper & | getDisplays () |
Return a reference to the DisplayWrapper array. | |
DisplayWrapper * | getDisplayWrapper (const std::string &name) |
Performs a linear search to find a display wrapper based on its name. | |
DisplayWrapper * | getDisplayWrapper (Display *display) |
Performs a linear search to find the DisplayWrapper holding a given Display. | |
const std::string & | getFixedFrame () |
Return the fixed frame name. | |
uint64_t | getFrameCount () |
Return the current value of the frame count. | |
FrameManager * | getFrameManager () |
Return the FrameManager instance. | |
PropertyManager * | getPropertyManager () |
Get the PropertyManager which handles Propertys of Displays. | |
RenderPanel * | getRenderPanel () |
Return the main RenderPanel. | |
double | getROSTime () |
Return the ROS time, in seconds. | |
double | getROSTimeElapsed () |
Return the ROS time in seconds since the last reset. | |
Ogre::SceneManager * | getSceneManager () |
Returns the Ogre::SceneManager used for the main RenderPanel. | |
SelectionManager * | getSelectionManager () |
Return a pointer to the SelectionManager. | |
std::string | getTargetFrame () |
Return the target frame name. | |
tf::TransformListener * | getTFClient () |
Convenience function: returns getFrameManager()->getTFClient(). | |
ros::CallbackQueueInterface * | getThreadedQueue () |
Return a CallbackQueue using a different thread than the main GUI one. | |
Tool * | getTool (int index) |
Return the tool at a given index in the Tool list. If index is less than 0 or greater than the number of tools, this will fail an assertion. | |
PropertyManager * | getToolPropertyManager () |
Get the PropertyManager which handles Propertys of Tools. | |
ros::CallbackQueueInterface * | getUpdateQueue () |
Return the CallbackQueue using the main GUI thread. | |
double | getWallClock () |
Return the wall clock time, in seconds since 1970. | |
double | getWallClockElapsed () |
Return the wall clock time in seconds since the last reset. | |
WindowManagerInterface * | getWindowManager () |
Return the window manager, if any. | |
void | handleChar (QKeyEvent *event, RenderPanel *panel) |
Handle a single key event for a given RenderPanel. | |
void | handleMouseEvent (ViewportMouseEvent &event) |
Handle a mouse event. | |
void | initialize (const StatusCallback &cb=StatusCallback(), bool verbose=false) |
Do initialization that wasn't done in constructor. Sets initial fixed and target frames, adds view controllers and tools, and initializes SelectionManager. | |
bool | isValidDisplay (const DisplayWrapper *display) |
Return true if the given DisplayWrapper is currently in the list of displays, false otherwise. | |
void | loadDisplayConfig (const boost::shared_ptr< Config > &config, const StatusCallback &cb=StatusCallback()) |
Load the properties of each Display and most editable rviz data. | |
void | lockRender () |
Lock a mutex to delay calls to Ogre::Root::renderOneFrame(). | |
void | notifyConfigChanged () |
Notify this VisualizationManager that something about its display configuration has changed. | |
void | queueRender () |
Queues a render. Multiple calls before a render happens will only cause a single render. | |
void | removeAllDisplays () |
Remove all displays. | |
void | removeDisplay (DisplayWrapper *display) |
Remove a display, by wrapper pointer. | |
void | removeDisplay (const std::string &name) |
Remove a display by name. Removes the display with the given GUI display name, like "Left arm camera". | |
void | resetDisplays () |
call Display::reset() on every Display. | |
void | resetTime () |
Resets the wall and ROS elapsed time to zero and calls resetDisplays(). | |
void | saveDisplayConfig (const boost::shared_ptr< Config > &config) |
Save the properties of each Display and most editable rviz data. | |
void | setBackgroundColor (const Color &c) |
Set the background color of the main RenderWindow. | |
void | setCurrentTool (Tool *tool) |
Set the current tool. The current tool is given all mouse and keyboard events which VisualizationManager receives via handleMouseEvent() and handleChar(). | |
bool | setCurrentViewControllerType (const std::string &type) |
Set the current view controller by specifying the desired type. | |
void | setDefaultTool (Tool *tool) |
Set the default tool. | |
void | setFixedFrame (const std::string &frame) |
Set the coordinate frame we should be transforming all fixed data into. | |
void | setTargetFrame (const std::string &frame) |
Set the coordinate frame whose position the display should track. | |
void | startUpdate () |
Start timers. Creates and starts the update and idle timers, both set to 30Hz (33ms). | |
void | unlockRender () |
Unlock a mutex, allowing calls to Ogre::Root::renderOneFrame(). | |
VisualizationManager (RenderPanel *render_panel, WindowManagerInterface *wm=0) | |
Constructor Creates managers and sets up global properties. | |
virtual | ~VisualizationManager () |
Destructor Stops update timers and destroys all displays, tools, and managers. | |
Protected Types | |
typedef std::vector< Tool * > | V_Tool |
Protected Slots | |
void | onDisplayCreated (DisplayWrapper *wrapper) |
void | onIdle () |
Render one frame if requested and enough time has passed since the previous render. | |
void | onUpdate () |
Call update() on all managed objects. | |
Protected Member Functions | |
bool | addDisplay (DisplayWrapper *wrapper, bool enabled) |
Add a display to be managed by this panel. | |
void | addViewController (const std::string &class_name, const std::string &name) |
void | createColorMaterials () |
void | incomingROSTime () |
void | onPluginUnloading (const PluginStatus &status) |
void | threadedQueueThreadFunc () |
void | updateFrames () |
void | updateRelativeNode () |
void | updateTime () |
Protected Attributes | |
V_string | available_frames_ |
Color | background_color_ |
ColorPropertyWPtr | background_color_property_ |
Tool * | current_tool_ |
Tool * | default_tool_ |
bool | disable_update_ |
pluginlib::ClassLoader< Display > * | display_class_loader_ |
V_DisplayWrapper | displays_ |
Our list of displays. | |
std::string | fixed_frame_ |
Frame to transform fixed data to. | |
EditEnumPropertyWPtr | fixed_frame_property_ |
uint64_t | frame_count_ |
FrameManagerPtr | frame_manager_ |
float | frame_update_timer_ |
QTimer * | idle_timer_ |
Timer with a timeout of 0. Called by Qt event loop when it has no events to process. | |
ros::WallTime | last_render_ |
ros::Time | last_update_ros_time_ |
Update stopwatch. Stores how long it's been since the last update. | |
ros::WallTime | last_update_wall_time_ |
Ogre::Root * | ogre_root_ |
Ogre Root. | |
PropertyManager * | property_manager_ |
boost::mutex | render_mutex_ |
RenderPanel * | render_panel_ |
uint32_t | render_requested_ |
ros::Time | ros_time_begin_ |
ros::Duration | ros_time_elapsed_ |
Ogre::SceneManager * | scene_manager_ |
Ogre scene manager associated with this panel. | |
SelectionManager * | selection_manager_ |
volatile bool | shutting_down_ |
StatusPropertyWPtr | status_property_ |
std::string | target_frame_ |
Target coordinate frame we're displaying everything in. | |
bool | target_frame_is_fixed_frame_ |
TFFramePropertyWPtr | target_frame_property_ |
Ogre::SceneNode * | target_scene_node_ |
ros::NodeHandle | threaded_nh_ |
ros::CallbackQueue | threaded_queue_ |
boost::thread_group | threaded_queue_threads_ |
float | time_update_timer_ |
PropertyManager * | tool_property_manager_ |
V_Tool | tools_ |
ros::NodeHandle | update_nh_ |
QTimer * | update_timer_ |
Update timer. Display::update is called on each display whenever this timer fires. | |
ViewController * | view_controller_ |
std::deque< ViewportMouseEvent > | vme_queue_ |
boost::mutex | vme_queue_mutex_ |
ros::WallTime | wall_clock_begin_ |
ros::WallDuration | wall_clock_elapsed_ |
WindowManagerInterface * | window_manager_ |
The VisualizationManager class is the central manager class of rviz, holding all the Displays, Tools, ViewControllers, and other managers.
It keeps the current view controller for the main render window. It has a timer which calls update() on all the displays. It creates and holds pointers to the other manager objects: SelectionManager, FrameManager, the PropertyManager s, and Ogre::SceneManager.
The "protected" members should probably all be "private", as VisualizationManager is not intended to be subclassed.
Definition at line 103 of file visualization_manager.h.
typedef std::set<std::string> rviz::VisualizationManager::S_string |
Definition at line 331 of file visualization_manager.h.
typedef std::vector< Tool* > rviz::VisualizationManager::V_Tool [protected] |
Definition at line 616 of file visualization_manager.h.
rviz::VisualizationManager::VisualizationManager | ( | RenderPanel * | render_panel, |
WindowManagerInterface * | wm = 0 |
||
) |
Constructor Creates managers and sets up global properties.
render_panel | a pointer to the main render panel widget of the app. This is the render_panel connected to the ViewController managed by this VisualizationManager. |
wm | a pointer to the window manager (which is really just a VisualizationFrame, the top-level container widget of rviz). |
Definition at line 86 of file visualization_manager.cpp.
rviz::VisualizationManager::~VisualizationManager | ( | ) | [virtual] |
Destructor Stops update timers and destroys all displays, tools, and managers.
Definition at line 148 of file visualization_manager.cpp.
bool rviz::VisualizationManager::addDisplay | ( | DisplayWrapper * | wrapper, |
bool | enabled | ||
) | [protected] |
Add a display to be managed by this panel.
display | The display to be added |
Definition at line 530 of file visualization_manager.cpp.
void rviz::VisualizationManager::addTool | ( | Tool * | tool | ) |
Add a tool. Adds a tool to the list of tools and emits the toolAdded(Tool*) signal.
Definition at line 607 of file visualization_manager.cpp.
void rviz::VisualizationManager::addViewController | ( | const std::string & | class_name, |
const std::string & | name | ||
) | [protected] |
Definition at line 951 of file visualization_manager.cpp.
void rviz::VisualizationManager::configChanged | ( | ) | [signal] |
Emitted whenever the display configuration changes.
void rviz::VisualizationManager::createColorMaterials | ( | ) | [protected] |
Definition at line 247 of file visualization_manager.cpp.
DisplayWrapper * rviz::VisualizationManager::createDisplay | ( | const std::string & | class_lookup_name, |
const std::string & | name, | ||
bool | enabled | ||
) |
Create and add a display to this panel, by class lookup name.
class_lookup_name | "lookup name" of the Display subclass, for pluginlib. Should be of the form "packagename/displaynameofclass", like "rviz/Image". |
name | The name of this display instance shown on the GUI, like "Left arm camera". |
enabled | Whether to start enabled |
Definition at line 807 of file visualization_manager.cpp.
T* rviz::VisualizationManager::createTool | ( | const std::string & | name, |
char | shortcut_key | ||
) | [inline] |
Create and add a tool. This will go away in visualization 1.9, it is just a wrapper around the constructor for T and a call to addTool().
Definition at line 170 of file visualization_manager.h.
void rviz::VisualizationManager::displayAdded | ( | DisplayWrapper * | ) | [signal] |
Emitted after a DisplayWrapper has been added and its Display has been created, but before the display is enabled for the first time.
void rviz::VisualizationManager::displayAdding | ( | DisplayWrapper * | ) | [signal] |
Emitted just before a DisplayWrapper is added to the list of displays.
void rviz::VisualizationManager::displayRemoved | ( | DisplayWrapper * | ) | [signal] |
Emitted just after a DisplayWrapper is removed from the list of displays, and before it is deleted.
void rviz::VisualizationManager::displayRemoving | ( | DisplayWrapper * | ) | [signal] |
Emitted just before a DisplayWrapper is removed from the list of displays.
void rviz::VisualizationManager::displaysConfigLoaded | ( | const boost::shared_ptr< Config > & | ) | [signal] |
Emitted by loadDisplayConfig() after Displays are loaded.
Connect to this signal in order to load your object's state from a Config object when a new display Config is being loaded.
void rviz::VisualizationManager::displaysConfigSaved | ( | const boost::shared_ptr< Config > & | ) | [signal] |
Emitted by saveDisplayConfig() after Displays are saved.
Connect to this signal in order to save your object's state to a Config object when a display Config is being saved.
void rviz::VisualizationManager::displaysRemoved | ( | const V_DisplayWrapper & | ) | [signal] |
Emitted by removeAllDisplays() just after the list of displays is emptied.
void rviz::VisualizationManager::displaysRemoving | ( | const V_DisplayWrapper & | ) | [signal] |
Emitted by removeAllDisplays() just before the list of displays is emptied.
const Color & rviz::VisualizationManager::getBackgroundColor | ( | ) |
Return the background color of the main RenderWindow.
Definition at line 935 of file visualization_manager.cpp.
Tool* rviz::VisualizationManager::getCurrentTool | ( | ) | [inline] |
Return the tool currently in use.
Definition at line 188 of file visualization_manager.h.
Return the current ViewController in use for the main RenderWindow.
Definition at line 404 of file visualization_manager.h.
std::string rviz::VisualizationManager::getCurrentViewControllerType | ( | ) |
Return the type of the current ViewController as a std::string, like "rviz::OrbitViewController".
Definition at line 1005 of file visualization_manager.cpp.
Tool* rviz::VisualizationManager::getDefaultTool | ( | ) | [inline] |
Get the default tool.
Definition at line 223 of file visualization_manager.h.
Return the pluginlib::ClassLoader instance to use for loading Display subclasses.
Definition at line 471 of file visualization_manager.h.
void rviz::VisualizationManager::getDisplayNames | ( | S_string & | displays | ) |
Return a std::set with all the current display names.
Definition at line 255 of file visualization_manager.cpp.
V_DisplayWrapper& rviz::VisualizationManager::getDisplays | ( | ) | [inline] |
Return a reference to the DisplayWrapper array.
Definition at line 341 of file visualization_manager.h.
DisplayWrapper * rviz::VisualizationManager::getDisplayWrapper | ( | const std::string & | name | ) |
Performs a linear search to find a display wrapper based on its name.
name | Name of the display to search for |
Definition at line 640 of file visualization_manager.cpp.
DisplayWrapper * rviz::VisualizationManager::getDisplayWrapper | ( | Display * | display | ) |
Performs a linear search to find the DisplayWrapper holding a given Display.
display | Display to search for. |
Definition at line 656 of file visualization_manager.cpp.
const std::string& rviz::VisualizationManager::getFixedFrame | ( | ) | [inline] |
Return the fixed frame name.
Definition at line 279 of file visualization_manager.h.
uint64_t rviz::VisualizationManager::getFrameCount | ( | ) | [inline] |
Return the current value of the frame count.
The frame count is just a number which increments each time a frame is rendered. This lets clients check if a new frame has been rendered since the last time they did something.
Definition at line 481 of file visualization_manager.h.
FrameManager* rviz::VisualizationManager::getFrameManager | ( | ) | [inline] |
Return the FrameManager instance.
Definition at line 474 of file visualization_manager.h.
Get the PropertyManager which handles Propertys of Displays.
Definition at line 299 of file visualization_manager.h.
RenderPanel* rviz::VisualizationManager::getRenderPanel | ( | ) | [inline] |
Return the main RenderPanel.
Definition at line 329 of file visualization_manager.h.
double rviz::VisualizationManager::getROSTime | ( | ) |
Return the ROS time, in seconds.
Definition at line 909 of file visualization_manager.cpp.
Return the ROS time in seconds since the last reset.
Definition at line 919 of file visualization_manager.cpp.
Ogre::SceneManager* rviz::VisualizationManager::getSceneManager | ( | ) | [inline] |
Returns the Ogre::SceneManager used for the main RenderPanel.
Definition at line 324 of file visualization_manager.h.
Return a pointer to the SelectionManager.
Definition at line 436 of file visualization_manager.h.
std::string rviz::VisualizationManager::getTargetFrame | ( | ) |
Return the target frame name.
Definition at line 265 of file visualization_manager.cpp.
Convenience function: returns getFrameManager()->getTFClient().
Definition at line 504 of file visualization_manager.cpp.
Return a CallbackQueue using a different thread than the main GUI one.
Definition at line 467 of file visualization_manager.h.
Tool * rviz::VisualizationManager::getTool | ( | int | index | ) |
Return the tool at a given index in the Tool list. If index is less than 0 or greater than the number of tools, this will fail an assertion.
Definition at line 632 of file visualization_manager.cpp.
Get the PropertyManager which handles Propertys of Tools.
Definition at line 305 of file visualization_manager.h.
Return the CallbackQueue using the main GUI thread.
Definition at line 462 of file visualization_manager.h.
double rviz::VisualizationManager::getWallClock | ( | ) |
Return the wall clock time, in seconds since 1970.
Definition at line 904 of file visualization_manager.cpp.
Return the wall clock time in seconds since the last reset.
Definition at line 914 of file visualization_manager.cpp.
Return the window manager, if any.
Definition at line 457 of file visualization_manager.h.
void rviz::VisualizationManager::handleChar | ( | QKeyEvent * | event, |
RenderPanel * | panel | ||
) |
Handle a single key event for a given RenderPanel.
If the key is Escape, switches to the default Tool (via getDefaultTool()). All other key events are passed to the current Tool (via getCurrentTool()).
Definition at line 940 of file visualization_manager.cpp.
void rviz::VisualizationManager::handleMouseEvent | ( | ViewportMouseEvent & | event | ) |
Handle a mouse event.
This just copies the given event into an event queue. The events in the queue are processed by onUpdate() which is called from the main thread by a timer every 33ms.
Definition at line 1010 of file visualization_manager.cpp.
void rviz::VisualizationManager::incomingROSTime | ( | ) | [protected] |
void rviz::VisualizationManager::initialize | ( | const StatusCallback & | cb = StatusCallback() , |
bool | verbose = false |
||
) |
Do initialization that wasn't done in constructor. Sets initial fixed and target frames, adds view controllers and tools, and initializes SelectionManager.
Definition at line 191 of file visualization_manager.cpp.
bool rviz::VisualizationManager::isValidDisplay | ( | const DisplayWrapper * | display | ) |
Return true if the given DisplayWrapper is currently in the list of displays, false otherwise.
This does not check that the Display has actually been loaded into the DisplayWrapper.
Definition at line 889 of file visualization_manager.cpp.
void rviz::VisualizationManager::loadDisplayConfig | ( | const boost::shared_ptr< Config > & | config, |
const StatusCallback & | cb = StatusCallback() |
||
) |
Load the properties of each Display and most editable rviz data.
This is what is called when loading a "*.vcg" file.
config | The object to read data from. |
cb | An optional callback function to call with status updates, such as "loading displays". |
Definition at line 688 of file visualization_manager.cpp.
void rviz::VisualizationManager::lockRender | ( | ) | [inline] |
Lock a mutex to delay calls to Ogre::Root::renderOneFrame().
Definition at line 441 of file visualization_manager.h.
Notify this VisualizationManager that something about its display configuration has changed.
Definition at line 1032 of file visualization_manager.cpp.
void rviz::VisualizationManager::onDisplayCreated | ( | DisplayWrapper * | wrapper | ) | [protected, slot] |
Definition at line 520 of file visualization_manager.cpp.
void rviz::VisualizationManager::onIdle | ( | ) | [protected, slot] |
Render one frame if requested and enough time has passed since the previous render.
Called at 30Hz from the "idle" timer
Definition at line 388 of file visualization_manager.cpp.
void rviz::VisualizationManager::onPluginUnloading | ( | const PluginStatus & | status | ) | [protected] |
Definition at line 1024 of file visualization_manager.cpp.
void rviz::VisualizationManager::onUpdate | ( | ) | [protected, slot] |
Call update() on all managed objects.
This is the central place where update() is called on most rviz objects. Display objects, the FrameManager, the current ViewController, the SelectionManager, PropertyManager. Also calls ros::spinOnce(), so any callbacks on the global CallbackQueue get called from here as well.
It is called at 30Hz from the update timer.
Definition at line 285 of file visualization_manager.cpp.
Queues a render. Multiple calls before a render happens will only cause a single render.
Definition at line 275 of file visualization_manager.cpp.
Remove all displays.
Definition at line 568 of file visualization_manager.cpp.
void rviz::VisualizationManager::removeDisplay | ( | DisplayWrapper * | display | ) |
Remove a display, by wrapper pointer.
display | The wrapper of the display to remove |
Definition at line 552 of file visualization_manager.cpp.
void rviz::VisualizationManager::removeDisplay | ( | const std::string & | name | ) |
Remove a display by name. Removes the display with the given GUI display name, like "Left arm camera".
name | The name of the display to remove |
Definition at line 580 of file visualization_manager.cpp.
call Display::reset() on every Display.
Definition at line 592 of file visualization_manager.cpp.
Resets the wall and ROS elapsed time to zero and calls resetDisplays().
Definition at line 509 of file visualization_manager.cpp.
void rviz::VisualizationManager::saveDisplayConfig | ( | const boost::shared_ptr< Config > & | config | ) |
Save the properties of each Display and most editable rviz data.
This is what is called when saving a "*.vcg" file.
config | The object to write to. |
Definition at line 775 of file visualization_manager.cpp.
void rviz::VisualizationManager::setBackgroundColor | ( | const Color & | c | ) |
Set the background color of the main RenderWindow.
Definition at line 924 of file visualization_manager.cpp.
void rviz::VisualizationManager::setCurrentTool | ( | Tool * | tool | ) |
Set the current tool. The current tool is given all mouse and keyboard events which VisualizationManager receives via handleMouseEvent() and handleChar().
Definition at line 614 of file visualization_manager.cpp.
bool rviz::VisualizationManager::setCurrentViewControllerType | ( | const std::string & | type | ) |
Set the current view controller by specifying the desired type.
This accepts the actual C++ class name (with namespace) of the subclass of ViewController and also accepts a number of variants for backward-compatibility:
If `type` is not one of these and there is not a current ViewController, the type defaults to rviz::OrbitViewController. If `type` is not one of these and there *is* a current ViewController, nothing happens.
If the selected type is different from the current type, a new instance of the selected type is created, set in the main RenderPanel, and sent out via the viewControllerChanged() signal.
Definition at line 956 of file visualization_manager.cpp.
void rviz::VisualizationManager::setDefaultTool | ( | Tool * | tool | ) |
Set the default tool.
The default tool is selected directly by pressing the Escape key. The default tool is indirectly selected when a Tool returns Finished in the bit field result of Tool::processMouseEvent(). This is how control moves from the InitialPoseTool back to MoveCamera when InitialPoseTool receives a left mouse button release event.
Definition at line 627 of file visualization_manager.cpp.
void rviz::VisualizationManager::setFixedFrame | ( | const std::string & | frame | ) |
Set the coordinate frame we should be transforming all fixed data into.
frame | The name of the frame -- must match the frame name broadcast to libTF |
Definition at line 856 of file visualization_manager.cpp.
void rviz::VisualizationManager::setTargetFrame | ( | const std::string & | frame | ) |
Set the coordinate frame whose position the display should track.
The view controller sets the camera position by looking at the position of the target frame relative to the fixed frame and adding that to the position of the camera as controlled by the user. This lets the user keep the virtual camera following a robot, for example, but not spinning the camera when the robot spins.
frame | The target frame name -- must match the frame name broadcast to libTF |
Definition at line 829 of file visualization_manager.cpp.
Start timers. Creates and starts the update and idle timers, both set to 30Hz (33ms).
Definition at line 226 of file visualization_manager.cpp.
void rviz::VisualizationManager::threadedQueueThreadFunc | ( | ) | [protected] |
Definition at line 1016 of file visualization_manager.cpp.
void rviz::VisualizationManager::timeChanged | ( | ) | [signal] |
Emitted at most once every 100ms.
void rviz::VisualizationManager::toolAdded | ( | Tool * | ) | [signal] |
Emitted by addTool() after the tool is added to the list of tools.
void rviz::VisualizationManager::toolChanged | ( | Tool * | ) | [signal] |
Emitted by setCurrentTool() after the newly chosen tool is activated.
void rviz::VisualizationManager::unlockRender | ( | ) | [inline] |
Unlock a mutex, allowing calls to Ogre::Root::renderOneFrame().
Definition at line 446 of file visualization_manager.h.
void rviz::VisualizationManager::updateFrames | ( | ) | [protected] |
Definition at line 434 of file visualization_manager.cpp.
void rviz::VisualizationManager::updateRelativeNode | ( | ) | [protected] |
void rviz::VisualizationManager::updateTime | ( | ) | [protected] |
Definition at line 415 of file visualization_manager.cpp.
void rviz::VisualizationManager::viewControllerChanged | ( | ViewController * | ) | [signal] |
Emitted after the current ViewController has changed.
void rviz::VisualizationManager::viewControllerTypeAdded | ( | const std::string & | class_name, |
const std::string & | name | ||
) | [signal] |
Emitted when a new ViewController type is added.
class_name | is the C++ class name with namespace, like "rviz::OrbitViewController". |
name | is the name used for displaying, like "Orbit". |
Definition at line 630 of file visualization_manager.h.
Color rviz::VisualizationManager::background_color_ [protected] |
Definition at line 639 of file visualization_manager.h.
ColorPropertyWPtr rviz::VisualizationManager::background_color_property_ [protected] |
Definition at line 640 of file visualization_manager.h.
Tool* rviz::VisualizationManager::current_tool_ [protected] |
Definition at line 618 of file visualization_manager.h.
Tool* rviz::VisualizationManager::default_tool_ [protected] |
Definition at line 619 of file visualization_manager.h.
bool rviz::VisualizationManager::disable_update_ [protected] |
Definition at line 660 of file visualization_manager.h.
Definition at line 656 of file visualization_manager.h.
Our list of displays.
Definition at line 614 of file visualization_manager.h.
std::string rviz::VisualizationManager::fixed_frame_ [protected] |
Frame to transform fixed data to.
Definition at line 622 of file visualization_manager.h.
EditEnumPropertyWPtr rviz::VisualizationManager::fixed_frame_property_ [protected] |
Definition at line 627 of file visualization_manager.h.
uint64_t rviz::VisualizationManager::frame_count_ [protected] |
Definition at line 651 of file visualization_manager.h.
Definition at line 658 of file visualization_manager.h.
float rviz::VisualizationManager::frame_update_timer_ [protected] |
Definition at line 643 of file visualization_manager.h.
QTimer* rviz::VisualizationManager::idle_timer_ [protected] |
Timer with a timeout of 0. Called by Qt event loop when it has no events to process.
Definition at line 605 of file visualization_manager.h.
Definition at line 652 of file visualization_manager.h.
Update stopwatch. Stores how long it's been since the last update.
Definition at line 602 of file visualization_manager.h.
Definition at line 603 of file visualization_manager.h.
Ogre::Root* rviz::VisualizationManager::ogre_root_ [protected] |
Ogre Root.
Definition at line 598 of file visualization_manager.h.
Definition at line 624 of file visualization_manager.h.
boost::mutex rviz::VisualizationManager::render_mutex_ [protected] |
Definition at line 649 of file visualization_manager.h.
RenderPanel* rviz::VisualizationManager::render_panel_ [protected] |
Definition at line 632 of file visualization_manager.h.
uint32_t rviz::VisualizationManager::render_requested_ [protected] |
Definition at line 650 of file visualization_manager.h.
ros::Time rviz::VisualizationManager::ros_time_begin_ [protected] |
Definition at line 635 of file visualization_manager.h.
Definition at line 637 of file visualization_manager.h.
Ogre::SceneManager* rviz::VisualizationManager::scene_manager_ [protected] |
Ogre scene manager associated with this panel.
Definition at line 599 of file visualization_manager.h.
Definition at line 647 of file visualization_manager.h.
volatile bool rviz::VisualizationManager::shutting_down_ [protected] |
Definition at line 611 of file visualization_manager.h.
StatusPropertyWPtr rviz::VisualizationManager::status_property_ [protected] |
Definition at line 628 of file visualization_manager.h.
std::string rviz::VisualizationManager::target_frame_ [protected] |
Target coordinate frame we're displaying everything in.
Definition at line 621 of file visualization_manager.h.
Definition at line 661 of file visualization_manager.h.
TFFramePropertyWPtr rviz::VisualizationManager::target_frame_property_ [protected] |
Definition at line 626 of file visualization_manager.h.
Ogre::SceneNode* rviz::VisualizationManager::target_scene_node_ [protected] |
Definition at line 663 of file visualization_manager.h.
Definition at line 610 of file visualization_manager.h.
Definition at line 607 of file visualization_manager.h.
boost::thread_group rviz::VisualizationManager::threaded_queue_threads_ [protected] |
Definition at line 608 of file visualization_manager.h.
float rviz::VisualizationManager::time_update_timer_ [protected] |
Definition at line 642 of file visualization_manager.h.
Definition at line 625 of file visualization_manager.h.
V_Tool rviz::VisualizationManager::tools_ [protected] |
Definition at line 617 of file visualization_manager.h.
Definition at line 609 of file visualization_manager.h.
QTimer* rviz::VisualizationManager::update_timer_ [protected] |
Update timer. Display::update is called on each display whenever this timer fires.
Definition at line 601 of file visualization_manager.h.
Definition at line 645 of file visualization_manager.h.
std::deque<ViewportMouseEvent> rviz::VisualizationManager::vme_queue_ [protected] |
Definition at line 665 of file visualization_manager.h.
boost::mutex rviz::VisualizationManager::vme_queue_mutex_ [protected] |
Definition at line 666 of file visualization_manager.h.
Definition at line 634 of file visualization_manager.h.
Definition at line 636 of file visualization_manager.h.
Definition at line 654 of file visualization_manager.h.