Displays "markers" sent in by other ROS nodes on the "visualization_marker" topic. More...
#include <marker_display.h>
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_ |
RosTopicProperty * | marker_topic_property_ |
IntProperty * | queue_size_property_ |
Private Types | |
typedef std::map< MarkerID, MarkerBasePtr > | M_IDToMarker |
typedef QHash< QString, MarkerNamespace * > | M_Namespace |
typedef std::set< MarkerBasePtr > | S_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_ |
Property * | namespaces_category_ |
boost::mutex | queue_mutex_ |
message_filters::Subscriber < visualization_msgs::Marker > | sub_ |
tf::MessageFilter < visualization_msgs::Marker > * | tf_filter_ |
Friends | |
class | MarkerNamespace |
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.
typedef std::map<MarkerID, MarkerBasePtr> rviz::MarkerDisplay::M_IDToMarker [private] |
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.
typedef std::set<MarkerBasePtr> rviz::MarkerDisplay::S_MarkerBase [private] |
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.
Definition at line 60 of file marker_display.cpp.
rviz::MarkerDisplay::~MarkerDisplay | ( | ) | [virtual] |
Definition at line 91 of file marker_display.cpp.
void rviz::MarkerDisplay::clearMarkers | ( | ) | [private] |
Removes all the markers.
Definition at line 100 of file marker_display.cpp.
void rviz::MarkerDisplay::deleteMarker | ( | MarkerID | id | ) |
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.
void rviz::MarkerDisplay::deleteMarkerStatus | ( | MarkerID | id | ) |
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.
void rviz::MarkerDisplay::fixedFrameChanged | ( | ) | [virtual] |
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.
void rviz::MarkerDisplay::onInitialize | ( | ) | [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 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.
message | The 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.
message | The 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.
message | The 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.
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 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.
friend class MarkerNamespace [friend] |
Definition at line 163 of file marker_display.h.
ros::Subscriber rviz::MarkerDisplay::array_sub_ [protected] |
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.
M_IDToMarker rviz::MarkerDisplay::markers_ [private] |
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.
M_Namespace rviz::MarkerDisplay::namespaces_ [private] |
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.
IntProperty* rviz::MarkerDisplay::queue_size_property_ [protected] |
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.