avt_vimba_camera.cpp
Go to the documentation of this file.
1 
35 
36 #include <ros/ros.h>
37 #include <ros/console.h>
38 
39 #include <signal.h>
40 
41 namespace avt_vimba_camera {
42 
43 static const char* AutoMode[] = {
44  "Off",
45  "Once",
46  "Continuous"};
47 static const char* TriggerMode[] = {
48  "Freerun",
49  "FixedRate",
50  "Software",
51  "Line1",
52  "Line2",
53  "Line3",
54  "Line4" };
55 static const char* AcquisitionMode[] = {
56  "Continuous",
57  "SingleFrame",
58  "MultiFrame",
59  "Recorder"};
60 static const char* PixelFormatMode[] = {
61  "Mono8",
62  "Mono12",
63  "Mono12Packed",
64  "BayerRG8",
65  "BayerRG12Packed",
66  "BayerRG12",
67  "RGB8Packed",
68  "BGR8Packed"};
69 static const char* BalanceRatioMode[] = {
70  "Red",
71  "Blue"};
72 static const char* FeatureDataType[] = {
73  "Unknown",
74  "int",
75  "float",
76  "enum",
77  "string",
78  "bool"};
79 
80 static const char* State[] = {
81  "Opening",
82  "Idle",
83  "Camera not found",
84  "Format error",
85  "Error",
86  "Ok"};
87 
88 
89 static volatile int keepRunning = 1;
90 
91 void intHandler(int dummy) {
92  keepRunning = 0;
93 }
94 
96 
97 }
98 
99 AvtVimbaCamera::AvtVimbaCamera(std::string name) {
100  // Init global variables
101  opened_ = false; // camera connected to the api
102  streaming_ = false; // capturing frames
103  on_init_ = true; // on initialization phase
104  show_debug_prints_ = false;
105  name_ = name;
106 
107  signal(SIGINT, intHandler);
108 
110 
111  updater_.setHardwareID("unknown");
113  updater_.update();
114 }
115 
116 void AvtVimbaCamera::start(std::string ip_str, std::string guid_str, bool debug_prints) {
117  if (opened_) return;
118 
119  show_debug_prints_ = debug_prints;
120  updater_.broadcast(0, "Starting device with IP:" + ip_str + " or GUID:" + guid_str);
121 
122  // Determine which camera to use. Try IP first
123  if (!ip_str.empty()) {
124  diagnostic_msg_ = "Trying to open camera by IP: " + ip_str;
125  ROS_INFO_STREAM("Trying to open camera by IP: " << ip_str);
126  vimba_camera_ptr_ = openCamera(ip_str);
127  if (!vimba_camera_ptr_) {
128  ROS_WARN("Camera pointer is empty. Returning...");
129  return;
130  }
131  updater_.setHardwareID(ip_str);
132  guid_ = ip_str;
133  // If both guid and IP are available, open by IP and check guid
134  if (!guid_str.empty()) {
135  std::string cam_guid_str;
136  vimba_camera_ptr_->GetSerialNumber(cam_guid_str);
137  if (!vimba_camera_ptr_) {
138  ROS_WARN("Camera pointer is empty. Returning...");
139  return;
140  }
141  assert(cam_guid_str == guid_str);
142  updater_.setHardwareID(guid_str);
143  guid_ = guid_str;
144  diagnostic_msg_ = "GUID " + cam_guid_str + " matches for camera with IP: " + ip_str;
145  ROS_INFO_STREAM("GUID " << cam_guid_str << " matches for camera with IP: " << ip_str);
146  }
147  } else if (!guid_str.empty()) {
148  // Only guid available
149  diagnostic_msg_ = "Trying to open camera by ID: " + guid_str;
150  ROS_INFO_STREAM("Trying to open camera by ID: " << guid_str);
151  vimba_camera_ptr_ = openCamera(guid_str);
152  updater_.setHardwareID(guid_str);
153  guid_ = guid_str;
154  } else {
155  // No identifying info (GUID and IP) are available
156  diagnostic_msg_ = "Can't connect to the camera: at least GUID or IP need to be set.";
157  ROS_ERROR("Can't connect to the camera: at least GUID or IP need to be set.");
159  }
160  updater_.update();
161 
162  // From the SynchronousGrab API example:
163  // TODO Set the GeV packet size to the highest possible value
164  VmbInterfaceType cam_int_type;
165  vimba_camera_ptr_->GetInterfaceType(cam_int_type);
166  if ( cam_int_type == VmbInterfaceEthernet ){
167  runCommand("GVSPAdjustPacketSize");
168  }
169 
170  std::string trigger_source;
171  getFeatureValue("TriggerSource", trigger_source);
172  int trigger_source_int = getTriggerModeInt(trigger_source);
173 
174  if (trigger_source_int == Freerun ||
175  trigger_source_int == FixedRate ||
176  trigger_source_int == SyncIn1) {
177  // Create a frame observer for this camera
179  boost::bind(&avt_vimba_camera::AvtVimbaCamera::frameCallback, this, _1));
181  } else {
182  diagnostic_msg_ = "Trigger mode " +
183  std::string(TriggerMode[trigger_source_int]) +
184  " not implemented.";
185  ROS_ERROR_STREAM("Trigger mode " <<
186  TriggerMode[trigger_source_int] <<
187  " not implemented.");
189  }
190  updater_.update();
191 }
192 
194  if (!streaming_) {
195  // Start streaming
196  VmbErrorType err =
197  vimba_camera_ptr_->StartContinuousImageAcquisition(1, // num_frames_,
198  IFrameObserverPtr(vimba_frame_observer_ptr_));
199  if (VmbErrorSuccess == err) {
200  diagnostic_msg_ = "Starting continuous image acquisition";
201  ROS_INFO_STREAM("[" << name_
202  << "]: Starting continuous image acquisition...(" << frame_id_ << ")");
203  streaming_ = true;
204  camera_state_ = OK;
205  } else {
206  diagnostic_msg_ = "Could not start continuous image acquisition. Error: " + api_.errorCodeToMessage(err);
207  ROS_ERROR_STREAM("[" << name_
208  << "]: Could not start continuous image acquisition(" << frame_id_ << "). "
209  << "\n Error: " << api_.errorCodeToMessage(err));
211  }
212  } else {
213  ROS_WARN_STREAM("Start imaging called, but the camera is already imaging(" << frame_id_ << ").");
214  }
215  updater_.update();
216 }
217 
219  if (streaming_ || on_init_) {
220  VmbErrorType err =
221  vimba_camera_ptr_->StopContinuousImageAcquisition();
222  if (VmbErrorSuccess == err) {
223  diagnostic_msg_ = "Acquisition stopped";
224  ROS_INFO_STREAM("[" << name_
225  << "]: Acquisition stoppped... (" << frame_id_ << ")");
226  streaming_ = false;
228  } else {
229  diagnostic_msg_ = "Could not stop image acquisition. Error: " + api_.errorCodeToMessage(err);
230  ROS_ERROR_STREAM("[" << name_
231  << "]: Could not stop image acquisition (" << frame_id_ << ")."
232  << "\n Error: " << api_.errorCodeToMessage(err));
234  }
235  } else {
236  ROS_WARN_STREAM("Stop imaging called, but the camera is already stopped (" << frame_id_ << ").");
237  }
238  updater_.update();
239 }
240 
242  boost::mutex::scoped_lock lock(config_mutex_);
243 
244  frame_id_ = config.frame_id;
245 
246  if (streaming_) {
247  stopImaging();
248  ros::Duration(0.5).sleep(); // sleep for half a second
249  }
250 
251  if (on_init_) {
252  config_ = config;
253  }
254  diagnostic_msg_ = "Updating configuration";
256  ROS_INFO_STREAM("Updating configuration for camera " << config.frame_id);
257  updateExposureConfig(config);
258  updateGainConfig(config);
259  updateWhiteBalanceConfig(config);
260  updateImageModeConfig(config);
261  updateROIConfig(config);
262  updateBandwidthConfig(config);
263  updateGPIOConfig(config);
264  updatePtpModeConfig(config);
265  updatePixelFormatConfig(config);
266  updateAcquisitionConfig(config);
267  updateIrisConfig(config);
268  config_ = config;
269 
270  if (on_init_) {
271  on_init_ = false;
272 
273  }
274 
275  startImaging();
276 }
277 
279  if (!opened_) return;
280  vimba_camera_ptr_->Close();
281  opened_ = false;
282 }
283 
285  // Details: The ID might be one of the following:
286  // "IP:169.254.12.13",
287  // "MAC:000f31000001",
288  // or a plain serial number: "1234567890".
289 
290  CameraPtr camera;
291  VimbaSystem& vimba_system(VimbaSystem::GetInstance());
292 
293  // get camera
294  VmbErrorType err = vimba_system.GetCameraByID(id_str.c_str(), camera);
295  while (err != VmbErrorSuccess) {
296  if (keepRunning) {
297  ROS_WARN_STREAM("Could not get camera. Retrying every two seconds...");
298  err = vimba_system.GetCameraByID(id_str.c_str(), camera);
299  ros::Duration(2.0).sleep();
300  } else {
301  ROS_ERROR_STREAM("[" << name_
302  << "]: Could not get camera " << id_str
303  << "\n Error: " << api_.errorCodeToMessage(err));
305  return camera;
306  }
307  }
308 
309  // open camera
310  err = camera->Open(VmbAccessModeFull);
311  while (err != VmbErrorSuccess && keepRunning) {
312  if (keepRunning) {
313  ROS_WARN_STREAM("Could not open camera. Retrying every two seconds...");
314  err = camera->Open(VmbAccessModeFull);
315  ros::Duration(2.0).sleep();
316  } else {
317  ROS_ERROR_STREAM("[" << name_
318  << "]: Could not open camera " << id_str
319  << "\n Error: " << api_.errorCodeToMessage(err));
321  return camera;
322  }
323  }
324 
325  std::string cam_id, cam_name, cam_model, cam_sn, cam_int_id;
326  VmbInterfaceType cam_int_type;
327  VmbAccessModeType accessMode; // = VmbAccessModeNone;
328  camera->GetID(cam_id);
329  camera->GetName(cam_name);
330  camera->GetModel(cam_model);
331  camera->GetSerialNumber(cam_sn);
332  camera->GetInterfaceID(cam_int_id);
333  camera->GetInterfaceType(cam_int_type);
334  err = camera->GetPermittedAccess(accessMode);
335 
336  if(show_debug_prints_) {
337  ROS_INFO_STREAM("[" << name_ << "]: Opened camera with"
338  << "\n\t\t * Name : " << cam_name
339  << "\n\t\t * Model : " << cam_model
340  << "\n\t\t * ID : " << cam_id
341  << "\n\t\t * S/N : " << cam_sn
342  << "\n\t\t * Itf. ID : " << cam_int_id
343  << "\n\t\t * Itf. Type: " << interfaceToString(cam_int_type)
344  << "\n\t\t * Access : " << accessModeToString(accessMode));
345  }
346 
347  ros::Duration(2.0).sleep();
348 
349  printAllCameraFeatures(camera);
350  opened_ = true;
352  return camera;
353 }
354 
355 void AvtVimbaCamera::frameCallback(const FramePtr vimba_frame_ptr) {
356  boost::mutex::scoped_lock lock(config_mutex_);
357  camera_state_ = OK;
358  diagnostic_msg_ = "Camera operating normally";
359 
360  // Call the callback implemented by other classes
361  boost::thread thread_callback = boost::thread(userFrameCallback, vimba_frame_ptr);
362  thread_callback.join();
363 
364  updater_.update();
365 }
366 
368  double temp = -1.0;
369  if (setFeatureValue("DeviceTemperatureSelector", "Main")) {
370  getFeatureValue("DeviceTemperature", temp);
371  }
372  return temp;
373 }
374 
376  return runCommand("GevTimestampControlReset");
377 }
378 
380  double timestamp = -1.0;
381  if (runCommand("GevTimestampControlLatch")) {
382  VmbInt64_t freq, ticks;
383  getFeatureValue("GevTimestampTickFrequency", freq);
384  getFeatureValue("GevTimestampValue", ticks);
385  timestamp = ((double)ticks)/((double)freq);
386  }
387  return timestamp;
388 }
389 
390 // Template function to GET a feature value from the camera
391 template<typename T>
392 bool AvtVimbaCamera::getFeatureValue(const std::string& feature_str, T& val) {
393  VmbErrorType err;
394  FeaturePtr vimba_feature_ptr;
395  VmbFeatureDataType data_type;
396  err = vimba_camera_ptr_->GetFeatureByName(feature_str.c_str(),
397  vimba_feature_ptr);
398  if (VmbErrorSuccess == err) {
399  bool readable;
400  vimba_feature_ptr->IsReadable(readable);
401  if (readable) {
402  vimba_feature_ptr->GetDataType(data_type);
403  if ( VmbErrorSuccess != err ) {
404  std::cout << "[Could not get feature Data Type. Error code: "
405  << err << "]" << std::endl;
406  } else {
407  std::string strValue;
408  switch ( data_type ) {
409  case VmbFeatureDataBool:
410  bool bValue;
411  err = vimba_feature_ptr->GetValue(bValue);
412  if (VmbErrorSuccess == err) {
413  val = static_cast<T>(bValue);
414  }
415  break;
416  case VmbFeatureDataFloat:
417  double fValue;
418  err = vimba_feature_ptr->GetValue(fValue);
419  if (VmbErrorSuccess == err) {
420  val = static_cast<T>(fValue);
421  }
422  break;
423  case VmbFeatureDataInt:
424  VmbInt64_t nValue;
425  err = vimba_feature_ptr->GetValue(nValue);
426  if (VmbErrorSuccess == err) {
427  val = static_cast<T>(nValue);
428  }
429  break;
430  }
431  if (VmbErrorSuccess != err) {
432  ROS_WARN_STREAM("Could not get feature value. Error code: "
433  << api_.errorCodeToMessage(err));
434  }
435  }
436  } else {
437  ROS_WARN_STREAM("[" << name_ << "]: Feature "
438  << feature_str
439  << " is not readable.");
440  }
441  } else {
442  ROS_WARN_STREAM("[" << name_
443  << "]: Could not get feature " << feature_str);
444  }
445  if (show_debug_prints_)
446  ROS_INFO_STREAM("Asking for feature "
447  << feature_str << " with datatype "
448  << FeatureDataType[data_type]
449  << " and value " << val);
450  return (VmbErrorSuccess == err);
451 }
452 
453 // Function to GET a feature value from the camera, overloaded to strings
454 bool AvtVimbaCamera::getFeatureValue(const std::string& feature_str,
455  std::string& val) {
456  VmbErrorType err;
457  FeaturePtr vimba_feature_ptr;
458  VmbFeatureDataType data_type;
459  err = vimba_camera_ptr_->GetFeatureByName(feature_str.c_str(),
460  vimba_feature_ptr);
461  if (VmbErrorSuccess == err) {
462  bool readable;
463  vimba_feature_ptr->IsReadable(readable);
464  if (readable) {
465  vimba_feature_ptr->GetDataType(data_type);
466  if ( VmbErrorSuccess != err ) {
467  std::cout << "[Could not get feature Data Type. Error code: "
468  << err << "]" << std::endl;
469  } else {
470  std::string strValue;
471  switch ( data_type ) {
472  case VmbFeatureDataEnum:
473  err = vimba_feature_ptr->GetValue(strValue);
474  if (VmbErrorSuccess == err) {
475  val = strValue;
476  }
477  break;
479  err = vimba_feature_ptr->GetValue(strValue);
480  if (VmbErrorSuccess == err) {
481  val = strValue;
482  }
483  break;
484  }
485  if (VmbErrorSuccess != err) {
486  ROS_WARN_STREAM("Could not get feature value. Error code: "
487  << api_.errorCodeToMessage(err));
488  }
489  }
490  } else {
491  ROS_WARN_STREAM("[" << name_ << "]: Feature "
492  << feature_str
493  << " is not readable.");
494  }
495  } else {
496  ROS_WARN_STREAM("[" << name_
497  << "]: Could not get feature " << feature_str);
498  }
499  if(show_debug_prints_) {
500  ROS_INFO_STREAM("Asking for feature " << feature_str
501  << " with datatype " << FeatureDataType[data_type]
502  << " and value " << val);
503  }
504  return (VmbErrorSuccess == err);
505 }
506 
507 // Template function to SET a feature value from the camera
508 template<typename T>
509 bool AvtVimbaCamera::setFeatureValue(const std::string& feature_str,
510  const T& val) {
511  VmbErrorType err;
512  FeaturePtr vimba_feature_ptr;
513  err = vimba_camera_ptr_->GetFeatureByName(feature_str.c_str(),
514  vimba_feature_ptr);
515  if (VmbErrorSuccess == err) {
516  bool writable;
517  err = vimba_feature_ptr->IsWritable(writable);
518  if (VmbErrorSuccess == err) {
519  if (writable) {
521  ROS_INFO_STREAM("Setting feature " << feature_str << " value " << val);
522  VmbFeatureDataType data_type;
523  err = vimba_feature_ptr->GetDataType(data_type);
524  if (VmbErrorSuccess == err) {
525  if (data_type == VmbFeatureDataEnum) {
526  bool available;
527  err = vimba_feature_ptr->IsValueAvailable(val, available);
528  if (VmbErrorSuccess == err) {
529  if (available) {
530  err = vimba_feature_ptr->SetValue(val);
531  } else {
532  ROS_WARN_STREAM("[" << name_
533  << "]: Feature " << feature_str << " is available now.");
534  }
535  } else {
536  ROS_WARN_STREAM("[" << name_ << "]: Feature "
537  << feature_str << ": value unavailable\n\tERROR "
538  << api_.errorCodeToMessage(err));
539  }
540  } else {
541  err = vimba_feature_ptr->SetValue(val);
542  }
543  } else {
544  ROS_WARN_STREAM("[" << name_ << "]: Feature "
545  << feature_str << ": Bad data type\n\tERROR "
546  << api_.errorCodeToMessage(err));
547  }
548  } else {
549  ROS_WARN_STREAM("[" << name_ << "]: Feature "
550  << feature_str
551  << " is not writable.");
552  }
553  } else {
554  ROS_WARN_STREAM("[" << name_ << "]: Feature "
555  << feature_str << ": ERROR " << api_.errorCodeToMessage(err));
556  }
557  } else {
558  ROS_WARN_STREAM("[" << name_
559  << "]: Could not get feature " << feature_str
560  << "\n Error: " << api_.errorCodeToMessage(err));
561  }
562  return (VmbErrorSuccess == err);
563 }
564 
565 
566 // Template function to RUN a command
567 bool AvtVimbaCamera::runCommand(const std::string& command_str) {
568  FeaturePtr feature_ptr;
569  VmbErrorType err = vimba_camera_ptr_->GetFeatureByName(command_str.c_str(), feature_ptr);
570  if (VmbErrorSuccess == err ) {
571  err = feature_ptr->RunCommand();
572  if ( VmbErrorSuccess == err ) {
573  bool is_command_done = false;
574  do {
575  err = feature_ptr->IsCommandDone(is_command_done);
576  if ( VmbErrorSuccess != err ) {
577  break;
578  }
579  if(show_debug_prints_) {
580  ROS_INFO_STREAM_THROTTLE(1, "Waiting for command "
581  << command_str.c_str() << "...");
582  }
583  } while ( false == is_command_done );
585  ROS_INFO_STREAM("Command " << command_str.c_str() << " done!");
586  return true;
587  } else {
588  ROS_WARN_STREAM("[" << name_
589  << "]: Could not run command " << command_str << ". Error: " << api_.errorCodeToMessage(err));
590  return false;
591  }
592  } else {
593  ROS_WARN_STREAM("[" << name_
594  << "]: Could not get feature command " << command_str << ". Error: " << api_.errorCodeToMessage(err));
595  return false;
596  }
597 }
598 
600  switch ( interfaceType ) {
601  case VmbInterfaceFirewire: return "FireWire";
602  break;
603  case VmbInterfaceEthernet: return "GigE";
604  break;
605  case VmbInterfaceUsb: return "USB";
606  break;
607  default: return "Unknown";
608  }
609 }
610 
612  std::string s;
613  if (modeType & VmbAccessModeFull)
614  s = std::string("Read and write access");
615  else if (modeType & VmbAccessModeRead)
616  s = std::string("Only read access");
617  else if (modeType & VmbAccessModeConfig)
618  s = std::string("Device configuration access");
619  else if (modeType & VmbAccessModeLite)
620  s = std::string("Device read/write access without feature access (only addresses)");
621  else if (modeType & VmbAccessModeNone)
622  s = std::string("No access");
623  return s;
624 }
625 
626 int AvtVimbaCamera::getTriggerModeInt(std::string mode_str) {
627  int mode;
628  if (mode_str == TriggerMode[Freerun]) {
629  mode = Freerun;
630  } else if (mode_str == TriggerMode[FixedRate]) {
631  mode = FixedRate;
632  } else if (mode_str == TriggerMode[Software]) {
633  mode = Software;
634  } else if (mode_str == TriggerMode[SyncIn1]) {
635  mode = SyncIn1;
636  } else if (mode_str == TriggerMode[SyncIn2]) {
637  mode = SyncIn2;
638  } else if (mode_str == TriggerMode[SyncIn3]) {
639  mode = SyncIn3;
640  } else if (mode_str == TriggerMode[SyncIn4]) {
641  mode = SyncIn4;
642  }
643  return mode;
644 }
645 
647  VmbErrorType err;
648  FeaturePtrVector features;
649 
650  // The static details of a feature
651  std::string strName; // The name of the feature
652  std::string strDisplayName; // The display name of the feature
653  std::string strTooltip; // A short description of the feature
654  std::string strDescription; // A long description of the feature
655  std::string strCategory; // A category to group features
656  std::string strSFNCNamespace; // The Std Feature Naming Convention namespace
657  std::string strUnit; // The measurement unit of the value
658  VmbFeatureDataType eType; // The data type of the feature
659 
660  // The changeable value of a feature
661  VmbInt64_t nValue;
662  std::string strValue;
663 
664  std::stringstream strError;
665 
666  // Fetch all features of our cam
667  err = camera->GetFeatures(features);
668  if ( VmbErrorSuccess == err ) {
669  // Query all static details as well as the value of
670  // all fetched features and print them out.
671  for ( FeaturePtrVector::const_iterator iter = features.begin();
672  features.end() != iter;
673  ++iter ) {
674  err = (*iter)->GetName(strName);
675  if (VmbErrorSuccess != err) {
676  strError << "[Could not get feature Name. Error code: " << err << "]";
677  strName.assign(strError.str());
678  }
679 
680  err = (*iter)->GetDisplayName(strDisplayName);
681  if (VmbErrorSuccess != err) {
682  strError << "[Could not get feature Display Name. Error code: "
683  << err << "]";
684  strDisplayName.assign(strError.str());
685  }
686 
687  err = (*iter)->GetToolTip(strTooltip);
688  if (VmbErrorSuccess != err) {
689  strError << "[Could not get feature Tooltip. Error code: "
690  << err << "]";
691  strTooltip.assign(strError.str());
692  }
693 
694  err = (*iter)->GetDescription(strDescription);
695  if (VmbErrorSuccess != err) {
696  strError << "[Could not get feature Description. Error code: "
697  << err << "]";
698  strDescription.assign(strError.str());
699  }
700 
701  err = (*iter)->GetCategory(strCategory);
702  if (VmbErrorSuccess != err) {
703  strError << "[Could not get feature Category. Error code: "
704  << err << "]";
705  strCategory.assign(strError.str());
706  }
707 
708  err = (*iter)->GetSFNCNamespace(strSFNCNamespace);
709  if (VmbErrorSuccess != err) {
710  strError << "[Could not get feature SNFC Namespace. Error code: "
711  << err << "]";
712  strSFNCNamespace.assign(strError.str());
713  }
714 
715  err = (*iter)->GetUnit(strUnit);
716  if (VmbErrorSuccess != err) {
717  strError << "[Could not get feature Unit. Error code: " << err << "]";
718  strUnit.assign(strError.str());
719  }
720 
721  std::cout << "/// Feature Name: " << strName << std::endl;
722  std::cout << "/// Display Name: " << strDisplayName << std::endl;
723  std::cout << "/// Tooltip: " << strTooltip << std::endl;
724  std::cout << "/// Description: " << strDescription << std::endl;
725  std::cout << "/// SNFC Namespace: " << strSFNCNamespace << std::endl;
726  std::cout << "/// Unit: " << strUnit << std::endl;
727  std::cout << "/// Value: ";
728 
729  err = (*iter)->GetDataType(eType);
730  if ( VmbErrorSuccess != err ) {
731  std::cout << "[Could not get feature Data Type. Error code: "
732  << err << "]" << std::endl;
733  } else {
734  switch ( eType ) {
735  case VmbFeatureDataBool:
736  bool bValue;
737  err = (*iter)->GetValue(bValue);
738  if (VmbErrorSuccess == err) {
739  std::cout << bValue << " bool" << std::endl;
740  }
741  break;
742  case VmbFeatureDataEnum:
743  err = (*iter)->GetValue(strValue);
744  if (VmbErrorSuccess == err) {
745  std::cout << strValue << " str Enum" << std::endl;
746  }
747  break;
748  case VmbFeatureDataFloat:
749  double fValue;
750  err = (*iter)->GetValue(fValue);
751  {
752  std::cout << fValue << " float" << std::endl;
753  }
754  break;
755  case VmbFeatureDataInt:
756  err = (*iter)->GetValue(nValue);
757  {
758  std::cout << nValue << " int" << std::endl;
759  }
760  break;
762  err = (*iter)->GetValue(strValue);
763  {
764  std::cout << strValue << " str" << std::endl;
765  }
766  break;
768  default:
769  std::cout << "[None]" << std::endl;
770  break;
771  }
772  if (VmbErrorSuccess != err) {
773  std::cout << "Could not get feature value. Error code: "
774  << err << std::endl;
775  }
776  }
777 
778  std::cout << std::endl;
779  }
780  } else {
781  std::cout << "Could not get features. Error code: " << api_.errorCodeToMessage(err) << std::endl;
782  }
783 }
784 
787  bool changed = false;
788  if (config.acquisition_mode != config_.acquisition_mode || on_init_) {
789  changed = true;
790  setFeatureValue("AcquisitionMode", config.acquisition_mode.c_str());
791  }
792  if (config.acquisition_rate != config_.acquisition_rate || on_init_) {
793  changed = true;
794  double acquisition_frame_rate_limit;
795  getFeatureValue("AcquisitionFrameRateLimit", acquisition_frame_rate_limit);
796  if (acquisition_frame_rate_limit < config.acquisition_rate) {
797  double rate = (double)floor(acquisition_frame_rate_limit);
798  ROS_WARN_STREAM("Max frame rate allowed: " << acquisition_frame_rate_limit
799  << ". Setting " << rate << "...");
800  config.acquisition_rate = rate;
801  }
802  setFeatureValue("AcquisitionFrameRateAbs",
803  static_cast<float>(config.acquisition_rate));
804  }
805  if (config.trigger_mode != config_.trigger_mode || on_init_) {
806  changed = true;
807  setFeatureValue("TriggerMode", config.trigger_mode.c_str());
808  }
809  if (config.trigger_selector != config_.trigger_selector || on_init_) {
810  changed = true;
811  setFeatureValue("TriggerSelector", config.trigger_selector.c_str());
812  }
813  if (config.trigger_source != config_.trigger_source || on_init_) {
814  changed = true;
815  setFeatureValue("TriggerSource", config.trigger_source.c_str());
816  }
817  if (config.trigger_activation != config_.trigger_activation || on_init_) {
818  changed = true;
819  setFeatureValue("TriggerActivation", config.trigger_activation.c_str());
820  }
821  if (config.trigger_delay != config_.trigger_delay || on_init_) {
822  changed = true;
823  setFeatureValue("TriggerDelayAbs", config.trigger_delay);
824  }
825  if(changed && show_debug_prints_){
826  ROS_INFO_STREAM("New Acquisition and Trigger config (" << config.frame_id << ") : "
827  << "\n\tAcquisitionMode : " << config.acquisition_mode << " was " << config_.acquisition_mode
828  << "\n\tAcquisitionFrameRateAbs : " << config.acquisition_rate << " was " << config_.acquisition_rate
829  << "\n\tTriggerMode : " << config.trigger_mode << " was " << config_.trigger_mode
830  << "\n\tTriggerSource : " << config.trigger_source << " was " << config_.trigger_source
831  << "\n\tTriggerSelector : " << config.trigger_selector << " was " << config_.trigger_selector
832  << "\n\tTriggerActivation : " << config.trigger_activation << " was " << config_.trigger_activation
833  << "\n\tTriggerDelayAbs : " << config.trigger_delay << " was " << config_.trigger_delay);
834  }
835 }
836 
837 /* Update the Iris config */
839  bool changed = false;
840  if (config.iris_auto_target != config_.iris_auto_target || on_init_) {
841  changed = true;
842  setFeatureValue("IrisAutoTarget", static_cast<float>(config.iris_auto_target));
843  }
844  if (config.iris_mode != config_.iris_mode || on_init_) {
845  changed = true;
846  setFeatureValue("IrisMode", config.iris_mode.c_str());
847  }
848 // if (config.iris_video_level != config_.iris_video_level || on_init_) {
849 // changed = true;
850 // setFeatureValue("IrisVideoLevel",
851 // static_cast<VmbInt64_t>(config.iris_video_level));
852 // }
853  if (config.iris_video_level_max != config_.iris_video_level_max || on_init_) {
854  changed = true;
855  setFeatureValue("IrisVideoLevelMax", static_cast<float>(config.iris_video_level_max));
856  }
857  if (config.iris_video_level_min != config_.iris_video_level_min || on_init_) {
858  changed = true;
859  setFeatureValue("IrisVideoLevelMin",
860  static_cast<VmbInt64_t>(config.iris_video_level_min));
861  }
862  if(changed && show_debug_prints_){
863  ROS_INFO_STREAM("New Iris config (" << config.frame_id << ") : "
864  << "\n\tIrisAutoTarget : " << config.iris_auto_target << " was " << config_.iris_auto_target
865 // << "\n\tIrisMode : " << config.iris_mode << " was " << config_.iris_mode
866 // << "\n\tIrisVideoLevel : " << config.iris_video_level << " was " << config_.iris_video_level
867 // << "\n\tIrisVideoLevelMax : " << config.iris_video_level_max << " was " << config_.iris_video_level_max
868 // << "\n\tIrisVideoLevelMin : " << config.iris_video_level_min << " was " << config_.iris_video_level_min
869 );
870  }
871 }
872 
873 
876  bool changed = false;
877  if (config.exposure != config_.exposure || on_init_) {
878  changed = true;
879  setFeatureValue("ExposureTimeAbs", static_cast<float>(config.exposure));
880  }
881  if (config.exposure_auto != config_.exposure_auto || on_init_) {
882  changed = true;
883  setFeatureValue("ExposureAuto", config.exposure_auto.c_str());
884  }
885  if (config.exposure_auto_alg != config_.exposure_auto_alg || on_init_) {
886  changed = true;
887  setFeatureValue("ExposureAutoAlg", config.exposure_auto_alg.c_str());
888  }
889  if (config.exposure_auto_tol != config_.exposure_auto_tol || on_init_) {
890  changed = true;
891  setFeatureValue("ExposureAutoAdjustTol",
892  static_cast<VmbInt64_t>(config.exposure_auto_tol));
893  }
894  if (config.exposure_auto_max != config_.exposure_auto_max || on_init_) {
895  changed = true;
896  setFeatureValue("ExposureAutoMax",
897  static_cast<VmbInt64_t>(config.exposure_auto_max));
898  }
899  if (config.exposure_auto_min != config_.exposure_auto_min || on_init_) {
900  changed = true;
901  setFeatureValue("ExposureAutoMin",
902  static_cast<VmbInt64_t>(config.exposure_auto_min));
903  }
904  if (config.exposure_auto_outliers != config_.exposure_auto_outliers || on_init_) {
905  changed = true;
906  setFeatureValue("ExposureAutoOutliers",
907  static_cast<VmbInt64_t>(config.exposure_auto_outliers));
908  }
909  if (config.exposure_auto_rate != config_.exposure_auto_rate || on_init_) {
910  changed = true;
911  setFeatureValue("ExposureAutoRate",
912  static_cast<VmbInt64_t>(config.exposure_auto_rate));
913  }
914  if (config.exposure_auto_target != config_.exposure_auto_target || on_init_) {
915  changed = true;
916  setFeatureValue("ExposureAutoTarget",
917  static_cast<VmbInt64_t>(config.exposure_auto_target));
918  }
919  if(changed && show_debug_prints_){
920  ROS_INFO_STREAM("New Exposure config (" << config.frame_id << ") : "
921  << "\n\tExposureTimeAbs : " << config.exposure << " was " << config_.exposure
922  << "\n\tExposureAuto : " << config.exposure_auto << " was " << config_.exposure_auto
923  << "\n\tExposureAutoAdjustTol : " << config.exposure_auto_tol << " was " << config_.exposure_auto_tol
924  << "\n\tExposureAutoMax : " << config.exposure_auto_max << " was " << config_.exposure_auto_max
925  << "\n\tExposureAutoMin : " << config.exposure_auto_min << " was " << config_.exposure_auto_min
926  << "\n\tExposureAutoOutliers : " << config.exposure_auto_outliers << " was " << config_.exposure_auto_outliers
927  << "\n\tExposureAutoRate : " << config.exposure_auto_rate << " was " << config_.exposure_auto_rate
928  << "\n\tExposureAutoTarget : " << config.exposure_auto_target << " was " << config_.exposure_auto_target);
929  }
930 }
931 
934  bool changed = false;
935  if (config.gain != config_.gain || on_init_) {
936  changed = true;
937  setFeatureValue("Gain", static_cast<float>(config.gain));
938  }
939  if (config.gain_auto != config_.gain_auto || on_init_) {
940  changed = true;
941  setFeatureValue("GainAuto", config.gain_auto.c_str());
942  }
943  if (config.gain_auto_tol != config_.gain_auto_tol || on_init_) {
944  changed = true;
945  setFeatureValue("GainAutoAdjustTol",
946  static_cast<VmbInt64_t>(config.gain_auto_tol));
947  }
948  if (config.gain_auto_max != config_.gain_auto_max || on_init_) {
949  changed = true;
950  setFeatureValue("GainAutoMax", static_cast<float>(config.gain_auto_max));
951  }
952  if (config.gain_auto_min != config_.gain_auto_min || on_init_) {
953  changed = true;
954  setFeatureValue("GainAutoMin",
955  static_cast<VmbInt64_t>(config.gain_auto_min));
956  }
957  if (config.gain_auto_outliers != config_.gain_auto_outliers || on_init_) {
958  changed = true;
959  setFeatureValue("GainAutoMin",
960  static_cast<VmbInt64_t>(config.gain_auto_outliers));
961  }
962  if (config.gain_auto_rate != config_.gain_auto_rate || on_init_) {
963  changed = true;
964  setFeatureValue("GainAutoOutliers",
965  static_cast<VmbInt64_t>(config.gain_auto_rate));
966  }
967  if (config.gain_auto_target != config_.gain_auto_target || on_init_) {
968  changed = true;
969  setFeatureValue("GainAutoRate", static_cast<VmbInt64_t>(config.gain_auto_target));
970  }
971  if(changed && show_debug_prints_){
972  ROS_INFO_STREAM("New Gain config (" << config.frame_id << ") : "
973  << "\n\tGain : " << config.gain << " was " << config_.gain
974  << "\n\tGainAuto : " << config.gain_auto << " was " << config_.gain_auto
975  << "\n\tGainAutoAdjustTol : " << config.gain_auto_tol << " was " << config_.gain_auto_tol
976  << "\n\tGainAutoMax : " << config.gain_auto_max << " was " << config_.gain_auto_max
977  << "\n\tGainAutoMin : " << config.gain_auto_min << " was " << config_.gain_auto_min
978  << "\n\tGainAutoOutliers : " << config.gain_auto_outliers << " was " << config_.gain_auto_outliers
979  << "\n\tGainAutoRate : " << config.gain_auto_rate << " was " << config_.gain_auto_rate
980  << "\n\tGainAutoTarget : " << config.gain_auto_target << " was " << config_.gain_auto_target);
981  }
982 }
983 
986  bool changed = false;
987  if (config.balance_ratio_abs != config_.balance_ratio_abs || on_init_) {
988  changed = true;
989  setFeatureValue("BalanceRatioAbs", static_cast<float>(config.balance_ratio_abs));
990  }
991  if (config.balance_ratio_selector != config_.balance_ratio_selector || on_init_) {
992  changed = true;
993  setFeatureValue("BalanceRatioSelector", config.balance_ratio_selector.c_str());
994  }
995  if (config.whitebalance_auto != config_.whitebalance_auto || on_init_) {
996  changed = true;
997  setFeatureValue("BalanceWhiteAuto", config.whitebalance_auto.c_str());
998  }
999  if (config.whitebalance_auto_tol != config_.whitebalance_auto_tol || on_init_) {
1000  changed = true;
1001  setFeatureValue("BalanceWhiteAutoAdjustTol", static_cast<VmbInt64_t>(config.whitebalance_auto_tol));
1002  }
1003  if (config.whitebalance_auto_rate != config_.whitebalance_auto_rate || on_init_) {
1004  changed = true;
1005  setFeatureValue("BalanceWhiteAutoRate", static_cast<VmbInt64_t>(config.whitebalance_auto_rate));
1006  }
1007  if(changed && show_debug_prints_){
1008  ROS_INFO_STREAM("New White Balance config (" << config.frame_id << ") : "
1009  << "\n\tBalanceRatioAbs : " << config.balance_ratio_abs << " was " << config_.balance_ratio_abs
1010  << "\n\tBalanceRatioSelector : " << config.balance_ratio_selector << " was " << config_.balance_ratio_selector
1011  << "\n\tBalanceWhiteAuto : " << config.whitebalance_auto << " was " << config_.whitebalance_auto
1012  << "\n\tBalanceWhiteAutoAdjustTol : " << config.whitebalance_auto_tol << " was " << config_.whitebalance_auto_tol
1013  << "\n\tBalanceWhiteAutoRate : " << config.whitebalance_auto_rate << " was " << config_.whitebalance_auto_rate);
1014  }
1015 }
1016 
1019  bool changed = false;
1020  if (config.ptp_mode != config_.ptp_mode || on_init_) {
1021  changed = true;
1022  setFeatureValue("PtpMode", config.ptp_mode.c_str());
1023  }
1024 
1025  if(changed && show_debug_prints_){
1026  ROS_INFO_STREAM("New PTP config (" << config.frame_id << ") : "
1027  << "\n\tPtpMode : " << config.ptp_mode << " was " << config_.ptp_mode);
1028  }
1029 }
1030 
1033  bool changed = false;
1034  if (config.decimation_x != config_.decimation_x || on_init_) {
1035  changed = true;
1036  setFeatureValue("DecimationHorizontal",
1037  static_cast<VmbInt64_t>(config.decimation_x));
1038  }
1039  if (config.decimation_y != config_.decimation_y || on_init_) {
1040  changed = true;
1041  setFeatureValue("DecimationVertical", static_cast<VmbInt64_t>(config.decimation_y));
1042  }
1043  if (config.binning_x != config_.binning_x || on_init_) {
1044  changed = true;
1045  setFeatureValue("BinningHorizontal", static_cast<VmbInt64_t>(config.binning_x));
1046  }
1047  if (config.binning_y != config_.binning_y || on_init_) {
1048  changed = true;
1049  setFeatureValue("BinningVertical", static_cast<VmbInt64_t>(config.binning_y));
1050  }
1051  if(changed && show_debug_prints_){
1052  ROS_INFO_STREAM("New Image Mode config (" << config.frame_id << ") : "
1053  << "\n\tDecimationHorizontal : " << config.decimation_x << " was " << config_.decimation_x
1054  << "\n\tDecimationVertical : " << config.decimation_y << " was " << config_.decimation_y
1055  << "\n\tBinningHorizontal : " << config.binning_x << " was " << config_.binning_x
1056  << "\n\tBinningVertical : " << config.binning_y << " was " << config_.binning_y);
1057  }
1058 }
1059 
1062  bool changed = false;
1063 
1064  // Region of interest configuration
1065  // Make sure ROI fits in image
1066 
1067  int max_width, max_height;
1068  getFeatureValue("WidthMax", max_width);
1069  getFeatureValue("HeightMax", max_height);
1070 
1071  int binning_or_decimation_x = std::max(config.binning_x, config.decimation_x);
1072  int binning_or_decimation_y = std::max(config.binning_y, config.decimation_y);
1073 
1074  max_width *= binning_or_decimation_x;
1075  max_height *= binning_or_decimation_y;
1076 
1077  config.width = std::min(config.width, (int)max_width);
1078  config.height = std::min(config.height, (int)max_height);
1079  config.roi_offset_x = std::min(config.roi_offset_x, config.width - 1);
1080  config.roi_offset_y = std::min(config.roi_offset_y, config.height - 1);
1081  config.roi_width = std::min(config.roi_width, config.width - config.roi_offset_x);
1082  config.roi_height = std::min(config.roi_height, config.height - config.roi_offset_y);
1083  // If width or height is 0, set it as large as possible
1084  int width = config.roi_width ? config.roi_width : max_width - config.roi_offset_x;
1085  int height = config.roi_height ? config.roi_height : max_height - config.roi_offset_y;
1086 
1087  // Adjust full-res ROI to binning ROI
1089  int offset_x = config.roi_offset_x;
1090  int offset_y = config.roi_offset_y;
1091  unsigned int right_x = (offset_x + width + binning_or_decimation_x - 1);
1092  unsigned int bottom_y = (offset_y + height + binning_or_decimation_y - 1);
1093  // Rounding up is bad when at max resolution which is not divisible by the amount of binning
1094  right_x = std::min(right_x, (unsigned)(config.width));
1095  bottom_y = std::min(bottom_y, (unsigned)(config.height));
1096  width = right_x - offset_x;
1097  height = bottom_y - offset_y;
1098 
1099  config.width = width/binning_or_decimation_x;
1100  config.height = height/binning_or_decimation_y;
1101  config.roi_offset_x = offset_x/binning_or_decimation_x;
1102  config.roi_offset_y = offset_y/binning_or_decimation_y;
1103 
1104  if (config.roi_offset_x != config_.roi_offset_x || on_init_) {
1105  changed = true;
1106  setFeatureValue("OffsetX", static_cast<VmbInt64_t>(config.roi_offset_x));
1107  }
1108  if (config.roi_offset_y != config_.roi_offset_y || on_init_) {
1109  changed = true;
1110  setFeatureValue("OffsetY", static_cast<VmbInt64_t>(config.roi_offset_y));
1111  }
1112  if (config.width != config_.width || on_init_) {
1113  changed = true;
1114  setFeatureValue("Width", static_cast<VmbInt64_t>(config.width));
1115  }
1116  if (config.height != config_.height || on_init_) {
1117  changed = true;
1118  setFeatureValue("Height", static_cast<VmbInt64_t>(config.height));
1119  }
1120 
1121  if(changed && show_debug_prints_){
1122  ROS_INFO_STREAM("New ROI config (" << config.frame_id << ") : "
1123  << "\n\tOffsetX : " << config.roi_offset_x << " was " << config_.roi_offset_x
1124  << "\n\tOffsetY : " << config.roi_offset_y << " was " << config_.roi_offset_y
1125  << "\n\tWidth : " << config.width << " was " << config_.width
1126  << "\n\tHeight : " << config.height << " was " << config_.height);
1127  }
1128 }
1129 
1132  bool changed = false;
1133  if (config.stream_bytes_per_second
1134  != config_.stream_bytes_per_second || on_init_) {
1135  changed = true;
1136  setFeatureValue("StreamBytesPerSecond",
1137  static_cast<VmbInt64_t>(config.stream_bytes_per_second));
1138  }
1139  if(changed && show_debug_prints_){
1140  ROS_INFO_STREAM("New Bandwidth config (" << config.frame_id << ") : "
1141  << "\n\tStreamBytesPerSecond : " << config.stream_bytes_per_second << " was " << config_.stream_bytes_per_second);
1142  }
1143 }
1144 
1147  bool changed = false;
1148  if (config.pixel_format != config_.pixel_format || on_init_) {
1149  changed = true;
1150  setFeatureValue("PixelFormat", config.pixel_format.c_str());
1151  }
1152  if(changed && show_debug_prints_){
1153  ROS_INFO_STREAM("New PixelFormat config (" << config.frame_id << ") : "
1154  << "\n\tPixelFormat : " << config.pixel_format << " was " << config_.pixel_format);
1155  }
1156 }
1157 
1160  bool changed = false;
1161  if (config.sync_in_selector
1162  != config_.sync_in_selector || on_init_) {
1163  changed = true;
1164  setFeatureValue("SyncInSelector", config.sync_in_selector.c_str());
1165  }
1166  if (config.sync_out_polarity
1167  != config_.sync_out_polarity || on_init_) {
1168  changed = true;
1169  setFeatureValue("SyncOutPolarity", config.sync_out_polarity.c_str());
1170  }
1171  if (config.sync_out_selector
1172  != config_.sync_out_selector || on_init_) {
1173  changed = true;
1174  setFeatureValue("SyncOutSelector", config.sync_out_selector.c_str());
1175  }
1176  if (config.sync_out_source
1177  != config_.sync_out_source || on_init_) {
1178  changed = true;
1179  setFeatureValue("SyncOutSource", config.sync_out_source.c_str());
1180  }
1181  if(changed && show_debug_prints_){
1182  ROS_INFO_STREAM("New GPIO config (" << config.frame_id << ") : "
1183  << "\n\tSyncInSelector : " << config.sync_in_selector << " was " << config_.sync_in_selector
1184  << "\n\tSyncOutPolarity : " << config.sync_out_polarity << " was " << config_.sync_out_polarity
1185  << "\n\tSyncOutSelector : " << config.sync_out_selector << " was " << config_.sync_out_selector
1186  << "\n\tSyncOutSource : " << config.sync_out_source << " was " << config_.sync_out_source);
1187  }
1188 }
1189 
1191  stat.add("Serial", guid_);
1192  stat.add("Info", diagnostic_msg_);
1193  // stat.add("Intrinsics", intrinsics_);
1194  // stat.add("Total frames dropped", frames_dropped_total_);
1195  // stat.add("Total frames", frames_completed_total_);
1196 
1197  // if (frames_completed_total_ > 0) {
1198  // stat.add("Total % frames dropped", 100.*(double)frames_dropped_total_/frames_completed_total_);
1199  // }
1200 
1201  // if (frames_completed_acc_.sum() > 0) {
1202  // stat.add("Recent % frames dropped", 100.*frames_dropped_acc_.sum()/frames_completed_acc_.sum());
1203  // }
1204 
1205  switch (camera_state_) {
1206  case OPENING:
1207  stat.summary(diagnostic_msgs::DiagnosticStatus::WARN, "Opening camera");
1208  break;
1209  case IDLE:
1210  stat.summary(diagnostic_msgs::DiagnosticStatus::OK, "Camera is idle");
1211  break;
1212  case OK:
1213  stat.summary(diagnostic_msgs::DiagnosticStatus::OK, "Camera is streaming");
1214  break;
1215  case CAMERA_NOT_FOUND:
1216  stat.summaryf(diagnostic_msgs::DiagnosticStatus::ERROR, "Cannot find requested camera %s", guid_.c_str());
1217  // stat.add("Available Cameras", getAvailableCameras());
1218  break;
1219  case FORMAT_ERROR:
1220  stat.summary(diagnostic_msgs::DiagnosticStatus::ERROR, "Problem retrieving frame");
1221  break;
1222  case ERROR:
1223  stat.summary(diagnostic_msgs::DiagnosticStatus::ERROR, "Camera has encountered an error");
1224  break;
1225  default:
1226  break;
1227  }
1228 }
1229 }
void updatePtpModeConfig(Config &config)
IMEXPORT VmbErrorType GetCameraByID(const char *pID, CameraPtr &pCamera)
std::string interfaceToString(VmbInterfaceType interfaceType)
static const char * State[]
void printAllCameraFeatures(const CameraPtr &camera)
void updateWhiteBalanceConfig(Config &config)
NetPointer< Frame, AVT::VmbAPINET::Frame > FramePtr
static volatile int keepRunning
static const char * FeatureDataType[]
void getCurrentState(diagnostic_updater::DiagnosticStatusWrapper &stat)
long long VmbInt64_t
void updateImageModeConfig(Config &config)
#define ROS_INFO_STREAM_THROTTLE(period, args)
void summary(unsigned char lvl, const std::string s)
void updatePixelFormatConfig(Config &config)
void setHardwareID(const std::string &hwid)
XmlRpcServer s
bool sleep() const
VmbFeatureDataType
Definition: VimbaC.h:164
CameraPtr openCamera(std::string id_str)
std::string getName(void *handle)
void add(const std::string &name, TaskFunction f)
#define ROS_WARN(...)
int getTriggerModeInt(std::string mode_str)
VmbErrorType
VmbAccessModeType
Definition: VimbaC.h:122
void summaryf(unsigned char lvl, const char *format,...)
NetPointer< Feature, AVT::VmbAPINET::Feature > FeaturePtr
void frameCallback(const FramePtr vimba_frame_ptr)
avt_vimba_camera::AvtVimbaCameraConfig Config
static const char * TriggerMode[]
void start(std::string ip_str, std::string guid_str, bool debug_prints=true)
NetPointer< Camera, AVT::VmbAPINET::Camera > CameraPtr
bool setFeatureValue(const std::string &feature_str, const T &val)
bool getFeatureValue(const std::string &feature_str, T &val)
void updateBandwidthConfig(Config &config)
static const char * AutoMode[]
void updateExposureConfig(Config &config)
#define ROS_WARN_STREAM(args)
VmbInterfaceType
Definition: VimbaC.h:107
void intHandler(int dummy)
diagnostic_updater::Updater updater_
#define ROS_INFO_STREAM(args)
void updateAcquisitionConfig(Config &config)
void add(const std::string &key, const T &val)
void broadcast(int lvl, const std::string msg)
#define ROS_ERROR_STREAM(args)
std::string errorCodeToMessage(VmbErrorType error)
Definition: avt_vimba_api.h:73
std::vector< FeaturePtr > FeaturePtrVector
Definition: Feature.h:46
#define ROS_ERROR(...)
static const char * BalanceRatioMode[]
std::string accessModeToString(VmbAccessModeType modeType)
bool runCommand(const std::string &command_str)


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Wed Jun 5 2019 22:22:40