41 #include <pcl/pcl_config.h>
44 #include <pcl/common/io.h>
45 #include <Eigen/Geometry>
46 #include <Eigen/StdVector>
47 #include <pcl/io/boost.h>
49 #include <pcl/io/grabber.h>
50 #include <pcl/common/synchronizer.h>
69 using PairOfImages = std::pair<pcl::PCLImage, pcl::PCLImage>;
73 using Ptr = shared_ptr<EnsensoGrabber>;
74 using ConstPtr = shared_ptr<const EnsensoGrabber>;
79 using sig_cb_ensenso_images = void(
const shared_ptr<PairOfImages>&);
101 openDevice (
const int device = 0);
125 isTcpPortOpen ()
const;
151 configureCapture (
const bool auto_exposure =
true,
152 const bool auto_gain =
true,
153 const int bining = 1,
154 const float exposure = 0.32,
155 const bool front_light =
false,
157 const bool gain_boost =
false,
158 const bool hardware_gamma =
false,
159 const bool hdr =
false,
160 const int pixel_clock = 10,
161 const bool projector =
true,
162 const int target_brightness = 80,
163 const std::string trigger_mode =
"Software",
164 const bool use_disparity_map_area_of_interest =
false)
const;
185 initExtrinsicCalibration (
const int grid_spacing)
const;
189 clearCalibrationPatternBuffer ()
const;
196 captureCalibrationPattern ()
const;
204 estimateCalibrationPatternPose (Eigen::Affine3d &pattern_pose)
const;
218 computeCalibrationMatrix (
const std::vector<Eigen::Affine3d, Eigen::aligned_allocator<Eigen::Affine3d> > &robot_poses,
220 const std::string setup =
"Moving",
221 const std::string target =
"Hand",
222 const Eigen::Affine3d &guess_tf = Eigen::Affine3d::Identity (),
223 const bool pretty_format =
true)
const;
231 storeEEPROMExtrinsicCalibration ()
const;
236 clearEEPROMExtrinsicCalibration ();
255 setExtrinsicCalibration (
const double euler_angle,
256 Eigen::Vector3d &rotation_axis,
257 const Eigen::Vector3d &translation,
258 const std::string target =
"Hand")
const;
264 setExtrinsicCalibration (
const std::string target =
"Hand");
281 setExtrinsicCalibration (
const Eigen::Affine3d &transformation,
282 const std::string target =
"Hand");
286 getFramesPerSecond ()
const;
292 openTcpPort (
const int port = 24000);
305 getTreeAsJson (
const bool pretty_format =
true)
const;
312 getResultAsJson (
const bool pretty_format =
true)
const;
327 jsonTransformationToEulerAngles (
const std::string &json,
345 jsonTransformationToAngleAxis (
const std::string json,
347 Eigen::Vector3d &axis,
348 Eigen::Vector3d &translation)
const;
359 jsonTransformationToMatrix (
const std::string transformation,
360 Eigen::Affine3d &matrix)
const;
377 eulerAnglesTransformationToJson (
const double x,
384 const bool pretty_format =
true)
const;
401 angleAxisTransformationToJson (
const double x,
409 const bool pretty_format =
true)
const;
420 matrixTransformationToJson (
const Eigen::Affine3d &matrix,
422 const bool pretty_format =
true)
const;
468 getPCLStamp (
const double ensenso_stamp);
477 getOpenCVType (
const int channels,