stcamera_node.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (C) 2018, OMRON SENTECH. All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  * * Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * * Neither the names of OMRON SENTECH nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  *****************************************************************************/
30 
34 #include <omronsentech_camera/DeviceConnection.h>
35 
37 
38 namespace stcamera
39 {
41 #define CATCH_GIGECALL_ERR() catch(const StApi::CStGenTLErrorException &x) \
42  {\
43  ROS_ERROR("%s %s %d: \n\tGenTL error: %d %s", \
44  __FILE__,__func__,__LINE__, \
45  x.GetError(), x.GetDescription());\
46  return false; \
47  }\
48  catch(GenICam::GenericException &x)\
49  {\
50  ROS_ERROR("%s %s %d: \n\tGenICam error: %s", \
51  __FILE__,__func__,__LINE__, \
52  x.GetDescription());\
53  return false; \
54  }
55 
56 
58  nh_("~"),
59  msg_device_connection_(nh_.advertise<omronsentech_camera::DeviceConnection>(
61  srv_get_device_list_(nh_.advertiseService(
62  std::string(STSRV_G_device_list),
63  &StCameraNode::getDeviceListCallback, this)),
64  srv_get_module_list_(nh_.advertiseService(
65  std::string(STSRV_G_module_list),
66  &StCameraNode::getModuleListCallback, this)),
67  srv_get_sdk_info_(nh_.advertiseService(
68  std::string(STSRV_G_sdk_info),
69  &StCameraNode::getSDKInfoCallback, this)),
70  srv_get_gige_ip_i_(nh_.advertiseService(
71  std::string(STSRV_G_gige_ip),
72  &StCameraNode::getGigEIPCallback, this)),
73  srv_set_gige_ip_i_(nh_.advertiseService(
74  std::string(STSRV_S_gige_ip),
75  &StCameraNode::setGigEIPCallback, this))
76  {
77  init();
78  }
79 
81  nh_(nh),
82  msg_device_connection_(nh_.advertise<omronsentech_camera::DeviceConnection>(
84  srv_get_device_list_(nh_.advertiseService(
85  std::string(STSRV_G_device_list),
87  srv_get_module_list_(nh_.advertiseService(
88  std::string(STSRV_G_module_list),
90  srv_get_sdk_info_(nh_.advertiseService(
91  std::string(STSRV_G_sdk_info),
93  srv_get_gige_ip_i_(nh_.advertiseService(
94  std::string(STSRV_G_gige_ip),
96  srv_set_gige_ip_i_(nh_.advertiseService(
97  std::string(STSRV_S_gige_ip),
99  {
100  init();
101  }
102 
104  {
105  std::lock_guard<std::mutex> lock(mtx_map_camera_);
106 
107  for (MapCameraInterface::iterator it = map_camera_.begin();
108  it != map_camera_.end();)
109  {
110  if (it->second != nullptr)
111  {
112  delete it->second;
113  }
114  it = map_camera_.erase(it);
115  }
116  }
117 
119  {
120  std::vector<std::string> camera_to_connect;
121  param_.loadCameraList(nh_, camera_to_connect);
122 
123  std::string allowed="Allowed camera: ";
124  if (param_.connectAllCamera())
125  {
126  allowed += "all";
127  }
128  else if (param_.connectFirstCameraOnly())
129  {
130  allowed += "First found camera";
131  }
132  else
133  {
134  std::lock_guard<std::mutex> lock(mtx_map_camera_);
135 
136  // connect to certain camera only
137  for (size_t i = 0; i < camera_to_connect.size(); i++)
138  {
139  // set interface to null for the allowed camera:
140  map_camera_[param_.getNamespace(camera_to_connect[i])] = nullptr;
141  allowed += camera_to_connect[i] + " ";
142  }
143  }
144  ROS_DEBUG("Allowed to connect: %s", allowed.c_str());
145 
146  for (uint32_t i = StApi::StSystemVendor_Sentech;
147  i < StApi::StSystemVendor_Count; i++)
148  {
149  StApi::EStSystemVendor_t vendor = (StApi::EStSystemVendor_t)i;
150  try
151  {
152  stapi_systems_.Register(
153  StApi::CreateIStSystem(vendor, StApi::StInterfaceType_All));
154  }
155  catch(const GenICam::GenericException &x)
156  {
157  if (vendor == StApi::StSystemVendor_Sentech)
158  {
159  ROS_ERROR(
160  "%s %s %d: Unable to initialize OMRON SENTECH GenTL Producer: %s",
161  __FILE__,__func__,__LINE__, x.GetDescription());
162  }
163  }
164  }
165 
166  for (size_t i = 0; i < stapi_systems_.GetSize(); i++)
167  {
168  StApi::IStSystem *p_tl = stapi_systems_[i];
169  p_tl->UpdateInterfaceList();
170  }
171 
172  }
173 
175  {
176  size_t count = 0;
177  std::lock_guard<std::mutex> lock(mtx_map_camera_);
178  for (MapCameraInterface::iterator it = map_camera_.begin();
179  it != map_camera_.end(); it++)
180  {
181  StCameraInterface *c = it->second;
182  if (c != nullptr)
183  {
184  // check device availability
185  if (c->deviceIsLost())
186  {
187  MapDeviceConnection::iterator it2 = map_connection_.find(it->first);
188  if (it2 != map_connection_.end())
189  {
190  it2->second.connected = false;
191  it2->second.timestamp = ros::Time::now();
192  msg_device_connection_.publish(it2->second);
193  }
194  map_camera_[it->first] = nullptr;
195  ROS_INFO("Device %s is disconnected.", it2->first.c_str());
196  delete c;
197  }
198  else
199  {
200  count++;
201  }
202  }
203  }
204 
205  bool connect_first_camera_only = param_.connectFirstCameraOnly();
206  if (connect_first_camera_only)
207  {
208  if (count > 0)
209  {
210  return;
211  }
212  }
213  else if (!param_.connectAllCamera())
214  {
215  bool all_connected = true;
216  for (MapCameraInterface::iterator it = map_camera_.begin();
217  it != map_camera_.end(); it++)
218  {
219  if (it->second == nullptr)
220  {
221  all_connected = false;
222  break;
223  }
224  }
225  if (all_connected)
226  {
227  return;
228  }
229  }
230  //else ROS_INFO("Connect to any devices");
231 
232  // search for camera
233  try
234  {
235  std::lock_guard<std::mutex> lock(mtx_update_device_list_);
236  for (size_t i = 0; i < stapi_systems_.GetSize(); i++)
237  {
238  StApi::IStSystem *p_tl = stapi_systems_[i];
239  size_t ifcount = p_tl->GetInterfaceCount();
240  for (size_t j = 0; j < ifcount; j++)
241  {
242  StApi::IStInterface *p_iface = p_tl->GetIStInterface(j);
243  p_iface->UpdateDeviceList();
244 
245  size_t devcount = p_iface->GetDeviceCount();
246  for (size_t k = 0; k < devcount; k++)
247  {
248  if (p_iface->IsDeviceAvailable(k, GenTL::DEVICE_ACCESS_CONTROL))
249  {
250  const StApi::IStDeviceInfo *p_devinfo =
251  p_iface->GetIStDeviceInfo(k);
252  bool init_ok = initializeCamera(p_iface, p_devinfo);
253  if (init_ok && connect_first_camera_only)
254  {
255  return;
256  }
257  //ROS_INFO("connected %d", init_ok);
258  }
259  } // end loop device
260  } // end loop interface
261  } // end loop system
262  }
263  catch(...)
264  {
265  }
266  }
267 
268  bool StCameraNode::initializeCamera(StApi::IStInterface *p_iface,
269  const StApi::IStDeviceInfo *p_devinfo)
270  {
271  if (p_iface == nullptr || p_devinfo == nullptr)
272  {
273  return false;
274  }
275 
276  std::string device_id = std::string(p_devinfo->GetID());
277  std::string device_displayname = std::string(p_devinfo->GetDisplayName());
278  std::string key = "";
280  {
281  key = param_.getNamespace(device_id);
282  }
283  else
284  {
285  bool found = false;
286  for (MapCameraInterface::iterator it = map_camera_.begin();
287  it != map_camera_.end(); it++)
288  {
289  key = param_.getNamespace(device_id);
290  if (it->first.compare(key) == 0)
291  {
292  found = true;
293  break;
294  }
295  key = param_.getNamespace(device_displayname);
296  if (it->first.compare(key) == 0)
297  {
298  found = true;
299  break;
300  }
301  }
302  if (!found) key = "";
303  }
304 
305  if (key.empty())
306  {
307  return false;
308  }
309 
310  try
311  {
312  StApi::IStDeviceReleasable *dev = p_iface->CreateIStDevice(
313  GenICam::gcstring(device_id.c_str()),
314  GenTL::DEVICE_ACCESS_CONTROL);
315 
316  if (p_devinfo->GetTLType().compare(TLTypeU3VName) == 0)
317  {
319  dev, nh_, key, &param_);
320  map_camera_[key] = pu3v;
321  }
322  else if (p_devinfo->GetTLType().compare(TLTypeGEVName) == 0)
323  {
325  dev, nh_, key, &param_);
326  map_camera_[key] = pgev;
327  }
328  else
329  {
331  dev, nh_, key, &param_);
332  map_camera_[key] = pcif;
333  }
334 
335  // store and publish connection msg
336  omronsentech_camera::DeviceConnection msg =
337  fillDeviceConnectionData(dev->GetIStInterface()->GetIStSystem()
338  ->GetIStSystemInfo(), dev->GetIStInterface(),
339  dev->GetIStDeviceInfo(), key, true);
340 
341  map_connection_[key] = msg;
342 
344 
345  ROS_INFO("%s %s %d: %s (%s) is successfully initialized as %s",
346  __FILE__,__func__,__LINE__,
347  device_id.c_str(), device_displayname.c_str(), key.c_str());
348  return true;
349  }
350  catch(GenICam::GenericException &x)
351  {
352  ROS_ERROR("%s %s %d: Unable to open device %s (%s): %s",
353  __FILE__,__func__,__LINE__, device_id.c_str(),
354  device_displayname.c_str(), x.GetDescription());
355  }
356  return false;
357  }
358 
360  omronsentech_camera::GetDeviceList::Request &req,
361  omronsentech_camera::GetDeviceList::Response &res)
362  {
363  std::lock_guard<std::mutex> lock(mtx_update_device_list_);
364  try
365  {
366  for (size_t i = 0; i < stapi_systems_.GetSize(); i++)
367  {
368  StApi::IStSystem *p_tl = stapi_systems_[i];
369  size_t ifcount = p_tl->GetInterfaceCount();
370  for (size_t j = 0; j < ifcount; j++)
371  {
372  StApi::IStInterface *p_iface = p_tl->GetIStInterface(j);
373  p_iface->UpdateDeviceList();
374  size_t devcount = p_iface->GetDeviceCount();
375  for (size_t k = 0; k < devcount; k++)
376  {
377  const StApi::IStDeviceInfo *p_devinfo =
378  p_iface->GetIStDeviceInfo(k);
379  std::string device_id = std::string(p_devinfo->GetID());
380  std::string device_sn = std::string(p_devinfo->GetDisplayName());
381  std::string key_id = param_.getNamespace(device_id);
382  std::string key_sn = param_.getNamespace(device_sn);
383  MapDeviceConnection::iterator it = map_connection_.find(key_id);
384  if (it == map_connection_.end())
385  {
386  it = map_connection_.find(key_sn);
387  }
388  if (it != map_connection_.end())
389  {
390  res.device_list.push_back(it->second);
391  continue;
392  }
393  omronsentech_camera::DeviceConnection msg =
394  fillDeviceConnectionData(p_tl->GetIStSystemInfo(), p_iface,
395  p_devinfo);
396  res.device_list.push_back(msg);
397  } // end loop device
398  } // end loop interface
399  } // end loop system
400  }
401  catch(...)
402  {
403  }
404  return true;
405  }
406 
407 
409  omronsentech_camera::GetModuleList::Request &req,
410  omronsentech_camera::GetModuleList::Response &res)
411  {
412  res.module_name_list.push_back("System");
413  res.module_name_list.push_back("Interface");
414  res.module_name_list.push_back("LocalDevice");
415  res.module_name_list.push_back("RemoteDevice");
416  res.module_name_list.push_back("DataStream");
417  //"StreamBuffer" is not included.
418  return true;
419  }
420 
421 
423  omronsentech_camera::GetSDKInfo::Request &req,
424  omronsentech_camera::GetSDKInfo::Response &res)
425  {
426  res.sdk_version = StApi::GetStApiVersionText();
427 
428  for (size_t i = 0; i < stapi_systems_.GetSize(); i++)
429  {
430  omronsentech_camera::GenTLInfo data;
431  const StApi::IStSystemInfo *info =
432  stapi_systems_[i]->GetIStSystemInfo();
433  char gentl_ver[8];
434  snprintf(gentl_ver,8,"%d.%d", info->GetGenTLVersionMajor(),
435  info->GetGenTLVersionMinor());
436  data.vendor = info->GetVendor();
437  data.version = gentl_ver;
438  data.producer_version = info->GetVersion();
439  data.tltype = info->GetTLType();
440  data.full_path = info->GetPathName();
441  res.gentl_info_list.push_back(data);
442  }
443  return true;
444  }
445 
447  omronsentech_camera::GetGigEIPi::Request &req,
448  omronsentech_camera::GetGigEIPi::Response &res)
449  {
450  try
451  {
452  for (size_t i = 0; i < stapi_systems_.GetSize();i++)
453  {
454  StApi::IStSystem *p_tl = stapi_systems_[i];
455  for (size_t j = 0; j < p_tl->GetInterfaceCount(); j++)
456  {
457  StApi::IStInterface *p_iface = p_tl->GetIStInterface(j);
458  if (p_iface->GetIStInterfaceInfo()->GetTLType()
459  .compare(TLTypeGEVName) != 0)
460  {
461  continue;
462  }
463 
464  p_iface->UpdateDeviceList();
465  GenApi::CNodeMapPtr p_nodemap(p_iface->GetIStPort()->GetINodeMap());
466  GenApi::CIntegerPtr p_integer_ip(
467  p_nodemap->GetNode("GevInterfaceSubnetIPAddress"));
468  GenApi::CIntegerPtr p_integer_subnet(
469  p_nodemap->GetNode("GevInterfaceSubnetMask"));
470  GenApi::CIntegerPtr p_integer_gw(
471  p_nodemap->GetNode("GevInterfaceGateway"));
472  res.if_ip_address = p_integer_ip->ToString();
473  res.if_ip_mask = p_integer_subnet->ToString();
474  res.if_ip_gateway = p_integer_gw->ToString();
475 
476  GenApi::CIntegerPtr pDeviceSelector(
477  p_nodemap->GetNode("DeviceSelector"));
478  const int64_t nMaxIndex = pDeviceSelector->GetMax();
479  for (int64_t k = 0; k <= nMaxIndex; k++)
480  {
481  pDeviceSelector->SetValue(k);
482  GenApi::CStringPtr pIStringDeviceID(p_nodemap->GetNode("DeviceID"));
483  GenICam::gcstring strDeviceID = pIStringDeviceID->GetValue();
484 
485  if (strDeviceID.compare(req.camera_id.c_str()) != 0)
486  {
487  continue;
488  }
489  GenApi::CIntegerPtr p_integer_ip(
490  p_nodemap->GetNode("GevDeviceIPAddress"));
491  GenApi::CIntegerPtr p_integer_subnet(
492  p_nodemap->GetNode("GevDeviceSubnetMask"));
493  GenApi::CIntegerPtr p_integer_gw(
494  p_nodemap->GetNode("GevDeviceGateway"));
495  res.dev_ip_address = p_integer_ip->ToString();
496  res.dev_ip_mask = p_integer_subnet->ToString();
497  res.dev_ip_gateway = p_integer_gw->ToString();
498  return true;
499  } // end loop device
500  } // end loop interface
501  } // end loop system
502  ROS_ERROR("The Camera with the given ID %s could not be found.",
503  req.camera_id.c_str());
504  }
506  return false;
507  }
508 
510  omronsentech_camera::SetGigEIPi::Request &req,
511  omronsentech_camera::SetGigEIPi::Response &res)
512  {
513  try
514  {
515  for (size_t i = 0; i < stapi_systems_.GetSize();i++)
516  {
517  StApi::IStSystem *p_tl = stapi_systems_[i];
518  for (size_t j = 0; j < p_tl->GetInterfaceCount(); j++)
519  {
520  StApi::IStInterface *p_iface = p_tl->GetIStInterface(j);
521  if (p_iface->GetIStInterfaceInfo()->GetTLType()
522  .compare(TLTypeGEVName) != 0)
523  {
524  continue;
525  }
526 
527  p_iface->UpdateDeviceList();
528  GenApi::CNodeMapPtr p_nodemap(p_iface->GetIStPort()->GetINodeMap());
529  GenApi::CIntegerPtr pDeviceSelector(
530  p_nodemap->GetNode("DeviceSelector"));
531  const int64_t nMaxIndex = pDeviceSelector->GetMax();
532  for (int64_t k = 0; k <= nMaxIndex; k++)
533  {
534  pDeviceSelector->SetValue(k);
535  GenApi::CStringPtr pIStringDeviceID(p_nodemap->GetNode("DeviceID"));
536  GenICam::gcstring strDeviceID = pIStringDeviceID->GetValue();
537 
538  if (strDeviceID.compare(req.camera_id.c_str()) != 0)
539  {
540  continue;
541  }
542 
543  GenApi::CIntegerPtr p_integer_ip(
544  p_nodemap->GetNode("GevDeviceForceIPAddress"));
545  GenApi::CIntegerPtr p_integer_subnet(
546  p_nodemap->GetNode("GevDeviceForceSubnetMask"));
547  GenApi::CIntegerPtr p_integer_gw(
548  p_nodemap->GetNode("GevDeviceForceGateway"));
549  GenApi::CCommandPtr pCommand(
550  p_nodemap->GetNode("GevDeviceForceIP"));
551 
552  p_integer_ip->SetValue(ntohl(inet_addr(req.ip_address.c_str())));
553  p_integer_subnet->SetValue(ntohl(inet_addr(req.ip_mask.c_str())));
554  p_integer_gw->SetValue(ntohl(inet_addr(req.ip_gateway.c_str())));
555  pCommand->Execute();
556  return true;
557  } // end loop device
558  } // end loop interface
559  } // end loop system
560  ROS_ERROR("The Camera with the given ID %s could not be found.",
561  req.camera_id.c_str());
562  }
564  return false;
565  }
566 
567  omronsentech_camera::DeviceConnection StCameraNode::fillDeviceConnectionData(
568  const StApi::IStSystemInfo *p_tlinfo, StApi::IStInterface* p_iface,
569  const StApi::IStDeviceInfo *p_devinfo, std::string device_namespace,
570  bool connected)
571  {
572  omronsentech_camera::DeviceConnection msg;
573 
574  msg.timestamp = ros::Time::now();
575  msg.device_id = p_devinfo->GetID().c_str();
576  msg.device_model = p_devinfo->GetModel().c_str();
577  msg.device_serial = p_devinfo->GetSerialNumber().c_str();
578  msg.device_namespace = device_namespace;
579  msg.device_tltype = p_devinfo->GetTLType().c_str();
580 
581  if (msg.device_tltype.compare(TLTypeGEVName) == 0)
582  {
583  try
584  {
585  GenApi::CNodeMapPtr p_nodemap(p_iface->GetIStPort()->GetINodeMap());
586  GenApi::CIntegerPtr p_integer_ip(
587  p_nodemap->GetNode("GevInterfaceSubnetIPAddress"));
588  GenApi::CIntegerPtr p_integer_subnet(
589  p_nodemap->GetNode("GevInterfaceSubnetMask"));
590  GenApi::CIntegerPtr p_integer_gw(
591  p_nodemap->GetNode("GevInterfaceGateway"));
592  msg.device_tl_specific_field.push_back("if_ip_address");
593  msg.device_tl_specific_value.push_back(
594  p_integer_ip->ToString().c_str());
595  msg.device_tl_specific_field.push_back("if_ip_mask");
596  msg.device_tl_specific_value.
597  push_back(p_integer_subnet->ToString().c_str());
598  msg.device_tl_specific_field.push_back("if_ip_gateway");
599  msg.device_tl_specific_value.push_back(
600  p_integer_gw->ToString().c_str());
601 
602  GenApi::CIntegerPtr pDeviceSelector(
603  p_nodemap->GetNode("DeviceSelector"));
604  const int64_t nMaxIndex = pDeviceSelector->GetMax();
605  for (int64_t k = 0; k <= nMaxIndex; k++)
606  {
607  pDeviceSelector->SetValue(k);
608  GenApi::CStringPtr pIStringDeviceID(p_nodemap->GetNode("DeviceID"));
609  GenICam::gcstring strDeviceID = pIStringDeviceID->GetValue();
610 
611  if (strDeviceID.compare(msg.device_id.c_str()) != 0)
612  {
613  continue;
614  }
615  GenApi::CIntegerPtr p_integer_ip(
616  p_nodemap->GetNode("GevDeviceIPAddress"));
617  GenApi::CIntegerPtr p_integer_subnet(
618  p_nodemap->GetNode("GevDeviceSubnetMask"));
619  GenApi::CIntegerPtr p_integer_gw(
620  p_nodemap->GetNode("GevDeviceGateway"));
621  msg.device_tl_specific_field.push_back("dev_ip_address");
622  msg.device_tl_specific_value.
623  push_back(p_integer_ip->ToString().c_str());
624  msg.device_tl_specific_field.push_back("dev_ip_mask");
625  msg.device_tl_specific_value.
626  push_back(p_integer_subnet->ToString().c_str());
627  msg.device_tl_specific_field.push_back("dev_ip_gateway");
628  msg.device_tl_specific_value.
629  push_back(p_integer_gw->ToString().c_str());
630  break;
631  }
632  }
633  catch(...)
634  {
635  }
636  }
637  msg.connected = connected;
638 
639  // gentl info
640  char gentl_ver[8];
641  snprintf(gentl_ver,8,"%d.%d", p_tlinfo->GetGenTLVersionMajor(),
642  p_tlinfo->GetGenTLVersionMinor());
643  msg.device_gentl_info.vendor = p_tlinfo->GetVendor();
644  msg.device_gentl_info.version = gentl_ver;
645  msg.device_gentl_info.producer_version = p_tlinfo->GetVersion();
646  msg.device_gentl_info.tltype = p_tlinfo->GetTLType();
647  msg.device_gentl_info.full_path = p_tlinfo->GetPathName();
648 
649  return msg;
650  }
651 
652 } // end of namespace stcamera
bool getSDKInfoCallback(omronsentech_camera::GetSDKInfo::Request &req, omronsentech_camera::GetSDKInfo::Response &res)
Class to control a connected GigEVision camera.
void publish(const boost::shared_ptr< M > &message) const
#define STSRV_G_sdk_info
Definition: stheader.h:144
ros::Publisher msg_device_connection_
ros::ServiceServer srv_get_gige_ip_i_
bool getModuleListCallback(omronsentech_camera::GetModuleList::Request &req, omronsentech_camera::GetModuleList::Response &res)
Class to control a connected GigEVision camera.
ros::NodeHandle nh_
bool setGigEIPCallback(omronsentech_camera::SetGigEIPi::Request &req, omronsentech_camera::SetGigEIPi::Response &res)
Class implementation for stcamera_node.
Definition: stcamera_node.h:64
Class to control a connected USB3Vision camera.
#define STSRV_S_gige_ip
Definition: stheader.h:150
bool getGigEIPCallback(omronsentech_camera::GetGigEIPi::Request &req, omronsentech_camera::GetGigEIPi::Response &res)
bool initializeCamera(StApi::IStInterface *p_iface, const StApi::IStDeviceInfo *p_devinfo)
#define ROS_INFO(...)
#define STCAMERA_QUEUE_SIZE
Definition: stheader.h:41
MapCameraInterface map_camera_
Contains definitions and macros.
StApi::CIStSystemPtrArray stapi_systems_
ros::ServiceServer srv_get_sdk_info_
void loadCameraList(const ros::NodeHandle &nh, std::vector< std::string > &camera_to_connect)
Definition: stparameter.cpp:43
Base class to control a connected camera.
Class implementation for stcamera_node.
bool getDeviceListCallback(omronsentech_camera::GetDeviceList::Request &req, omronsentech_camera::GetDeviceList::Response &res)
MapDeviceConnection map_connection_
#define STSRV_G_gige_ip
Definition: stheader.h:147
std::string getNamespace(std::string camera_id)
std::mutex mtx_update_device_list_
static Time now()
#define STSRV_G_module_list
Definition: stheader.h:141
ros::ServiceServer srv_get_device_list_
omronsentech_camera::DeviceConnection fillDeviceConnectionData(const StApi::IStSystemInfo *p_tlinfo, StApi::IStInterface *p_iface, const StApi::IStDeviceInfo *p_devinfo, std::string device_namespace="", bool connected=false)
#define CATCH_GIGECALL_ERR()
#define STMSG_device_connection
Definition: stheader.h:115
#define STSRV_G_device_list
Definition: stheader.h:135
ros::ServiceServer srv_set_gige_ip_i_
ros::ServiceServer srv_get_module_list_
#define ROS_ERROR(...)
Class to control a connected GigEVision camera.
#define ROS_DEBUG(...)


omronsentech_camera
Author(s): OSE ROS Support
autogenerated on Tue Jul 2 2019 19:44:14