rgbd
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
rgbd::ServerRGBD Class Reference

Server which provides RGBD topic and RGBD service. More...

#include <server_rgbd.h>

Public Member Functions

void initialize (const std::string &name, RGBStorageType rgb_type=RGB_STORAGE_LOSSLESS, DepthStorageType depth_type=DEPTH_STORAGE_LOSSLESS, const float service_freq=10)
 Initialize server. More...
 
void send (const Image &image)
 Write a new image to all interfaces. More...
 
 ServerRGBD (ros::NodeHandle nh=ros::NodeHandle())
 Constructor. More...
 
virtual ~ServerRGBD ()
 Destructor. More...
 

Static Public Attributes

const static int MESSAGE_VERSION = 4
 version of the RGBD message being used More...
 

Protected Member Functions

bool serviceCallback (rgbd_msgs::GetRGBDRequest &req, rgbd_msgs::GetRGBDResponse &resp)
 serviceCallback More...
 
void serviceThreadFunc (const float frequency)
 Function to be called in the thread proving the service. More...
 

Protected Attributes

ros::CallbackQueue cb_queue_
 
DepthStorageType depth_type_
 
rgbd::Image image_
 
std::mutex image_mutex_
 
ros::NodeHandle nh_
 
ros::Publisher pub_image_
 
RGBStorageType rgb_type_
 
ros::ServiceServer service_server_
 
std::thread service_thread_
 

Detailed Description

Server which provides RGBD topic and RGBD service.

Definition at line 20 of file server_rgbd.h.

Constructor & Destructor Documentation

◆ ServerRGBD()

rgbd::ServerRGBD::ServerRGBD ( ros::NodeHandle  nh = ros::NodeHandle())

Constructor.

Definition at line 28 of file server_rgbd.cpp.

◆ ~ServerRGBD()

rgbd::ServerRGBD::~ServerRGBD ( )
virtual

Destructor.

Nodehandle is shutdown and all threads are joined

Definition at line 34 of file server_rgbd.cpp.

Member Function Documentation

◆ initialize()

void rgbd::ServerRGBD::initialize ( const std::string name,
RGBStorageType  rgb_type = RGB_STORAGE_LOSSLESS,
DepthStorageType  depth_type = DEPTH_STORAGE_LOSSLESS,
const float  service_freq = 10 
)

Initialize server.

Parameters
nameFully resolved server name
rgb_typergb storage type
depth_typedepth storage type
service_freqfrequency of the thread processing service requests

Definition at line 43 of file server_rgbd.cpp.

◆ send()

void rgbd::ServerRGBD::send ( const Image image)

Write a new image to all interfaces.

Parameters
imageImage to be written

Definition at line 56 of file server_rgbd.cpp.

◆ serviceCallback()

bool rgbd::ServerRGBD::serviceCallback ( rgbd_msgs::GetRGBDRequest &  req,
rgbd_msgs::GetRGBDResponse &  resp 
)
protected

serviceCallback

Parameters
reqService Request
respService Response
Returns
success

Definition at line 83 of file server_rgbd.cpp.

◆ serviceThreadFunc()

void rgbd::ServerRGBD::serviceThreadFunc ( const float  frequency)
protected

Function to be called in the thread proving the service.

Parameters
frequencyfrequency for checking service requests

Definition at line 118 of file server_rgbd.cpp.

Member Data Documentation

◆ cb_queue_

ros::CallbackQueue rgbd::ServerRGBD::cb_queue_
protected

Definition at line 61 of file server_rgbd.h.

◆ depth_type_

DepthStorageType rgbd::ServerRGBD::depth_type_
protected

Definition at line 64 of file server_rgbd.h.

◆ image_

rgbd::Image rgbd::ServerRGBD::image_
protected

Definition at line 66 of file server_rgbd.h.

◆ image_mutex_

std::mutex rgbd::ServerRGBD::image_mutex_
protected

Definition at line 67 of file server_rgbd.h.

◆ MESSAGE_VERSION

const int rgbd::ServerRGBD::MESSAGE_VERSION = 4
static

version of the RGBD message being used

Definition at line 54 of file server_rgbd.h.

◆ nh_

ros::NodeHandle rgbd::ServerRGBD::nh_
protected

Definition at line 58 of file server_rgbd.h.

◆ pub_image_

ros::Publisher rgbd::ServerRGBD::pub_image_
protected

Definition at line 59 of file server_rgbd.h.

◆ rgb_type_

RGBStorageType rgbd::ServerRGBD::rgb_type_
protected

Definition at line 63 of file server_rgbd.h.

◆ service_server_

ros::ServiceServer rgbd::ServerRGBD::service_server_
protected

Definition at line 60 of file server_rgbd.h.

◆ service_thread_

std::thread rgbd::ServerRGBD::service_thread_
protected

Definition at line 70 of file server_rgbd.h.


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