capture_settings_controller.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <Zivid/Settings.h>
6 #include <Zivid/Settings2D.h>
7 
8 #include <ros/node_handle.h>
9 
10 namespace Zivid
11 {
12 class Camera;
13 }
14 
15 namespace zivid_camera
16 {
17 template <typename ConfigType, typename ZividSettings>
19 
30 template <typename ZividSettingsType, typename SettingsConfigType, typename SettingsAcquisitionConfigType>
32 {
33  static_assert(std::is_same_v<ZividSettingsType, Zivid::Settings> ||
34  std::is_same_v<ZividSettingsType, Zivid::Settings2D>);
35  static_assert(std::is_same_v<SettingsConfigType, SettingsConfig> ||
36  std::is_same_v<SettingsConfigType, Settings2DConfig>);
37  static_assert(std::is_same_v<SettingsAcquisitionConfigType, SettingsAcquisitionConfig> ||
38  std::is_same_v<SettingsAcquisitionConfigType, Settings2DAcquisitionConfig>);
39 
40 public:
41  CaptureSettingsController(ros::NodeHandle& nh, Zivid::Camera& camera, const std::string& config_node_name,
42  std::size_t num_acquisition_servers);
44  ZividSettingsType zividSettings() const;
45  void setZividSettings(const ZividSettingsType& settings);
46  std::size_t numAcquisitionConfigServers() const;
47 
48 private:
52  std::string config_node_name_;
53  std::unique_ptr<SettingsConfigTypeDRServer> general_config_dr_server_;
54  std::vector<std::unique_ptr<SettingsAcquisitionConfigTypeDRServer>> acquisition_config_dr_servers_;
55 };
56 
57 extern template class CaptureSettingsController<Zivid::Settings, zivid_camera::SettingsConfig,
58  zivid_camera::SettingsAcquisitionConfig>;
59 extern template class CaptureSettingsController<Zivid::Settings2D, zivid_camera::Settings2DConfig,
60  zivid_camera::Settings2DAcquisitionConfig>;
61 
62 } // namespace zivid_camera
std::unique_ptr< SettingsConfigTypeDRServer > general_config_dr_server_
std::vector< std::unique_ptr< SettingsAcquisitionConfigTypeDRServer > > acquisition_config_dr_servers_
Controller that manages dynamic_reconfigure nodes for Settings and Settings2D


zivid_camera
Author(s): Zivid
autogenerated on Sat Apr 17 2021 02:51:05