Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
rviz::MarkerDisplay Class Reference

Displays "markers" sent in by other ROS nodes on the "visualization_marker" topic. More...

#include <marker_display.h>

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

List of all members.

Classes

struct  Namespace

Public Member Functions

virtual void createProperties ()
 Called from setPropertyManager, gives the display a chance to create some properties immediately.
void deleteMarker (MarkerID id)
void deleteMarkerStatus (MarkerID id)
virtual void fixedFrameChanged ()
 Override to handle changes to fixed_frame_. This base class implementation does nothing.
const std::string & getMarkerTopic ()
int getQueueSize ()
virtual void hideVisible ()
 Hides all visible parts of this display, so they do not show up when the scene is rendered.
bool isNamespaceEnabled (const std::string &ns)
 MarkerDisplay ()
virtual void onInitialize ()
 Override this function to do subclass-specific initialization.
virtual void reset ()
 Called to tell the display to clear its state.
virtual void restoreVisible ()
 Restores the display to the state it was in before hideVisible() was called.
void setMarkerStatus (MarkerID id, StatusLevel level, const std::string &text)
void setMarkerTopic (const std::string &topic)
void setNamespaceEnabled (const std::string &ns, bool enabled)
void setQueueSize (int size)
virtual void update (float wall_dt, float ros_dt)
 Called periodically by the visualization panel.
virtual ~MarkerDisplay ()

Protected Types

typedef std::map< MarkerID,
MarkerBasePtr
M_IDToMarker
typedef std::map< std::string,
Namespace
M_Namespace
typedef std::set< MarkerBasePtrS_MarkerBase
typedef std::vector
< visualization_msgs::Marker::ConstPtr > 
V_MarkerMessage

Protected Member Functions

void clearMarkers ()
 Removes all the markers.
void failedMarker (const visualization_msgs::Marker::ConstPtr &marker, tf::FilterFailureReason reason)
MarkerBasePtr getMarker (MarkerID id)
void incomingMarker (const visualization_msgs::Marker::ConstPtr &marker)
 ROS callback notifying us of a new marker.
void incomingMarkerArray (const visualization_msgs::MarkerArray::ConstPtr &array)
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.
void processAdd (const visualization_msgs::Marker::ConstPtr &message)
 Processes an "Add" marker message.
void processDelete (const visualization_msgs::Marker::ConstPtr &message)
 Processes a "Delete" marker message.
void processMessage (const visualization_msgs::Marker::ConstPtr &message)
 Processes a marker message.
virtual void subscribe ()
 Subscribes to the "visualization_marker" and "visualization_marker_array" topics.
virtual void unsubscribe ()
 Unsubscribes from the "visualization_marker" "visualization_marker_array" topics.

Protected Attributes

ros::Subscriber array_sub_
S_MarkerBase frame_locked_markers_
bool hidden_
std::string marker_topic_
ROSTopicStringPropertyWPtr marker_topic_property_
M_IDToMarker markers_
 Map of marker id to the marker info structure.
S_MarkerBase markers_with_expiration_
V_MarkerMessage message_queue_
M_Namespace namespaces_
CategoryPropertyWPtr namespaces_category_
boost::mutex queue_mutex_
IntPropertyWPtr queue_size_property_
Ogre::SceneNode * scene_node_
 Scene node all the marker objects are parented to.
message_filters::Subscriber
< visualization_msgs::Marker > 
sub_
tf::MessageFilter
< visualization_msgs::Marker > * 
tf_filter_

Detailed Description

Displays "markers" sent in by other ROS nodes on the "visualization_marker" topic.

Markers come in as visualization_msgs::Marker messages. See the Marker message for more information.

Definition at line 76 of file marker_display.h.


Member Typedef Documentation

Definition at line 157 of file marker_display.h.

typedef std::map<std::string, Namespace> rviz::MarkerDisplay::M_Namespace [protected]

Definition at line 181 of file marker_display.h.

Definition at line 158 of file marker_display.h.

typedef std::vector<visualization_msgs::Marker::ConstPtr> rviz::MarkerDisplay::V_MarkerMessage [protected]

Definition at line 162 of file marker_display.h.


Constructor & Destructor Documentation

Definition at line 64 of file marker_display.cpp.

Definition at line 81 of file marker_display.cpp.


Member Function Documentation

void rviz::MarkerDisplay::clearMarkers ( ) [protected]

Removes all the markers.

Definition at line 101 of file marker_display.cpp.

Called from setPropertyManager, gives the display a chance to create some properties immediately.

When this function is called, the property_manager_ member is valid and will stay valid

Reimplemented from rviz::Display.

Reimplemented in rviz::MarkerArrayDisplay.

Definition at line 521 of file marker_display.cpp.

Definition at line 201 of file marker_display.cpp.

Definition at line 264 of file marker_display.cpp.

void rviz::MarkerDisplay::failedMarker ( const visualization_msgs::Marker::ConstPtr &  marker,
tf::FilterFailureReason  reason 
) [protected]

Definition at line 290 of file marker_display.cpp.

Override to handle changes to fixed_frame_. This base class implementation does nothing.

Reimplemented from rviz::Display.

Definition at line 508 of file marker_display.cpp.

Definition at line 90 of file marker_display.cpp.

const std::string& rviz::MarkerDisplay::getMarkerTopic ( ) [inline]

