Class GenICam2RosPublisher

Inheritance Relationships

Derived Types

Class Documentation

class GenICam2RosPublisher

Interface for all publishers relating to images, point clouds or other stereo-camera data

Subclassed by rc::CameraInfoPublisher, rc::CameraParamPublisher, rc::ConfidencePublisher, rc::DepthPublisher, rc::DisparityColorPublisher, rc::DisparityPublisher, rc::ErrorDepthPublisher, rc::ErrorDisparityPublisher, rc::ImagePublisher, rc::Points2Publisher

Public Functions

inline GenICam2RosPublisher(const std::string &_frame_id)
Parameters:

frame_id_prefix – prefix for frame ids in published ros messages

inline virtual ~GenICam2RosPublisher()
inline void setNodemap(const std::shared_ptr<GenApi::CNodeMapRef> &_nodemap)

Set nodemap to be used.

inline void clearNodemap()

Clear nodemap.

virtual void publish(const rcg::Buffer *buffer, uint32_t part, uint64_t pixelformat) = 0

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:
  • buffer – Buffer with data to be published. The buffer is already attached to the nodemap for accessing the chunk data.

  • part – Part index of image.

  • pixelformat – The pixelformat as given by buffer->getPixelFormat(part).

virtual bool used() = 0

Returns true if there are subscribers to the topic.

Returns:

True if there are subscribers.

virtual void requiresComponents(int &components, bool &color) = 0

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:
  • components – Components Flags that will be updated according to the needs of this publisher.

  • color – Value that will be updated if this publisher needs color.

Public Static Attributes

static const int ComponentIntensity = 1
static const int ComponentIntensityCombined = 2
static const int ComponentDisparity = 4
static const int ComponentConfidence = 8
static const int ComponentError = 16

Protected Attributes

std::string frame_id
std::shared_ptr<GenApi::CNodeMapRef> nodemap