mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
remove unnecessary conversion function
This commit is contained in:
@@ -104,8 +104,6 @@ private:
|
|||||||
std::map<double, cv::Vec3f> accBuffer_;
|
std::map<double, cv::Vec3f> accBuffer_;
|
||||||
std::map<double, cv::Vec3f> gyroBuffer_;
|
std::map<double, cv::Vec3f> gyroBuffer_;
|
||||||
UMutex imuMutex_;
|
UMutex imuMutex_;
|
||||||
|
|
||||||
static std::string ProtocolToStr(XLinkProtocol_t val);
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ bool CameraDepthAI::init(const std::string & calibrationFolder, const std::strin
|
|||||||
monoRight->out.link(stereo->right);
|
monoRight->out.link(stereo->right);
|
||||||
|
|
||||||
// Using VideoEncoder on PoE devices, Subpixel is not supported
|
// Using VideoEncoder on PoE devices, Subpixel is not supported
|
||||||
if(ProtocolToStr(deviceToUse.protocol) == "X_LINK_TCP_IP")
|
if(deviceToUse.protocol == X_LINK_TCP_IP)
|
||||||
{
|
{
|
||||||
auto leftEnc = p.create<dai::node::VideoEncoder>();
|
auto leftEnc = p.create<dai::node::VideoEncoder>();
|
||||||
auto depthOrRightEnc = p.create<dai::node::VideoEncoder>();
|
auto depthOrRightEnc = p.create<dai::node::VideoEncoder>();
|
||||||
@@ -560,7 +560,7 @@ SensorData CameraDepthAI::captureImage(CameraInfo * info)
|
|||||||
rectifRightOrDepth = rightOrDepthQueue_->get<dai::ImgFrame>();
|
rectifRightOrDepth = rightOrDepthQueue_->get<dai::ImgFrame>();
|
||||||
|
|
||||||
double stamp = std::chrono::duration<double>(rectifL->getTimestampDevice(dai::CameraExposureOffset::MIDDLE).time_since_epoch()).count();
|
double stamp = std::chrono::duration<double>(rectifL->getTimestampDevice(dai::CameraExposureOffset::MIDDLE).time_since_epoch()).count();
|
||||||
if(ProtocolToStr(device_->getDeviceInfo().protocol) == "X_LINK_TCP_IP")
|
if(device_->getDeviceInfo().protocol == X_LINK_TCP_IP)
|
||||||
{
|
{
|
||||||
left = cv::imdecode(rectifL->getData(), cv::IMREAD_GRAYSCALE);
|
left = cv::imdecode(rectifL->getData(), cv::IMREAD_GRAYSCALE);
|
||||||
depthOrRight = cv::imdecode(rectifRightOrDepth->getData(), cv::IMREAD_GRAYSCALE);
|
depthOrRight = cv::imdecode(rectifRightOrDepth->getData(), cv::IMREAD_GRAYSCALE);
|
||||||
@@ -703,30 +703,4 @@ SensorData CameraDepthAI::captureImage(CameraInfo * info)
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RTABMAP_DEPTHAI
|
|
||||||
std::string CameraDepthAI::ProtocolToStr(XLinkProtocol_t val)
|
|
||||||
{
|
|
||||||
switch (val)
|
|
||||||
{
|
|
||||||
case X_LINK_USB_VSC:
|
|
||||||
return "X_LINK_USB_VSC";
|
|
||||||
case X_LINK_USB_CDC:
|
|
||||||
return "X_LINK_USB_CDC";
|
|
||||||
case X_LINK_PCIE:
|
|
||||||
return "X_LINK_PCIE";
|
|
||||||
case X_LINK_IPC:
|
|
||||||
return "X_LINK_IPC";
|
|
||||||
case X_LINK_TCP_IP:
|
|
||||||
return "X_LINK_TCP_IP";
|
|
||||||
case X_LINK_NMB_OF_PROTOCOLS:
|
|
||||||
return "X_LINK_NMB_OF_PROTOCOLS";
|
|
||||||
case X_LINK_ANY_PROTOCOL:
|
|
||||||
return "X_LINK_ANY_PROTOCOL";
|
|
||||||
default:
|
|
||||||
return "INVALID_ENUM_VALUE";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace rtabmap
|
} // namespace rtabmap
|
||||||
|
|||||||
Reference in New Issue
Block a user