Skip to content

Commit

Permalink
Add RGBD mode for OAK camera (#1179)
Browse files Browse the repository at this point in the history
* update depthai params

* add color+depth mode

* workarounds to avoid performance issues
  • Loading branch information
borongyuan authored Dec 14, 2023
1 parent be3e6c5 commit 45392fc
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 126 deletions.
19 changes: 9 additions & 10 deletions corelib/include/rtabmap/core/camera/CameraDepthAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ class RTABMAP_CORE_EXPORT CameraDepthAI :
const Transform & localTransform = Transform::getIdentity());
virtual ~CameraDepthAI();

void setOutputDepth(bool enabled, int confidence = 200);
void setUseSpecTranslation(bool useSpecTranslation);
void setAlphaScaling(float alphaScaling = 0.0f);
void setIMUPublished(bool published);
void publishInterIMU(bool enabled);
void setLaserDotBrightness(float dotProjectormA = 0.0f);
void setFloodLightBrightness(float floodLightmA = 200.0f);
void setOutputMode(int outputMode = 0);
void setDepthProfile(int confThreshold = 200, int lrcThreshold = 5);
void setRectification(bool useSpecTranslation, float alphaScaling = 0.0f);
void setIMU(bool imuPublished, bool publishInterIMU);
void setIrBrightness(float dotProjectormA = 0.0f, float floodLightmA = 200.0f);
void setDetectFeatures(int detectFeatures = 0);
void setBlobPath(const std::string & blobPath);
void setGFTTDetector(bool useHarrisDetector = false, float minDistance = 7.0f, int numTargetFeatures = 1000);
Expand All @@ -80,8 +78,9 @@ class RTABMAP_CORE_EXPORT CameraDepthAI :
cv::Size targetSize_;
Transform imuLocalTransform_;
std::string mxidOrName_;
bool outputDepth_;
int depthConfidence_;
int outputMode_;
int confThreshold_;
int lrcThreshold_;
int resolution_;
bool useSpecTranslation_;
float alphaScaling_;
Expand All @@ -98,7 +97,7 @@ class RTABMAP_CORE_EXPORT CameraDepthAI :
int nmsRadius_;
std::string blobPath_;
std::shared_ptr<dai::Device> device_;
std::shared_ptr<dai::DataOutputQueue> leftQueue_;
std::shared_ptr<dai::DataOutputQueue> leftOrColorQueue_;
std::shared_ptr<dai::DataOutputQueue> rightOrDepthQueue_;
std::shared_ptr<dai::DataOutputQueue> featuresQueue_;
std::map<double, cv::Vec3f> accBuffer_;
Expand Down
Loading

0 comments on commit 45392fc

Please sign in to comment.