CameraStereoZed.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the Universite de Sherbrooke nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #pragma once
29 
30 #include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
31 
34 #include "rtabmap/core/Version.h"
35 
36 namespace sl
37 {
38 class Camera;
39 }
40 
41 namespace rtabmap
42 {
43 class ZedIMUThread;
44 
46  public Camera
47 {
48 public:
49  static bool available();
50 
51 public:
53  int deviceId,
54  int resolution = 2, // 0=HD2K, 1=HD1080, 2=HD720, 3=VGA
55  int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
56  int sensingMode = 0,// 0=STANDARD, 1=FILL
57  int confidenceThr = 100,
58  bool computeOdometry = false,
59  float imageRate=0.0f,
60  const Transform & localTransform = Transform::getIdentity(),
61  bool selfCalibration = true,
62  bool odomForce3DoF = false,
63  int texturenessConfidenceThr = 90); // introduced with ZED SDK 3
65  const std::string & svoFilePath,
66  int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
67  int sensingMode = 0,// 0=STANDARD, 1=FILL
68  int confidenceThr = 100,
69  bool computeOdometry = false,
70  float imageRate=0.0f,
71  const Transform & localTransform = Transform::getIdentity(),
72  bool selfCalibration = true,
73  bool odomForce3DoF = false,
74  int texturenessConfidenceThr = 90); // introduced with ZED SDK 3
75  virtual ~CameraStereoZed();
76 
77  virtual bool init(const std::string & calibrationFolder = ".", const std::string & cameraName = "");
78  virtual bool isCalibrated() const;
79  virtual std::string getSerial() const;
80  virtual bool odomProvided() const;
81  virtual bool getPose(double stamp, Transform & pose, cv::Mat & covariance);
82 
83  void publishInterIMU(bool enabled);
84 
85 protected:
86  virtual SensorData captureImage(CameraInfo * info = 0);
87 
88 private:
89 #ifdef RTABMAP_ZED
90  sl::Camera * zed_;
91  StereoCameraModel stereoModel_;
92  Transform imuLocalTransform_;
94  int usbDevice_;
95  std::string svoFilePath_;
96  int resolution_;
97  int quality_;
98  bool selfCalibration_;
99  int sensingMode_;
100  int confidenceThr_;
101  int texturenessConfidenceThr_; // introduced with ZED SDK 3
102  bool computeOdometry_;
103  bool lost_;
104  bool force3DoF_;
105  bool publishInterIMU_;
106  ZedIMUThread * imuPublishingThread_;
107 #endif
108 };
109 
110 
111 } // namespace rtabmap
f
def init(descriptorDim, matchThreshold, iterations, cuda, model_path)
#define RTABMAP_EXP
Definition: RtabmapExp.h:38


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:37:28