reconfigure.h
Go to the documentation of this file.
1 
34 #ifndef MULTISENSE_ROS_RECONFIGURE_H
35 #define MULTISENSE_ROS_RECONFIGURE_H
36 
37 #include <boost/shared_ptr.hpp>
38 #include <boost/thread.hpp>
39 #include <ros/ros.h>
40 
41 #include <multisense_lib/MultiSenseChannel.hh>
42 
43 #include <dynamic_reconfigure/server.h>
44 #include <multisense_ros/sl_bm_cmv2000Config.h>
45 #include <multisense_ros/sl_bm_cmv2000_imuConfig.h>
46 #include <multisense_ros/sl_bm_cmv4000Config.h>
47 #include <multisense_ros/sl_bm_cmv4000_imuConfig.h>
48 #include <multisense_ros/sl_sgm_cmv2000_imuConfig.h>
49 #include <multisense_ros/sl_sgm_cmv4000_imuConfig.h>
50 #include <multisense_ros/bcam_imx104Config.h>
51 #include <multisense_ros/st21_sgm_vga_imuConfig.h>
52 #include <multisense_ros/mono_cmv2000Config.h>
53 #include <multisense_ros/mono_cmv4000Config.h>
54 
55 namespace multisense_ros {
56 
57 class Reconfigure {
58 public:
59 
61  boost::function<void ()> resolutionChangeCallback=0,
62  boost::function<void (int, int)> borderClipChangeCallback=0);
63 
64  ~Reconfigure();
65 
66  void imuCallback(const crl::multisense::imu::Header& header);
67 
68 private:
69 
70  //
71  // Dynamic reconfigure callback variations
72 
73  void callback_sl_bm_cmv2000 (multisense_ros::sl_bm_cmv2000Config& config, uint32_t level);
74  void callback_sl_bm_cmv2000_imu (multisense_ros::sl_bm_cmv2000_imuConfig& config, uint32_t level);
75  void callback_sl_bm_cmv4000 (multisense_ros::sl_bm_cmv4000Config& config, uint32_t level);
76  void callback_sl_bm_cmv4000_imu (multisense_ros::sl_bm_cmv4000_imuConfig& config, uint32_t level);
77  void callback_sl_sgm_cmv2000_imu(multisense_ros::sl_sgm_cmv2000_imuConfig& config, uint32_t level);
78  void callback_sl_sgm_cmv4000_imu(multisense_ros::sl_sgm_cmv4000_imuConfig& config, uint32_t level);
79  void callback_bcam_imx104 (multisense_ros::bcam_imx104Config& config, uint32_t level);
80  void callback_st21_vga (multisense_ros::st21_sgm_vga_imuConfig& config, uint32_t level);
81  void callback_mono_cmv2000 (multisense_ros::mono_cmv2000Config& config, uint32_t level);
82  void callback_mono_cmv4000 (multisense_ros::mono_cmv4000Config& config, uint32_t level);
83 
84  //
85  // Internal helper functions
86 
88  int32_t width, int32_t height, int32_t disparities);
89  template<class T> void configureSgm(crl::multisense::image::Config& cfg, const T& dyn);
90  template<class T> void configureCamera(crl::multisense::image::Config& cfg, const T& dyn);
91  template<class T> void configureCropMode(crl::multisense::image::Config& cfg, const T& dyn);
92  template<class T> void configureImu(const T& dyn);
93  template<class T> void configureBorderClip(const T& dyn);
94 
95  //
96  // CRL sensor API
97 
99 
100  //
101  // Resolution change callback
102 
103  boost::function<void ()> resolution_change_callback_;
104 
105  //
106  // Driver nodes
107 
109 
110  //
111  // Cached modes from the sensor
112 
113  std::vector<crl::multisense::system::DeviceMode> device_modes_;
115  std::vector<crl::multisense::imu::Config> imu_configs_;
116 
117  //
118  // Dynamic reconfigure server variations
119 
130 
131  //
132  // Cached values for supported sub-systems (these may be unavailable on
133  // certain hardware variations: S7, S7S, M, etc.)
134 
138 
139  //
140  // Cached value for the boarder clip. These are used to determine if we
141  // should regenerate our border clipping mask
142 
144 
147 
148  //
149  // Border clip change callback
150 
151  boost::function<void (int, int)> border_clip_change_callback_;
152 };
153 
154 } // multisense_ros
155 
156 #endif
void callback_sl_bm_cmv4000(multisense_ros::sl_bm_cmv4000Config &config, uint32_t level)
void imuCallback(const crl::multisense::imu::Header &header)
void configureCamera(crl::multisense::image::Config &cfg, const T &dyn)
boost::function< void(int, int)> border_clip_change_callback_
Definition: reconfigure.h:151
void configureBorderClip(const T &dyn)
std::vector< crl::multisense::system::DeviceMode > device_modes_
Definition: reconfigure.h:113
crl::multisense::Channel * driver_
Definition: reconfigure.h:98
void callback_mono_cmv4000(multisense_ros::mono_cmv4000Config &config, uint32_t level)
void callback_mono_cmv2000(multisense_ros::mono_cmv2000Config &config, uint32_t level)
void callback_sl_sgm_cmv4000_imu(multisense_ros::sl_sgm_cmv4000_imuConfig &config, uint32_t level)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::st21_sgm_vga_imuConfig > > server_st21_vga_
Definition: reconfigure.h:127
void callback_st21_vga(multisense_ros::st21_sgm_vga_imuConfig &config, uint32_t level)
void callback_sl_sgm_cmv2000_imu(multisense_ros::sl_sgm_cmv2000_imuConfig &config, uint32_t level)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::sl_bm_cmv4000Config > > server_sl_bm_cmv4000_
Definition: reconfigure.h:122
ros::NodeHandle device_nh_
Definition: reconfigure.h:108
void callback_sl_bm_cmv4000_imu(multisense_ros::sl_bm_cmv4000_imuConfig &config, uint32_t level)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::bcam_imx104Config > > server_bcam_imx104_
Definition: reconfigure.h:126
void configureImu(const T &dyn)
Reconfigure(crl::multisense::Channel *driver, boost::function< void()> resolutionChangeCallback=0, boost::function< void(int, int)> borderClipChangeCallback=0)
Definition: reconfigure.cpp:40
void configureCropMode(crl::multisense::image::Config &cfg, const T &dyn)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::sl_sgm_cmv4000_imuConfig > > server_sl_sgm_cmv4000_imu_
Definition: reconfigure.h:125
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::sl_sgm_cmv2000_imuConfig > > server_sl_sgm_cmv2000_imu_
Definition: reconfigure.h:124
void configureSgm(crl::multisense::image::Config &cfg, const T &dyn)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::sl_bm_cmv2000_imuConfig > > server_sl_bm_cmv2000_imu_
Definition: reconfigure.h:121
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::mono_cmv2000Config > > server_mono_cmv2000_
Definition: reconfigure.h:128
bool changeResolution(crl::multisense::image::Config &cfg, int32_t width, int32_t height, int32_t disparities)
void callback_sl_bm_cmv2000(multisense_ros::sl_bm_cmv2000Config &config, uint32_t level)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::mono_cmv4000Config > > server_mono_cmv4000_
Definition: reconfigure.h:129
void callback_bcam_imx104(multisense_ros::bcam_imx104Config &config, uint32_t level)
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::sl_bm_cmv4000_imuConfig > > server_sl_bm_cmv4000_imu_
Definition: reconfigure.h:123
void callback_sl_bm_cmv2000_imu(multisense_ros::sl_bm_cmv2000_imuConfig &config, uint32_t level)
boost::function< void()> resolution_change_callback_
Definition: reconfigure.h:103
std::vector< crl::multisense::imu::Config > imu_configs_
Definition: reconfigure.h:115
boost::shared_ptr< dynamic_reconfigure::Server< multisense_ros::sl_bm_cmv2000Config > > server_sl_bm_cmv2000_
Definition: reconfigure.h:120


multisense_ros
Author(s):
autogenerated on Wed Jan 8 2020 03:37:59