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 
32 #include "rtabmap/core/Version.h"
33 
34 namespace sl
35 {
36 class Camera;
37 }
38 
39 namespace rtabmap
40 {
41 class ZedIMUThread;
42 
43 class RTABMAP_CORE_EXPORT CameraStereoZed :
44  public Camera
45 {
46 public:
47  static bool available();
48  static int sdkVersion();
49 public:
51  int deviceId,
52  int resolution = 6, // 0=HD2K, 1=HD1080, 2=HD1200, 3=HD720, 4=SVGA, 5=VGA, 6=AUTO
53  int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
54  int sensingMode = 0,// 0=STANDARD, 1=FILL
55  int confidenceThr = 100,
56  bool computeOdometry = false,
57  float imageRate=0.0f,
58  const Transform & localTransform = Transform::getIdentity(),
59  bool selfCalibration = true,
60  bool odomForce3DoF = false,
61  int texturenessConfidenceThr = 90); // introduced with ZED SDK 3
63  const std::string & svoFilePath,
64  int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY, 3=NEURAL
65  int sensingMode = 0,// 0=STANDARD, 1=FILL
66  int confidenceThr = 100,
67  bool computeOdometry = false,
68  float imageRate=0.0f,
69  const Transform & localTransform = Transform::getIdentity(),
70  bool selfCalibration = true,
71  bool odomForce3DoF = false,
72  int texturenessConfidenceThr = 90); // introduced with ZED SDK 3
73  virtual ~CameraStereoZed();
74 
75  virtual bool init(const std::string & calibrationFolder = ".", const std::string & cameraName = "");
76  virtual bool isCalibrated() const;
77  virtual std::string getSerial() const;
78  virtual bool odomProvided() const;
79  virtual bool getPose(double stamp, Transform & pose, cv::Mat & covariance, double maxWaitTime = 0.0);
80 
81  void postInterIMUPublic(const IMU & imu, double stamp);
82 
83 protected:
84  virtual SensorData captureImage(SensorCaptureInfo * info = 0);
85 
86 private:
87 #ifdef RTABMAP_ZED
88  sl::Camera * zed_;
89  StereoCameraModel stereoModel_;
90  Transform imuLocalTransform_;
92  int usbDevice_;
93  std::string svoFilePath_;
94  int resolution_;
95  int quality_;
96  bool selfCalibration_;
97  int sensingMode_;
98  int confidenceThr_;
99  int texturenessConfidenceThr_; // introduced with ZED SDK 3
100  bool computeOdometry_;
101  bool lost_;
102  bool force3DoF_;
103  ZedIMUThread * imuPublishingThread_;
104 #endif
105 };
106 
107 
108 } // namespace rtabmap
rtabmap::SensorData
Definition: SensorData.h:51
rtabmap::StereoCameraModel
Definition: StereoCameraModel.h:35
Camera
CameraVideo.h
rtabmap::Transform::getIdentity
static Transform getIdentity()
Definition: Transform.cpp:411
rtabmap::SensorCaptureInfo
Definition: SensorCaptureInfo.h:36
rtabmap::IMU
Definition: IMU.h:19
rtabmap::CameraVideo::Source
Source
Definition: CameraVideo.h:40
info
else if n * info
sl
Definition: CameraStereoZed.h:34
StereoCameraModel.h
rtabmap::Camera
Definition: Camera.h:43
f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
rtabmap_netvlad.init
def init(descriptorDim)
Definition: rtabmap_netvlad.py:30
getPose
Pose3_ getPose(const Expression< PinholeCamera< CALIBRATION > > &cam)
rtabmap::CameraStereoZed
Definition: CameraStereoZed.h:43
rtabmap::Transform
Definition: Transform.h:41
rtabmap
Definition: CameraARCore.cpp:35


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:07