rgbd
test_client_ros.cpp
Go to the documentation of this file.
1 #include "test_client_templ.h"
2 #include "rgbd/client_ros.h"
3 
5 {
6 public:
8 
9  virtual ~TestClientROS() {}
10 
11  bool initialize(std::string server_name);
12 };
13 
15 {
16  std::size_t last_slash = server_name.rfind("/");
17  if (last_slash != std::string::npos)
18  {
19  std::string server_ns = server_name.substr(0, last_slash);
20  return ClientROS::initialize(server_ns + "/rgb/image", server_ns + "/depth/image", server_ns + "/rgb/camera_info");
21  }
22  else
23  {
24  return ClientROS::initialize("rgb/image", "depth/image", "rgb/camera_info");
25  }
26 }
27 
28 int main(int argc, char **argv)
29 {
30  return main_templ<TestClientROS>(argc, argv);
31 }
std::string
TestClientROS::~TestClientROS
virtual ~TestClientROS()
Definition: test_client_ros.cpp:9
main
int main(int argc, char **argv)
Definition: test_client_ros.cpp:28
TestClientROS::TestClientROS
TestClientROS()
Definition: test_client_ros.cpp:7
test_client_templ.h
std::string::substr
T substr(T... args)
client_ros.h
std::size_t
rgbd::ClientROS
Client which subscribes to regular ROS image topics.
Definition: client_ros.h:31
TestClientROS::initialize
bool initialize(std::string server_name)
Definition: test_client_ros.cpp:14
std::string::rfind
T rfind(T... args)
TestClientROS
Definition: test_client_ros.cpp:4