Display subclass using a tf::MessageFilter, templated on the ROS message type. More...
#include <message_filter_display.h>
Public Types | |
typedef MessageFilterDisplay < MessageType > | MFDClass |
Convenience typedef so subclasses don't have to use the long templated class name to refer to their super class. | |
Public Member Functions | |
MessageFilterDisplay () | |
virtual void | onInitialize () |
Override this function to do subclass-specific initialization. | |
virtual void | reset () |
Called to tell the display to clear its state. | |
virtual void | setTopic (const QString &topic, const QString &datatype) |
Set the ROS topic to listen to for this display. | |
virtual | ~MessageFilterDisplay () |
Protected Member Functions | |
virtual void | fixedFrameChanged () |
Called by setFixedFrame(). Override to respond to changes to fixed_frame_. | |
void | incomingMessage (const typename MessageType::ConstPtr &msg) |
Incoming message callback. Checks if the message pointer is valid, increments messages_received_, then calls processMessage(). | |
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 | processMessage (const typename MessageType::ConstPtr &msg)=0 |
Implement this to process the contents of a message. | |
virtual void | subscribe () |
virtual void | unsubscribe () |
virtual void | updateTopic () |
Protected Attributes | |
uint32_t | messages_received_ |
message_filters::Subscriber < MessageType > | sub_ |
tf::MessageFilter< MessageType > * | tf_filter_ |
Display subclass using a tf::MessageFilter, templated on the ROS message type.
This class brings together some common things used in many Display types. It has a tf::MessageFilter to filter incoming messages, and it handles subscribing and unsubscribing when the display is enabled or disabled. It also has an Ogre::SceneNode which
Definition at line 77 of file message_filter_display.h.
typedef MessageFilterDisplay<MessageType> rviz::MessageFilterDisplay< MessageType >::MFDClass |
Convenience typedef so subclasses don't have to use the long templated class name to refer to their super class.
Definition at line 83 of file message_filter_display.h.
rviz::MessageFilterDisplay< MessageType >::MessageFilterDisplay | ( | ) | [inline] |
Definition at line 85 of file message_filter_display.h.
virtual rviz::MessageFilterDisplay< MessageType >::~MessageFilterDisplay | ( | ) | [inline, virtual] |
Definition at line 104 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::fixedFrameChanged | ( | ) | [inline, protected, virtual] |
Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
Reimplemented from rviz::Display.
Definition at line 165 of file message_filter_display.h.
void rviz::MessageFilterDisplay< MessageType >::incomingMessage | ( | const typename MessageType::ConstPtr & | msg | ) | [inline, protected] |
Incoming message callback. Checks if the message pointer is valid, increments messages_received_, then calls processMessage().
Definition at line 174 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::onDisable | ( | ) | [inline, protected, virtual] |
Derived classes override this to do the actual work of disabling themselves.
Reimplemented from rviz::Display.
Definition at line 159 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::onEnable | ( | ) | [inline, protected, virtual] |
Derived classes override this to do the actual work of enabling themselves.
Reimplemented from rviz::Display.
Reimplemented in rviz::PoseDisplay.
Definition at line 154 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::onInitialize | ( | ) | [inline, 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.
Reimplemented in rviz::PointCloudDisplay, rviz::PointCloud2Display, rviz::PoseDisplay, rviz::PathDisplay, rviz::FluidPressureDisplay, rviz::IlluminanceDisplay, rviz::LaserScanDisplay, rviz::RangeDisplay, rviz::RelativeHumidityDisplay, rviz::TemperatureDisplay, rviz::PolygonDisplay, rviz::PoseArrayDisplay, rviz::PointStampedDisplay, and rviz::WrenchStampedDisplay.
Definition at line 94 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::processMessage | ( | const typename MessageType::ConstPtr & | msg | ) | [protected, pure virtual] |
Implement this to process the contents of a message.
This is called by incomingMessage().
virtual void rviz::MessageFilterDisplay< MessageType >::reset | ( | ) | [inline, virtual] |
Called to tell the display to clear its state.
Reimplemented from rviz::Display.
Reimplemented in rviz::PoseDisplay, rviz::PolygonDisplay, rviz::PathDisplay, rviz::PointCloudDisplay, rviz::RangeDisplay, rviz::PointCloud2Display, rviz::PoseArrayDisplay, rviz::FluidPressureDisplay, rviz::IlluminanceDisplay, rviz::LaserScanDisplay, rviz::RelativeHumidityDisplay, rviz::TemperatureDisplay, rviz::PointStampedDisplay, and rviz::WrenchStampedDisplay.
Definition at line 110 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::setTopic | ( | const QString & | topic, |
const QString & | datatype | ||
) | [inline, 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.
topic | The published topic to be visualized. |
datatype | The datatype of the topic. |
Reimplemented from rviz::Display.
Definition at line 117 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::subscribe | ( | ) | [inline, protected, virtual] |
Definition at line 131 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::unsubscribe | ( | ) | [inline, protected, virtual] |
Definition at line 149 of file message_filter_display.h.
virtual void rviz::MessageFilterDisplay< MessageType >::updateTopic | ( | ) | [inline, protected, virtual] |
Implements rviz::_RosTopicDisplay.
Definition at line 123 of file message_filter_display.h.
uint32_t rviz::MessageFilterDisplay< MessageType >::messages_received_ [protected] |
Definition at line 194 of file message_filter_display.h.
message_filters::Subscriber<MessageType> rviz::MessageFilterDisplay< MessageType >::sub_ [protected] |
Definition at line 192 of file message_filter_display.h.
tf::MessageFilter<MessageType>* rviz::MessageFilterDisplay< MessageType >::tf_filter_ [protected] |
Definition at line 193 of file message_filter_display.h.