mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
dynamic_publisher.h
Go to the documentation of this file.
1 // clang: MatousFormat
8 #ifndef DYNAMIC_PUBLISHER_H
9 #define DYNAMIC_PUBLISHER_H
10 
11 #include <mutex>
12 #include <ros/ros.h>
14 
15 namespace mrs_lib
16 {
17 
27  {
28  public:
35 
42  DynamicPublisher(const ros::NodeHandle& nh);
43 
52  template <class T>
53  void publish(const std::string name, const T& msg);
54 
55  private:
56  class impl;
57  std::unique_ptr<impl> m_impl;
58  };
59 
60 #include <mrs_lib/impl/dynamic_publisher.hpp>
61 
62 } // namespace mrs_lib
63 
64 #endif // DYNAMIC_PUBLISHER_H
mrs_lib::DynamicPublisher::publish
void publish(const std::string name, const T &msg)
Publishes a message to a topic, advertising the topic if necessary.
mrs_lib::DynamicPublisher
A helper class for easy publishing of ROS messages for debugging purposes.
Definition: dynamic_publisher.h:26
mrs_lib
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition: attitude_converter.h:29
mrs_lib::DynamicPublisher::DynamicPublisher
DynamicPublisher()
A no-parameter constructor.
Definition: dynamic_publisher.cpp:5
publisher_handler.h
Defines PublisherHandler and related convenience classes for upgrading the ROS publisher.