30 #ifndef RVIZ_MARKER_DISPLAY_H 31 #define RVIZ_MARKER_DISPLAY_H 36 #include <boost/thread/mutex.hpp> 37 #include <boost/shared_ptr.hpp> 44 #include <visualization_msgs/Marker.h> 45 #include <visualization_msgs/MarkerArray.h> 55 class MarkerNamespace;
56 class MarkerSelectionHandler;
62 typedef std::pair<std::string, int32_t>
MarkerID;
79 void update(
float wall_dt,
float ros_dt)
override;
82 void reset()
override;
135 void processMessage(
const visualization_msgs::Marker::ConstPtr& message);
140 void processAdd(
const visualization_msgs::Marker::ConstPtr& message);
145 void processDelete(
const visualization_msgs::Marker::ConstPtr& message);
150 void incomingMarker(
const visualization_msgs::Marker::ConstPtr& marker);
void processMessage(const visualization_msgs::Marker::ConstPtr &message)
Processes a marker message.
void processAdd(const visualization_msgs::Marker::ConstPtr &message)
Processes an "Add" marker message.
void onDisable() override
Derived classes override this to do the actual work of disabling themselves.
void processDelete(const visualization_msgs::Marker::ConstPtr &message)
Processes a "Delete" marker message.
S_MarkerBase frame_locked_markers_
void setMarkerStatus(MarkerID id, StatusLevel level, const std::string &text)
RosTopicProperty * marker_topic_property_
std::vector< visualization_msgs::Marker::ConstPtr > V_MarkerMessage
A single element of a property tree, with a name, value, description, and possibly children...
IntProperty * queue_size_property_
boost::mutex queue_mutex_
void reset() override
Called to tell the display to clear its state.
void incomingMarker(const visualization_msgs::Marker::ConstPtr &marker)
ROS callback notifying us of a new marker.
virtual void onEnableChanged()
Manager of a single marker namespace. Keeps a hash from marker IDs to MarkerBasePtr, and creates or destroys them when .
void deleteMarkerInternal(MarkerID id)
virtual void unsubscribe()
Unsubscribes from the "visualization_marker" "visualization_marker_array" topics. ...
boost::shared_ptr< MarkerSelectionHandler > MarkerSelectionHandlerPtr
Property specialized to provide max/min enforcement for integers.
M_EnabledState namespace_config_enabled_state_
void deleteMarker(MarkerID id)
Configuration data storage class.
Property * namespaces_category_
void incomingMarkerArray(const visualization_msgs::MarkerArray::ConstPtr &array)
Process a MarkerArray message.
void deleteMarkersInNamespace(const std::string &ns)
Delete all the markers within the given namespace.
std::pair< std::string, int32_t > MarkerID
void update(float wall_dt, float ros_dt) override
Called periodically by the visualization manager.
M_IDToMarker markers_
Map of marker id to the marker info structure.
QHash< QString, MarkerNamespace * > M_Namespace
V_MarkerMessage message_queue_
in our update() function
void deleteMarkerStatus(MarkerID id)
void onInitialize() override
Override this function to do subclass-specific initialization.
ros::Subscriber array_sub_
message_filters::Subscriber< visualization_msgs::Marker > sub_
void setTopic(const QString &topic, const QString &datatype) override
Set the ROS topic to listen to for this display.
~MarkerDisplay() override
friend class MarkerNamespace
tf::MessageFilter< visualization_msgs::Marker > * tf_filter_
void fixedFrameChanged() override
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
void failedMarker(const ros::MessageEvent< visualization_msgs::Marker > &marker_evt, tf::FilterFailureReason reason)
void onEnable() override
Derived classes override this to do the actual work of enabling themselves.
S_MarkerBase markers_with_expiration_
virtual void subscribe()
Subscribes to the "visualization_marker" and "visualization_marker_array" topics. ...
std::map< QString, bool > M_EnabledState
void load(const Config &config) override
Load the value of this property and/or its children from the given Config reference.
void deleteAllMarkers()
Delete all known markers to this plugin, regardless of id or namespace.
boost::shared_ptr< MarkerBase > MarkerBasePtr
Property specialized to provide getter for booleans.
virtual bool getBool() const
Displays "markers" sent in by other ROS nodes on the "visualization_marker" topic.
std::set< MarkerBasePtr > S_MarkerBase
void clearMarkers()
Removes all the markers.
std::map< MarkerID, MarkerBasePtr > M_IDToMarker