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

#include <camera_info_publisher.h>

Inheritance diagram for rc::CameraInfoPublisher:
Inheritance graph
[legend]

Public Member Functions

 CameraInfoPublisher (ros::NodeHandle &nh, const std::string &frame_id, bool left, std::function< void()> &sub_changed)
 Initialization of publisher. More...
 
void publish (const rcg::Buffer *buffer, uint32_t part, uint64_t pixelformat) override
 Offers a buffer for publication. More...
 
void requiresComponents (int &components, bool &color) override
 Adds components and if color images are required to the given values. More...
 
bool used () override
 Returns true if there are subscribers to the topic. More...
 
- Public Member Functions inherited from rc::GenICam2RosPublisher
void clearNodemap ()
 Clear nodemap. More...
 
 GenICam2RosPublisher (const std::string &_frame_id)
 
void setNodemap (const std::shared_ptr< GenApi::CNodeMapRef > &_nodemap)
 Set nodemap to be used. More...
 
void subChanged (const ros::SingleSubscriberPublisher &pub)
 Called by publisher if subscription changed. More...
 
void subChangedIt (const image_transport::SingleSubscriberPublisher &pub)
 Called by publisher if subscription changed. More...
 
virtual ~GenICam2RosPublisher ()
 

Private Member Functions

 CameraInfoPublisher (const CameraInfoPublisher &)
 
CameraInfoPublisheroperator= (const CameraInfoPublisher &)
 

Private Attributes

sensor_msgs::CameraInfo info
 
bool left
 
ros::Publisher pub
 

Additional Inherited Members

- Static Public Attributes inherited from rc::GenICam2RosPublisher
static const int ComponentConfidence = 8
 
static const int ComponentDisparity = 4
 
static const int ComponentError = 16
 
static const int ComponentIntensity = 1
 
static const int ComponentIntensityCombined = 2
 
- Protected Attributes inherited from rc::GenICam2RosPublisher
std::string frame_id
 
std::shared_ptr< GenApi::CNodeMapRef > nodemap
 
std::function< void()> sub_callback
 

Detailed Description

Definition at line 44 of file camera_info_publisher.h.

Constructor & Destructor Documentation

rc::CameraInfoPublisher::CameraInfoPublisher ( ros::NodeHandle nh,
const std::string &  frame_id,
bool  left,
std::function< void()> &  sub_changed 
)

Initialization of publisher.

Parameters
nhNode handle.
leftTrue for left and false for right camera.
sub_changedFunction that is called when the subscription changes.

Definition at line 41 of file camera_info_publisher.cpp.

rc::CameraInfoPublisher::CameraInfoPublisher ( const CameraInfoPublisher )
private

Member Function Documentation

CameraInfoPublisher& rc::CameraInfoPublisher::operator= ( const CameraInfoPublisher )
private
void rc::CameraInfoPublisher::publish ( const rcg::Buffer buffer,
uint32_t  part,
uint64_t  pixelformat 
)
overridevirtual

Offers a buffer for publication.

It depends on the the kind of buffer data and the implementation and configuration of the sub-class if the data is published.

Parameters
bufferBuffer with data to be published. The buffer is already attached to the nodemap for accessing the chunk data.
partPart index of image.
pixelformatThe pixelformat as given by buffer->getPixelFormat(part).

Implements rc::GenICam2RosPublisher.

Definition at line 125 of file camera_info_publisher.cpp.

void rc::CameraInfoPublisher::requiresComponents ( int &  components,
bool &  color 
)
overridevirtual

Adds components and if color images are required to the given values.

Nothing will be changed if there are no subscribers, i.e. used() == false.

Parameters
componentsComponents Flags that will be updated according to the needs of this publisher.
colorValue that will be updated if this publisher needs color.

Implements rc::GenICam2RosPublisher.

Definition at line 117 of file camera_info_publisher.cpp.

bool rc::CameraInfoPublisher::used ( )
overridevirtual

Returns true if there are subscribers to the topic.

Returns
True if there are subscribers.

Implements rc::GenICam2RosPublisher.

Definition at line 112 of file camera_info_publisher.cpp.

Member Data Documentation

sensor_msgs::CameraInfo rc::CameraInfoPublisher::info
private

Definition at line 67 of file camera_info_publisher.h.

bool rc::CameraInfoPublisher::left
private

Definition at line 66 of file camera_info_publisher.h.

ros::Publisher rc::CameraInfoPublisher::pub
private

Definition at line 68 of file camera_info_publisher.h.


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


rc_genicam_driver
Author(s): Heiko Hirschmueller , Felix Ruess
autogenerated on Sat Feb 13 2021 03:55:07