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 deleteAllMarkers ()
 Delete all known markers to this plugin, regardless of id or namespace.
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 setTopic (const QString &topic, const QString &datatype)
 Set the ROS topic to listen to for this display.
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 load (const Config &config)
 Load the settings for this display from the given Config node, which must be a map.
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< QString, bool > M_EnabledState
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 ros::MessageEvent< visualization_msgs::Marker > &marker_evt, 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_EnabledState namespace_config_enabled_state_
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

typedef std::map<QString, bool> rviz::MarkerDisplay::M_EnabledState [private]

Definition at line 170 of file marker_display.h.

Definition at line 152 of file marker_display.h.

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

Definition at line 165 of file marker_display.h.

Definition at line 153 of file marker_display.h.

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

Definition at line 157 of file marker_display.h.


Constructor & Destructor Documentation

Definition at line 60 of file marker_display.cpp.

Definition at line 93 of file marker_display.cpp.


Member Function Documentation

Removes all the markers.

Definition at line 118 of file marker_display.cpp.

Delete all known markers to this plugin, regardless of id or namespace.

Definition at line 222 of file marker_display.cpp.

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

Definition at line 245 of file marker_display.cpp.

void rviz::MarkerDisplay::failedMarker ( const ros::MessageEvent< visualization_msgs::Marker > &  marker_evt,
tf::FilterFailureReason  reason 
) [private]

Definition at line 271 of file marker_display.cpp.

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

Reimplemented from rviz::Display.

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

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

Process a MarkerArray message.

Definition at line 253 of file marker_display.cpp.

void rviz::MarkerDisplay::load ( const Config config) [protected, 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::Display.

Definition at line 105 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 133 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 128 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 321 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 438 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 294 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 503 of file marker_display.cpp.

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

Definition at line 237 of file marker_display.cpp.

void rviz::MarkerDisplay::setTopic ( const QString &  topic,
const QString &  datatype 
) [virtual]

Set the ROS topic to listen to for this display.

By default, do nothing. Subclasses should override this method if they subscribe to a single ROS topic.

setTopic() is used by the "New display by topic" window; it is called with a user selected topic and its type.

Parameters:
topicThe published topic to be visualized.
datatypeThe datatype of the topic.

Reimplemented from rviz::Display.

Definition at line 509 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 152 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 178 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 445 of file marker_display.cpp.

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

Definition at line 141 of file marker_display.cpp.

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

Definition at line 146 of file marker_display.cpp.


Friends And Related Function Documentation

friend class MarkerNamespace [friend]

Definition at line 173 of file marker_display.h.


Member Data Documentation

Definition at line 111 of file marker_display.h.

Definition at line 156 of file marker_display.h.

Definition at line 113 of file marker_display.h.

Map of marker id to the marker info structure.

Definition at line 154 of file marker_display.h.

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

Definition at line 171 of file marker_display.h.

Definition at line 166 of file marker_display.h.

Definition at line 168 of file marker_display.h.

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

Definition at line 160 of file marker_display.h.

Definition at line 114 of file marker_display.h.

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

Definition at line 162 of file marker_display.h.

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

Definition at line 163 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 Tue Oct 3 2017 03:19:32