Public Member Functions | Protected Attributes | Private Member Functions | List of all members
rc::Protobuf2RosPublisher Class Reference

Generic implementation for publishing protobuf messages to ros. More...

#include <protobuf2ros_publisher.h>

Public Member Functions

 Protobuf2RosPublisher (ros::NodeHandle &nh, const std::string &topic, const std::string &pbMsgType, const std::string &frame_id_prefix)
 Internally creates a corresponding ros publisher. More...
 
virtual void publish (std::shared_ptr<::google::protobuf::Message > pbMsg)
 Publish the generic protobuf message as a corresponding Ros Message. More...
 
virtual bool used ()
 Returns true if there are subscribers to the topic. More...
 

Protected Attributes

const std::string _tfPrefix
 
ros::Publisher pub
 

Private Member Functions

Protobuf2RosPublisheroperator= (const Protobuf2RosPublisher &)
 

Detailed Description

Generic implementation for publishing protobuf messages to ros.

Definition at line 45 of file protobuf2ros_publisher.h.

Constructor & Destructor Documentation

rc::Protobuf2RosPublisher::Protobuf2RosPublisher ( ros::NodeHandle nh,
const std::string &  topic,
const std::string &  pbMsgType,
const std::string &  frame_id_prefix 
)

Internally creates a corresponding ros publisher.

Definition at line 20 of file protobuf2ros_publisher.cc.

Member Function Documentation

Protobuf2RosPublisher& rc::Protobuf2RosPublisher::operator= ( const Protobuf2RosPublisher )
private
void rc::Protobuf2RosPublisher::publish ( std::shared_ptr<::google::protobuf::Message >  pbMsg)
virtual

Publish the generic protobuf message as a corresponding Ros Message.

Definition at line 45 of file protobuf2ros_publisher.cc.

bool rc::Protobuf2RosPublisher::used ( )
virtual

Returns true if there are subscribers to the topic.

Returns
True if there are subscribers.

Definition at line 40 of file protobuf2ros_publisher.cc.

Member Data Documentation

const std::string rc::Protobuf2RosPublisher::_tfPrefix
protected

Definition at line 68 of file protobuf2ros_publisher.h.

ros::Publisher rc::Protobuf2RosPublisher::pub
protected

Definition at line 67 of file protobuf2ros_publisher.h.


The documentation for this class was generated from the following files:


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Sat Feb 13 2021 03:42:55