Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Slots | Private Member Functions | Private Attributes | Friends
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.

Public Member Functions

void deleteMarker (MarkerID id)
void deleteMarkerStatus (MarkerID id)
virtual void fixedFrameChanged ()
 Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
 MarkerDisplay ()
virtual void onInitialize ()
 Override this function to do subclass-specific initialization.
virtual void reset ()
 Called to tell the display to clear its state.
void setMarkerStatus (MarkerID id, StatusLevel level, const std::string &text)
virtual void update (float wall_dt, float ros_dt)
 Called periodically by the visualization manager.
virtual ~MarkerDisplay ()

Protected Member Functions

void incomingMarkerArray (const visualization_msgs::MarkerArray::ConstPtr &array)
 Process a MarkerArray message.
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 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_
RosTopicPropertymarker_topic_property_
IntPropertyqueue_size_property_

Private Types

typedef std::map< MarkerID,
MarkerBasePtr
M_IDToMarker
typedef QHash< QString,
MarkerNamespace * > 
M_Namespace
typedef std::set< MarkerBasePtrS_MarkerBase
typedef std::vector
< visualization_msgs::Marker::ConstPtr > 
V_MarkerMessage

Private Slots

void updateQueueSize ()
void updateTopic ()

Private Member Functions

void clearMarkers ()
 Removes all the markers.
void deleteMarkersInNamespace (const std::string &ns)
 Delete all the markers within the given namespace.
void failedMarker (const visualization_msgs::Marker::ConstPtr &marker, tf::FilterFailureReason reason)
void incomingMarker (const visualization_msgs::Marker::ConstPtr &marker)
 ROS callback notifying us of a new marker.
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.

Private Attributes

S_MarkerBase frame_locked_markers_
M_IDToMarker markers_
 Map of marker id to the marker info structure.
S_MarkerBase markers_with_expiration_
V_MarkerMessage message_queue_
M_Namespace namespaces_
Propertynamespaces_category_
boost::mutex queue_mutex_
message_filters::Subscriber
< visualization_msgs::Marker > 
sub_
tf::MessageFilter
< visualization_msgs::Marker > * 
tf_filter_

Friends

class MarkerNamespace

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 70 of file marker_display.h.


Member Typedef Documentation

Definition at line 145 of file marker_display.h.

typedef QHash<QString, MarkerNamespace*> rviz::MarkerDisplay::M_Namespace [private]

Definition at line 158 of file marker_display.h.

Definition at line 146 of file marker_display.h.

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

Definition at line 150 of file marker_display.h.


Constructor & Destructor Documentation

Definition at line 60 of file marker_display.cpp.

Definition at line 91 of file marker_display.cpp.


Member Function Documentation

Removes all the markers.

Definition at line 100 of file marker_display.cpp.

Definition at line 166 of file marker_display.cpp.

void rviz::MarkerDisplay::deleteMarkersInNamespace ( const std::string &  ns) [private]

Delete all the markers within the given namespace.

Definition at line 179 of file marker_display.cpp.

Definition at line 212 of file marker_display.cpp.

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

Definition at line 238 of file marker_display.cpp.

Called by setFixedFrame(). Override to respond to changes to fixed_frame_.

Reimplemented from rviz::Display.

Definition at line 444 of file marker_display.cpp.

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

ROS callback notifying us of a new marker.

Definition at line 231 of file marker_display.cpp.

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

Process a MarkerArray message.

Definition at line 220 of file marker_display.cpp.

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

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

Reimplemented from rviz::Display.

Definition at line 115 of file marker_display.cpp.

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

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

Reimplemented from rviz::Display.

Definition at line 110 of file marker_display.cpp.

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 from rviz::Display.

Definition at line 79 of file marker_display.cpp.

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

Processes an "Add" marker message.

Parameters:
messageThe message to process

Definition at line 277 of file marker_display.cpp.

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

Processes a "Delete" marker message.

Parameters:
messageThe message to process

Definition at line 387 of file marker_display.cpp.

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

Processes a marker message.

Parameters:
messageThe message to process

Definition at line 254 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 451 of file marker_display.cpp.

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

Definition at line 204 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 134 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 160 of file marker_display.cpp.

void rviz::MarkerDisplay::update ( float  wall_dt,
float  ros_dt 
) [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 from rviz::Display.

Definition at line 393 of file marker_display.cpp.

void rviz::MarkerDisplay::updateQueueSize ( ) [private, slot]

Definition at line 123 of file marker_display.cpp.

void rviz::MarkerDisplay::updateTopic ( ) [private, slot]

Definition at line 128 of file marker_display.cpp.


Friends And Related Function Documentation

friend class MarkerNamespace [friend]

Definition at line 163 of file marker_display.h.


Member Data Documentation

Definition at line 104 of file marker_display.h.

Definition at line 149 of file marker_display.h.

Definition at line 106 of file marker_display.h.

Map of marker id to the marker info structure.

Definition at line 147 of file marker_display.h.

Definition at line 148 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 151 of file marker_display.h.

Definition at line 159 of file marker_display.h.

Definition at line 161 of file marker_display.h.

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

Definition at line 153 of file marker_display.h.

Definition at line 107 of file marker_display.h.

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

Definition at line 155 of file marker_display.h.

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

Definition at line 156 of file marker_display.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Mon Oct 6 2014 07:26:37