marker_display.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #include <sstream>
31 
34 #include <rviz/display_context.h>
35 #include <rviz/frame_manager.h>
43 #include <rviz/windows_compat.h>
44 
46 
47 
48 namespace rviz
49 {
51 
52 MarkerDisplay::MarkerDisplay() : Display(), tf_filter_(nullptr)
53 {
55  "Marker Topic", "visualization_marker",
56  QString::fromStdString(ros::message_traits::datatype<visualization_msgs::Marker>()),
57  "visualization_msgs::Marker topic to subscribe to. <topic>_array will also"
58  " automatically be subscribed with type visualization_msgs::MarkerArray.",
60 
62  new IntProperty("Queue Size", 100,
63  "Advanced: set the size of the incoming Marker message queue. Increasing this is"
64  " useful if your incoming TF data is delayed significantly from your Marker data, "
65  "but it can greatly increase memory usage if the messages are big.",
68 
69  namespaces_category_ = new Property("Namespaces", QVariant(), "", this);
70 }
71 
73 {
74  tf_filter_ =
76  fixed_frame_.toStdString(),
78 
80  tf_filter_->registerCallback(
81  boost::bind(&MarkerDisplay::incomingMarker, this, boost::placeholders::_1));
83  boost::bind(&MarkerDisplay::failedMarker, this, boost::placeholders::_1, boost::placeholders::_2));
84 
86 }
87 
89 {
90  if (initialized())
91  {
93 
94  clearMarkers();
95 
96  delete tf_filter_;
97  }
98 }
99 
100 void MarkerDisplay::load(const Config& config)
101 {
103 
104  Config c = config.mapGetChild("Namespaces");
105  for (Config::MapIterator iter = c.mapIterator(); iter.isValid(); iter.advance())
106  {
107  QString key = iter.currentKey();
108  const Config& child = iter.currentChild();
109  namespace_config_enabled_state_[key] = child.getValue().toBool();
110  }
111 }
112 
114 {
115  markers_.clear();
116  markers_with_expiration_.clear();
117  frame_locked_markers_.clear();
118  if (tf_filter_) // also clear messages in pipeline
119  tf_filter_->clear();
121  namespaces_.clear();
122 }
123 
125 {
126  subscribe();
127 }
128 
130 {
131  unsubscribe();
132  reset();
133 }
134 
136 {
138  subscribe();
139 }
140 
142 {
143  onDisable();
144  onEnable();
145 }
146 
148 {
149  if (!isEnabled())
150  {
151  return;
152  }
153 
154  std::string marker_topic = marker_topic_property_->getTopicStd();
155  if (!marker_topic.empty())
156  {
158  sub_.unsubscribe();
159 
160  try
161  {
163  array_sub_ = update_nh_.subscribe(marker_topic + "_array", queue_size_property_->getInt(),
165  setStatus(StatusProperty::Ok, "Topic", "OK");
166  }
167  catch (ros::Exception& e)
168  {
169  setStatus(StatusProperty::Error, "Topic", QString("Error subscribing: ") + e.what());
170  }
171  }
172 }
173 
175 {
176  sub_.unsubscribe();
178 }
179 
180 inline void MarkerDisplay::deleteMarker(const MarkerID& id)
181 {
182  deleteMarkerStatus(id);
184 }
185 
187 {
188  M_IDToMarker::iterator it = markers_.find(id);
189  if (it != markers_.end())
190  {
191  markers_with_expiration_.erase(it->second);
192  frame_locked_markers_.erase(it->second);
193  markers_.erase(it);
194  }
195 }
196 
197 void MarkerDisplay::deleteMarkersInNamespace(const std::string& ns)
198 {
199  std::vector<MarkerID> to_delete;
200 
201  // TODO: this is inefficient, should store every in-use id per namespace and lookup by that
202  M_IDToMarker::iterator marker_it = markers_.begin();
203  M_IDToMarker::iterator marker_end = markers_.end();
204  for (; marker_it != marker_end; ++marker_it)
205  {
206  if (marker_it->first.first == ns)
207  {
208  to_delete.push_back(marker_it->first);
209  }
210  }
211 
212  {
213  std::vector<MarkerID>::iterator it = to_delete.begin();
214  std::vector<MarkerID>::iterator end = to_delete.end();
215  for (; it != end; ++it)
216  {
217  deleteMarker(*it);
218  }
219  }
220 }
221 
223 {
224  std::vector<MarkerID> to_delete;
225  M_IDToMarker::iterator marker_it = markers_.begin();
226  for (; marker_it != markers_.end(); ++marker_it)
227  {
228  to_delete.push_back(marker_it->first);
229  }
230 
231  for (std::vector<MarkerID>::iterator it = to_delete.begin(); it != to_delete.end(); ++it)
232  {
233  deleteMarker(*it);
234  }
235 }
236 
237 void MarkerDisplay::setMarkerStatus(const MarkerID& id, StatusLevel level, const std::string& text)
238 {
239  std::stringstream ss;
240  ss << id.first << "/" << id.second;
241  std::string marker_name = ss.str();
242  setStatusStd(level, marker_name, text);
243 }
244 
246 {
247  std::stringstream ss;
248  ss << id.first << "/" << id.second;
249  std::string marker_name = ss.str();
250  deleteStatusStd(marker_name);
251 }
252 
253 void MarkerDisplay::incomingMarkerArray(const visualization_msgs::MarkerArray::ConstPtr& array)
254 {
255  checkMarkerArrayMsg(*array, this);
256  for (const visualization_msgs::Marker& marker : array->markers)
257  {
258  tf_filter_->add(visualization_msgs::Marker::Ptr(new visualization_msgs::Marker(marker)));
259  }
260 }
261 
262 void MarkerDisplay::incomingMarker(const visualization_msgs::Marker::ConstPtr& marker)
263 {
264  boost::mutex::scoped_lock lock(queue_mutex_);
265  message_queue_.push_back(marker);
266 }
267 
270 {
271  const visualization_msgs::Marker::ConstPtr& marker = marker_evt.getConstMessage();
272  if (marker->action == visualization_msgs::Marker::DELETE ||
273  marker->action == visualization_msgs::Marker::DELETEALL)
274  {
275  return this->processMessage(marker);
276  }
277  const std::string& authority = marker_evt.getPublisherName();
278  std::string error = context_->getFrameManager()->discoverFailureReason(
279  marker->header.frame_id, marker->header.stamp, authority, reason);
280 
281  setMarkerStatus(MarkerID(marker->ns, marker->id), StatusProperty::Error, error);
282 }
283 
284 void MarkerDisplay::processMessage(const visualization_msgs::Marker::ConstPtr& message)
285 {
286  switch (message->action)
287  {
288  case visualization_msgs::Marker::ADD:
289  if (checkMarkerMsg(*message, this))
290  processAdd(message);
291  else
292  // delete marker, but keep marker status (generated by checkMarkerMsg)
293  deleteMarkerInternal(MarkerID(message->ns, message->id));
294  break;
295 
296  case visualization_msgs::Marker::DELETE:
297  processDelete(message);
298  break;
299 
300  case visualization_msgs::Marker::DELETEALL:
302  break;
303 
304  default:
305  ROS_ERROR("Unknown marker action: %d\n", message->action);
306  }
307 }
308 
309 void MarkerDisplay::processAdd(const visualization_msgs::Marker::ConstPtr& message)
310 {
311  QString namespace_name = QString::fromStdString(message->ns);
312  M_Namespace::iterator ns_it = namespaces_.find(namespace_name);
313  if (ns_it == namespaces_.end())
314  {
315  ns_it = namespaces_.insert(namespace_name,
316  new MarkerNamespace(namespace_name, namespaces_category_, this));
317 
318  // Adding a new namespace, determine if it's configured to be disabled
319  if (namespace_config_enabled_state_.count(namespace_name) > 0 &&
320  !namespace_config_enabled_state_[namespace_name])
321  {
322  ns_it.value()->setValue(false); // Disable the namespace
323  }
324  }
325 
326  if (!ns_it.value()->isEnabled())
327  {
328  return;
329  }
330 
331  bool create = true;
332  MarkerBasePtr marker;
333 
334  M_IDToMarker::iterator it = markers_.find(MarkerID(message->ns, message->id));
335  if (it != markers_.end())
336  {
337  marker = it->second;
338  markers_with_expiration_.erase(marker);
339  if (message->type == marker->getMessage()->type)
340  {
341  create = false;
342  }
343  else
344  {
345  deleteMarkerInternal(it->first);
346  }
347  }
348 
349  if (create)
350  {
351  marker.reset(createMarker(message->type, this, context_, scene_node_));
352  if (marker)
353  {
354  markers_.insert(std::make_pair(MarkerID(message->ns, message->id), marker));
355  }
356  }
357 
358  if (marker)
359  {
360  marker->setMessage(message);
361 
362  if (message->lifetime.toSec() > 0.0001f)
363  {
364  markers_with_expiration_.insert(marker);
365  }
366 
367  if (message->frame_locked)
368  {
369  frame_locked_markers_.insert(marker);
370  }
371 
373  }
374 }
375 
376 void MarkerDisplay::processDelete(const visualization_msgs::Marker::ConstPtr& message)
377 {
378  deleteMarker(MarkerID(message->ns, message->id));
379 
381 }
382 
383 void MarkerDisplay::update(float /*wall_dt*/, float /*ros_dt*/)
384 {
385  V_MarkerMessage local_queue;
386 
387  {
388  boost::mutex::scoped_lock lock(queue_mutex_);
389 
390  local_queue.swap(message_queue_);
391  }
392 
393  if (!local_queue.empty())
394  {
395  V_MarkerMessage::iterator message_it = local_queue.begin();
396  V_MarkerMessage::iterator message_end = local_queue.end();
397  for (; message_it != message_end; ++message_it)
398  {
399  visualization_msgs::Marker::ConstPtr& marker = *message_it;
400 
401  processMessage(marker);
402  }
403  }
404 
405  {
406  S_MarkerBase::iterator it = markers_with_expiration_.begin();
407  S_MarkerBase::iterator end = markers_with_expiration_.end();
408  for (; it != end;)
409  {
410  MarkerBasePtr marker = *it;
411  if (marker->expired())
412  {
413  ++it;
414  deleteMarker(marker->getID());
415  }
416  else
417  {
418  ++it;
419  }
420  }
421  }
422 
423  {
424  S_MarkerBase::iterator it = frame_locked_markers_.begin();
425  S_MarkerBase::iterator end = frame_locked_markers_.end();
426  for (; it != end; ++it)
427  {
428  MarkerBasePtr marker = *it;
429  marker->updateFrameLocked();
430  }
431  }
432 }
433 
435 {
436  tf_filter_->setTargetFrame(fixed_frame_.toStdString());
437 
438  clearMarkers();
439 }
440 
442 {
443  Display::reset();
444  clearMarkers();
445 }
446 
447 void MarkerDisplay::setTopic(const QString& topic, const QString& /*datatype*/)
448 {
450 }
451 
453 // MarkerNamespace
454 
455 MarkerNamespace::MarkerNamespace(const QString& name, Property* parent_property, MarkerDisplay* owner)
456  : BoolProperty(name, true, "Enable/disable all markers in this namespace.", parent_property)
457  , owner_(owner)
458 {
459  // Can't do this connect in chained constructor above because at
460  // that point it doesn't really know that "this" is a
461  // MarkerNamespace*, so the signal doesn't get connected.
463 }
464 
466 {
467  if (!isEnabled())
468  {
469  owner_->deleteMarkersInNamespace(getName().toStdString());
470  }
471 
472  // Update the configuration that stores the enabled state of all markers
474 }
475 
476 } // namespace rviz
477 
shape.h
rviz::MarkerDisplay::onDisable
void onDisable() override
Derived classes override this to do the actual work of disabling themselves.
Definition: marker_display.cpp:129
rviz::Display::isEnabled
bool isEnabled() const
Return true if this Display is enabled, false if not.
Definition: display.cpp:271
rviz::IntProperty::setMin
void setMin(int min)
Definition: int_property.cpp:52
rviz::RosTopicProperty
Definition: ros_topic_property.h:39
windows_compat.h
rviz::MarkerDisplay
Displays "markers" sent in by other ROS nodes on the "visualization_marker" topic.
Definition: marker_display.h:70
tf2_ros::MessageFilter::registerFailureCallback
message_filters::Connection registerFailureCallback(const FailureCallback &callback)
frame_manager.h
rviz::DisplayContext::queueRender
virtual void queueRender()=0
Queues a render. Multiple calls before a render happens will only cause a single render.
rviz::MarkerDisplay::MarkerDisplay
MarkerDisplay()
Definition: marker_display.cpp:52
tf2_ros::MessageFilter< visualization_msgs::Marker >
boost::shared_ptr
rviz::Display::initialized
bool initialized() const
Returns true if the display has been initialized.
Definition: display.h:275
rviz::StatusProperty::Error
@ Error
Definition: status_property.h:46
rviz::Config::MapIterator::isValid
bool isValid()
Return true if the iterator currently points to a valid entry, false if not.
Definition: config.cpp:392
rviz::MarkerDisplay::sub_
message_filters::Subscriber< visualization_msgs::Marker > sub_
Definition: marker_display.h:166
ros_topic_property.h
rviz::MarkerDisplay::update
void update(float wall_dt, float ros_dt) override
Called periodically by the visualization manager.
Definition: marker_display.cpp:383
rviz::MarkerDisplay::processAdd
void processAdd(const visualization_msgs::Marker::ConstPtr &message)
Processes an "Add" marker message.
Definition: marker_display.cpp:309
rviz::MarkerDisplay::reset
void reset() override
Called to tell the display to clear its state.
Definition: marker_display.cpp:441
property.h
rviz::MarkerDisplay::incomingMarker
void incomingMarker(const visualization_msgs::Marker::ConstPtr &marker)
ROS callback notifying us of a new marker.
Definition: marker_display.cpp:262
rviz::createMarker
MarkerBase * createMarker(int marker_type, MarkerDisplay *owner, DisplayContext *context, Ogre::SceneNode *parent_node)
Definition: marker_utils.cpp:53
rviz::MarkerDisplay::onEnable
void onEnable() override
Derived classes override this to do the actual work of enabling themselves.
Definition: marker_display.cpp:124
tf2_ros::filter_failure_reasons::FilterFailureReason
FilterFailureReason
rviz::StatusProperty::Level
Level
Definition: status_property.h:42
int_property.h
rviz::BoolProperty
Property specialized to provide getter for booleans.
Definition: bool_property.h:38
rviz::EditableEnumProperty::setString
virtual void setString(const QString &str)
Definition: editable_enum_property.cpp:74
rviz::MarkerDisplay::message_queue_
V_MarkerMessage message_queue_
in our update() function
Definition: marker_display.h:161
marker_display.h
ros::MessageEvent::getPublisherName
const std::string & getPublisherName() const
rviz::MarkerDisplay::array_sub_
ros::Subscriber array_sub_
Definition: marker_display.h:113
ros::Subscriber::shutdown
void shutdown()
rviz::MarkerDisplay::namespaces_category_
Property * namespaces_category_
Definition: marker_display.h:172
ros::Exception
selection_manager.h
rviz::Display::fixed_frame_
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
Definition: display.h:312
rviz::MarkerNamespace::onEnableChanged
void onEnableChanged()
Definition: marker_display.cpp:465
rviz::MarkerNamespace::MarkerNamespace
MarkerNamespace(const QString &name, Property *parent_property, MarkerDisplay *owner)
Definition: marker_display.cpp:455
ros::MessageEvent::getConstMessage
const boost::shared_ptr< ConstMessage > & getConstMessage() const
rviz::MarkerDisplay::V_MarkerMessage
std::vector< visualization_msgs::Marker::ConstPtr > V_MarkerMessage
Definition: marker_display.h:160
message_filters::Subscriber::unsubscribe
void unsubscribe()
rviz::Property::Property
Property(const QString &name=QString(), const QVariant &default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr)
Constructor.
Definition: property.cpp:59
rviz::MarkerDisplay::setTopic
void setTopic(const QString &topic, const QString &datatype) override
Set the ROS topic to listen to for this display.
Definition: marker_display.cpp:447
rviz::Display::deleteStatusStd
void deleteStatusStd(const std::string &name)
Delete the status entry with the given std::string name. This is thread-safe.
Definition: display.h:172
rviz::MarkerDisplay::queue_mutex_
boost::mutex queue_mutex_
Definition: marker_display.h:164
rviz::Property::connect
QMetaObject::Connection connect(const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection)
Connect changed() signal to given slot of receiver.
Definition: property.cpp:78
rviz::MarkerNamespace::owner_
MarkerDisplay * owner_
Definition: marker_display.h:196
rviz::Display
Definition: display.h:63
rviz::Property
A single element of a property tree, with a name, value, description, and possibly children.
Definition: property.h:100
rviz::MarkerDisplay::processMessage
void processMessage(const visualization_msgs::Marker::ConstPtr &message)
Processes a marker message.
Definition: marker_display.cpp:284
rviz::Display::setStatus
virtual void setStatus(StatusProperty::Level level, const QString &name, const QString &text)
Show status level and text. This is thread-safe.
Definition: display.cpp:176
rviz::MarkerDisplay::deleteMarker
void deleteMarker(const MarkerID &id)
Definition: marker_display.cpp:180
rviz::MarkerDisplay::deleteMarkerInternal
void deleteMarkerInternal(const MarkerID &id)
Definition: marker_display.cpp:186
PLUGINLIB_EXPORT_CLASS
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
tf2_ros::MessageFilter::clear
void clear()
rviz::MarkerDisplay::load
void load(const Config &config) override
Load the value of this property and/or its children from the given Config reference.
Definition: marker_display.cpp:100
rviz
Definition: add_display_dialog.cpp:54
rviz::Display::scene_node_
Ogre::SceneNode * scene_node_
The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
Definition: display.h:295
rviz::StatusProperty::Ok
@ Ok
Definition: status_property.h:44
rviz::MarkerDisplay::~MarkerDisplay
~MarkerDisplay() override
Definition: marker_display.cpp:88
rviz::MarkerDisplay::namespace_config_enabled_state_
M_EnabledState namespace_config_enabled_state_
Definition: marker_display.h:175
rviz::MarkerDisplay::tf_filter_
tf2_ros::MessageFilter< visualization_msgs::Marker > * tf_filter_
Definition: marker_display.h:167
arrow.h
rviz::MarkerDisplay::deleteMarkerStatus
void deleteMarkerStatus(const MarkerID &id)
Definition: marker_display.cpp:245
rviz::MarkerDisplay::namespaces_
M_Namespace namespaces_
Definition: marker_display.h:170
rviz::Display::load
void load(const Config &config) override
Load the settings for this display from the given Config node, which must be a map.
Definition: display.cpp:231
rviz::checkMarkerMsg
bool checkMarkerMsg(const visualization_msgs::Marker &marker, MarkerDisplay *owner)
Definition: marker_utils.cpp:419
rviz::MarkerDisplay::unsubscribe
virtual void unsubscribe()
Unsubscribes from the "visualization_marker" "visualization_marker_array" topics.
Definition: marker_display.cpp:174
tf2_ros::MessageFilter::setTargetFrame
void setTargetFrame(const std::string &target_frame)
ros::NodeHandle::subscribe
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
rviz::DisplayContext::getFrameManager
virtual FrameManager * getFrameManager() const =0
Return the FrameManager instance.
tf2_ros::MessageFilter::setQueueSize
virtual void setQueueSize(uint32_t new_queue_size)
rviz::RosTopicProperty::getTopicStd
std::string getTopicStd() const
Definition: ros_topic_property.h:85
rviz::MarkerDisplay::deleteAllMarkers
void deleteAllMarkers()
Delete all known markers to this plugin, regardless of id or namespace.
Definition: marker_display.cpp:222
tf2_ros::MessageFilter::connectInput
void connectInput(F &f)
rviz::MarkerNamespace::isEnabled
bool isEnabled() const
Definition: marker_display.h:187
message_filters::Subscriber::subscribe
void subscribe()
billboard_line.h
rviz::Property::getName
virtual QString getName() const
Return the name of this Property as a QString.
Definition: property.cpp:164
rviz::Display::setStatusStd
void setStatusStd(StatusProperty::Level level, const std::string &name, const std::string &text)
Show status level and text, using a std::string. Convenience function which converts std::string to Q...
Definition: display.h:163
rviz::Display::context_
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz....
Definition: display.h:287
rviz::MarkerDisplay::updateQueueSize
void updateQueueSize()
Definition: marker_display.cpp:135
rviz::MarkerDisplay::markers_
M_IDToMarker markers_
Map of marker id to the marker info structure.
Definition: marker_display.h:157
rviz::MarkerID
std::pair< std::string, int32_t > MarkerID
Definition: interactive_marker_display.h:58
rviz::checkMarkerArrayMsg
bool checkMarkerArrayMsg(const visualization_msgs::MarkerArray &array, MarkerDisplay *owner)
Definition: marker_utils.cpp:526
rviz::MarkerDisplay::clearMarkers
void clearMarkers()
Removes all the markers.
Definition: marker_display.cpp:113
rviz::MarkerDisplay::subscribe
virtual void subscribe()
Subscribes to the "visualization_marker" and "visualization_marker_array" topics.
Definition: marker_display.cpp:147
marker_utils.h
rviz::MarkerDisplay::frame_locked_markers_
S_MarkerBase frame_locked_markers_
Definition: marker_display.h:159
ROS_ERROR
#define ROS_ERROR(...)
rviz::MarkerDisplay::marker_topic_property_
RosTopicProperty * marker_topic_property_
Definition: marker_display.h:115
rviz::MarkerDisplay::onInitialize
void onInitialize() override
Override this function to do subclass-specific initialization.
Definition: marker_display.cpp:72
tf2_ros::MessageFilter::add
void add(const MConstPtr &message)
class_list_macros.hpp
rviz::Property::changed
void changed()
Emitted by setValue() just after the value has changed.
rviz::Display::reset
virtual void reset()
Called to tell the display to clear its state.
Definition: display.cpp:290
marker_base.h
rviz::IntProperty::getInt
virtual int getInt() const
Return the internal property value as an integer.
Definition: int_property.h:96
rviz::MarkerDisplay::processDelete
void processDelete(const visualization_msgs::Marker::ConstPtr &message)
Processes a "Delete" marker message.
Definition: marker_display.cpp:376
rviz::MarkerDisplay::markers_with_expiration_
S_MarkerBase markers_with_expiration_
Definition: marker_display.h:158
display_context.h
rviz::MarkerDisplay::failedMarker
void failedMarker(const ros::MessageEvent< visualization_msgs::Marker > &marker_evt, tf2_ros::FilterFailureReason reason)
Definition: marker_display.cpp:268
rviz::MarkerDisplay::queue_size_property_
IntProperty * queue_size_property_
Definition: marker_display.h:116
rviz::Config::MapIterator
Iterator class for looping over all entries in a Map type Config Node.
Definition: config.h:291
rviz::MarkerDisplay::incomingMarkerArray
void incomingMarkerArray(const visualization_msgs::MarkerArray::ConstPtr &array)
Process a MarkerArray message.
Definition: marker_display.cpp:253
rviz::Property::removeChildren
virtual void removeChildren(int start_index=0, int count=-1)
Remove and delete some or all child Properties. Does not change the value of this Property.
Definition: property.cpp:104
rviz::MarkerDisplay::deleteMarkersInNamespace
void deleteMarkersInNamespace(const std::string &ns)
Delete all the markers within the given namespace.
Definition: marker_display.cpp:197
rviz::Config::mapIterator
MapIterator mapIterator() const
Return a new iterator for looping over key/value pairs.
Definition: config.cpp:351
config
config
rviz::MarkerDisplay::fixedFrameChanged
void fixedFrameChanged() override
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
Definition: marker_display.cpp:434
rviz::DisplayContext::getTF2BufferPtr
std::shared_ptr< tf2_ros::Buffer > getTF2BufferPtr() const
Convenience function: returns getFrameManager()->getTF2BufferPtr().
Definition: display_context.h:98
rviz::Config
Configuration data storage class.
Definition: config.h:124
rviz::MarkerDisplay::MarkerNamespace
friend class MarkerNamespace
Definition: marker_display.h:177
rviz::Display::update_nh_
ros::NodeHandle update_nh_
A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).
Definition: display.h:300
ros::MessageEvent
rviz::Config::getValue
QVariant getValue() const
If this config object is valid and is a Value type, this returns its value. Otherwise it returns an i...
Definition: config.cpp:319
rviz::FrameManager::discoverFailureReason
std::string discoverFailureReason(const std::string &frame_id, const ros::Time &stamp, const std::string &caller_id, tf2_ros::FilterFailureReason reason)
Definition: frame_manager.cpp:311
rviz::IntProperty
Property specialized to provide max/min enforcement for integers.
Definition: int_property.h:37
rviz::MarkerDisplay::updateTopic
void updateTopic()
Definition: marker_display.cpp:141
rviz::MarkerDisplay::setMarkerStatus
void setMarkerStatus(const MarkerID &id, StatusLevel level, const std::string &text)
Definition: marker_display.cpp:237


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02