#include <depth_publisher.h>
Public Member Functions | |
DepthPublisher (ros::NodeHandle &nh, std::string frame_id_prefix, double f, double t, double scale) | |
void | publish (const rcg::Buffer *buffer, uint64_t pixelformat) override |
bool | used () override |
Private Member Functions | |
DepthPublisher (const DepthPublisher &) | |
DepthPublisher & | operator= (const DepthPublisher &) |
Private Attributes | |
ros::Publisher | pub |
float | scale |
uint32_t | seq |
Definition at line 45 of file depth_publisher.h.
rc::DepthPublisher::DepthPublisher | ( | ros::NodeHandle & | nh, |
std::string | frame_id_prefix, | ||
double | f, | ||
double | t, | ||
double | scale | ||
) |
Initialization of publisher.
nh | Node handle. |
f | Focal length, normalized to image width of 1. |
t | Basline in m. |
scale | Factor for raw disparities. |
Definition at line 43 of file depth_publisher.cc.
rc::DepthPublisher::DepthPublisher | ( | const DepthPublisher & | ) | [private] |
DepthPublisher& rc::DepthPublisher::operator= | ( | const DepthPublisher & | ) | [private] |
void rc::DepthPublisher::publish | ( | const rcg::Buffer * | buffer, |
uint64_t | pixelformat | ||
) | [override, virtual] |
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.
buffer | Buffer with data to be published. |
pixelformat | The pixelformat as given by buffer.getPixelFormat(). |
Implements rc::GenICam2RosPublisher.
Definition at line 57 of file depth_publisher.cc.
bool rc::DepthPublisher::used | ( | ) | [override, virtual] |
Returns true if there are subscribers to the topic.
Implements rc::GenICam2RosPublisher.
Definition at line 52 of file depth_publisher.cc.
ros::Publisher rc::DepthPublisher::pub [private] |
Definition at line 72 of file depth_publisher.h.
float rc::DepthPublisher::scale [private] |
Definition at line 70 of file depth_publisher.h.
uint32_t rc::DepthPublisher::seq [private] |
Definition at line 69 of file depth_publisher.h.