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 virtual void update(
float wall_dt,
float ros_dt);
92 virtual void setTopic(
const QString &topic,
const QString &datatype );
133 void processMessage(
const visualization_msgs::Marker::ConstPtr& message );
138 void processAdd(
const visualization_msgs::Marker::ConstPtr& message );
143 void processDelete(
const visualization_msgs::Marker::ConstPtr& message );
148 void incomingMarker(
const visualization_msgs::Marker::ConstPtr& marker);
void processMessage(const visualization_msgs::Marker::ConstPtr &message)
Processes a marker message.
virtual void update(float wall_dt, float ros_dt)
Called periodically by the visualization manager.
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.
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_
virtual void reset()
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 .
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.
virtual bool getBool() const
void deleteMarkersInNamespace(const std::string &ns)
Delete all the markers within the given namespace.
std::pair< std::string, int32_t > MarkerID
M_IDToMarker markers_
Map of marker id to the marker info structure.
QHash< QString, MarkerNamespace * > M_Namespace
V_MarkerMessage message_queue_
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.
void deleteMarkerStatus(MarkerID id)
virtual void fixedFrameChanged()
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
ros::Subscriber array_sub_
message_filters::Subscriber< visualization_msgs::Marker > sub_
friend class MarkerNamespace
tf::MessageFilter< visualization_msgs::Marker > * tf_filter_
void failedMarker(const ros::MessageEvent< visualization_msgs::Marker > &marker_evt, tf::FilterFailureReason reason)
S_MarkerBase markers_with_expiration_
virtual void subscribe()
Subscribes to the "visualization_marker" and "visualization_marker_array" topics. ...
virtual void onEnable()
Derived classes override this to do the actual work of enabling themselves.
std::map< QString, bool > M_EnabledState
virtual void setTopic(const QString &topic, const QString &datatype)
Set the ROS topic to listen to for this display.
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.
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
virtual void onInitialize()
Override this function to do subclass-specific initialization.