rgbd
server.h
Go to the documentation of this file.
1 #ifndef RGBD_SERVER_H_
2 #define RGBD_SERVER_H_
3 
4 #include "rgbd/image.h"
5 #include "rgbd/server_rgbd.h"
6 #include "rgbd/server_shm.h"
7 
8 #include <ros/node_handle.h>
9 #include <ros/publisher.h>
10 
11 #include <memory>
12 #include <thread>
13 
14 namespace rgbd {
15 
16 class Image;
17 
21 class Server {
22 
23 public:
24 
28  Server(ros::NodeHandle nh=ros::NodeHandle());
29 
33  virtual ~Server();
34 
42  void initialize(const std::string& name, RGBStorageType rgb_type = RGB_STORAGE_LOSSLESS, DepthStorageType depth_type = DEPTH_STORAGE_LOSSLESS, const float service_freq = 10);
43 
49  void send(const Image& image, bool threaded=false);
50 
51 protected:
52 
54 
56 
57  ros::NodeHandle nh_;
58 
61 
62  // Publisher thread
64 
65 };
66 
67 }
68 
69 #endif // RGBD_SERVER_H_
rgbd::Server::~Server
virtual ~Server()
Destructor.
Definition: server.cpp:20
rgbd::Server
Server which provides interfaces of ServerRGBD and ServerSHM.
Definition: server.h:21
std::string
rgbd::Server::send
void send(const Image &image, bool threaded=false)
send Write a new image to all interfaces
Definition: server.cpp:38
rgbd::Server::nh_
ros::NodeHandle nh_
Definition: server.h:57
rgbd::DepthStorageType
DepthStorageType
Definition: image.h:36
rgbd::Image
Definition: image.h:43
rgbd::Server::hostname_
std::string hostname_
Definition: server.h:60
thread
rgbd::Server::name_
std::string name_
Definition: server.h:59
rgbd::Server::initialize
void initialize(const std::string &name, RGBStorageType rgb_type=RGB_STORAGE_LOSSLESS, DepthStorageType depth_type=DEPTH_STORAGE_LOSSLESS, const float service_freq=10)
initialize initialize server
Definition: server.cpp:29
rgbd
Definition: client.h:24
rgbd::RGBStorageType
RGBStorageType
Definition: image.h:29
rgbd::Server::Server
Server(ros::NodeHandle nh=ros::NodeHandle())
Constructor.
Definition: server.cpp:12
server_rgbd.h
image.h
memory
rgbd::RGB_STORAGE_LOSSLESS
@ RGB_STORAGE_LOSSLESS
Definition: image.h:32
rgbd::DEPTH_STORAGE_LOSSLESS
@ DEPTH_STORAGE_LOSSLESS
Definition: image.h:39
rgbd::Server::server_shm_
ServerSHM server_shm_
Definition: server.h:55
rgbd::Server::pub_hostname_thread_ptr_
std::unique_ptr< std::thread > pub_hostname_thread_ptr_
Definition: server.h:63
rgbd::ServerRGBD
Server which provides RGBD topic and RGBD service.
Definition: server_rgbd.h:20
std::unique_ptr< std::thread >
rgbd::ServerSHM
Server which uses shared memory, this only works for clients on the same machine.
Definition: server_shm.h:22
server_shm.h
rgbd::Server::server_rgbd_
ServerRGBD server_rgbd_
Definition: server.h:53