Definition at line 90 of file marker_display.h.

Definition at line 156 of file marker_display.cpp.

Hides all visible parts of this display, so they do not show up when the scene is rendered.

Reimplemented from rviz::Display.

Definition at line 135 of file marker_display.cpp.

void rviz::MarkerDisplay::incomingMarker ( const visualization_msgs::Marker::ConstPtr &  marker) [protected]

ROS callback notifying us of a new marker.

Definition at line 283 of file marker_display.cpp.

void rviz::MarkerDisplay::incomingMarkerArray ( const visualization_msgs::MarkerArray::ConstPtr &  array) [protected]

Definition at line 272 of file marker_display.cpp.

bool rviz::MarkerDisplay::isNamespaceEnabled ( const std::string &  ns)

Definition at line 245 of file marker_display.cpp.

void rviz::MarkerDisplay::onDisable ( ) [protected, virtual]

Derived classes override this to do the actual work of disabling themselves.

Implements rviz::Display.

Definition at line 127 of file marker_display.cpp.

void rviz::MarkerDisplay::onEnable ( ) [protected, virtual]

Derived classes override this to do the actual work of enabling themselves.

Implements rviz::Display.

Definition at line 121 of file marker_display.cpp.

Override this function to do subclass-specific initialization.

This is called after vis_manager_ and scene_manager_ are set.

Reimplemented from rviz::Display.

Definition at line 71 of file marker_display.cpp.

void rviz::MarkerDisplay::processAdd ( const visualization_msgs::Marker::ConstPtr &  message) [protected]

Processes an "Add" marker message.

Parameters:
messageThe message to process

Definition at line 329 of file marker_display.cpp.

void rviz::MarkerDisplay::processDelete ( const visualization_msgs::Marker::ConstPtr &  message) [protected]

Processes a "Delete" marker message.

Parameters:
messageThe message to process

Definition at line 450 of file marker_display.cpp.

void rviz::MarkerDisplay::processMessage ( const visualization_msgs::Marker::ConstPtr &  message) [protected]

Processes a marker message.

Parameters:
messageThe message to process

Definition at line 306 of file marker_display.cpp.

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

Called to tell the display to clear its state.

Reimplemented from rviz::Display.

Definition at line 515 of file marker_display.cpp.

Restores the display to the state it was in before hideVisible() was called.

Reimplemented from rviz::Display.

Definition at line 141 of file marker_display.cpp.

void rviz::MarkerDisplay::setMarkerStatus ( MarkerID  id,
StatusLevel  level,
const std::string &  text 
)

Definition at line 256 of file marker_display.cpp.

void rviz::MarkerDisplay::setMarkerTopic ( const std::string &  topic)

Definition at line 161 of file marker_display.cpp.

void rviz::MarkerDisplay::setNamespaceEnabled ( const std::string &  ns,
bool  enabled 
)

Definition at line 214 of file marker_display.cpp.

Set the incoming message queue size.

Definition at line 147 of file marker_display.cpp.

void rviz::MarkerDisplay::subscribe ( ) [protected, virtual]

Subscribes to the "visualization_marker" and "visualization_marker_array" topics.

Reimplemented in rviz::MarkerArrayDisplay.

Definition at line 170 of file marker_display.cpp.

void rviz::MarkerDisplay::unsubscribe ( ) [protected, virtual]

Unsubscribes from the "visualization_marker" "visualization_marker_array" topics.

Reimplemented in rviz::MarkerArrayDisplay.

Definition at line 195 of file marker_display.cpp.

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

Called periodically by the visualization panel.

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

Reimplemented from rviz::Display.

Definition at line 456 of file marker_display.cpp.


Member Data Documentation

Definition at line 171 of file marker_display.h.

Definition at line 161 of file marker_display.h.

Definition at line 188 of file marker_display.h.

std::string rviz::MarkerDisplay::marker_topic_ [protected]

Definition at line 173 of file marker_display.h.

ROSTopicStringPropertyWPtr rviz::MarkerDisplay::marker_topic_property_ [protected]

Definition at line 184 of file marker_display.h.

Map of marker id to the marker info structure.

Definition at line 159 of file marker_display.h.

Definition at line 160 of file marker_display.h.

Marker message queue. Messages are added to this as they are received, and then processed in our update() function

Definition at line 163 of file marker_display.h.

Definition at line 182 of file marker_display.h.

CategoryPropertyWPtr rviz::MarkerDisplay::namespaces_category_ [protected]

Definition at line 185 of file marker_display.h.

boost::mutex rviz::MarkerDisplay::queue_mutex_ [protected]

Definition at line 165 of file marker_display.h.

IntPropertyWPtr rviz::MarkerDisplay::queue_size_property_ [protected]

Definition at line 186 of file marker_display.h.

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

Scene node all the marker objects are parented to.

Definition at line 167 of file marker_display.h.

message_filters::Subscriber<visualization_msgs::Marker> rviz::MarkerDisplay::sub_ [protected]

Definition at line 169 of file marker_display.h.

tf::MessageFilter<visualization_msgs::Marker>* rviz::MarkerDisplay::tf_filter_ [protected]

Definition at line 170 of file marker_display.h.


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


rviz
Author(s): Dave Hershberger, Josh Faust
autogenerated on Mon Jan 6 2014 11:54:33