我已经在 Jetson TX1 板(32bit Linux For Tegra R24.1)上安装了 ZED SDK 版本 1.0.0b。事实证明,当我将它与 pcl::IntegralImageNormalEstimation 一起使用时,它大部分时间都会因为一些奇怪的原因而崩溃。
我可以将其缩小到以下简单程序。CMakeLists.txt
cmake_minimum_required(VERSION 2.8.7)
project(zed_test)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF(NOT CMAKE_BUILD_TYPE)
SET(CUDA_VERSION "7.0")
find_package(CUDA ${CUDA_VERSION} REQUIRED)
find_package(ZED 1.0 REQUIRED)
find_package(PCL REQUIRED)
include_directories(
${CUDA_INCLUDE_DIRS}
${ZED_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
link_directories(${ZED_LIBRARY_DIR})
link_directories(${CUDA_LIBRARY_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(-std=c++11)# -m64) #-Wall)
add_executable(zed_test zed_test.cpp)
target_link_libraries(
zed_test
${ZED_LIBRARIES}
${CUDA_LIBRARIES} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY}
${PCL_LIBRARIES}
)
zed_test.cpp:
#include <cstdio>
#include <thread>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/features/integral_image_normal.h>
#include <zed/Camera.hpp>
int main(int argc, char **argv) {
std::cout << "Started\n";
//(1)
typedef pcl::IntegralImageNormalEstimation<pcl::PointXYZRGB, pcl::Normal> NormalEstimator;
NormalEstimator::Ptr ne_(new NormalEstimator);
//(2)
sl::zed::InitParams zed_params;
zed_params.unit = sl::zed::UNIT::METER;
zed_params.coordinate = sl::zed::COORDINATE_SYSTEM::RIGHT_HANDED;
zed_params.mode = sl::zed::MODE::PERFORMANCE;
zed_params.verbose = true;
std::unique_ptr<sl::zed::Camera> zed(new sl::zed::Camera(sl::zed::HD720, 30));
sl::zed::ERRCODE err = sl::zed::ERRCODE::ZED_NOT_AVAILABLE;
while (err != sl::zed::SUCCESS) {
err = zed->init(zed_params);
std::cout << sl::zed::errcode2str(err);
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
}
//(3)
std::cout << "\nPassed.\n";
return 0;
}
当内置到 Release 中并启动时,它经常崩溃(大约在三个连续运行中一次)并具有以下输出:
Started
ZED SDK >> (Init) Best GPU Found : GM20B , ID : 0
ZED SDK >> (Init) Disparity mode has been set to PERFORMANCE
ZED SDK >> (Init) Creating ZED GPU mem...
ZED SDK >> (Init) Starting Self-Calibration in background...
ZED SDK >> (Init) Done...
zed_test: /usr/local/include/eigen3/Eigen/src/SVD/JacobiSVD.h:632: const MatrixVType& Eigen::JacobiSVD<MatrixType, QRPreconditioner>::matrixV() const [with _MatrixType = Eigen::Matrix<double, 3, 3>; int QRPreconditioner = 2; Eigen::JacobiSVD<MatrixType, QRPreconditioner>::MatrixVType = Eigen::Matrix<double, 3, 3>; typename _MatrixType::Scalar = double]: Assertion `computeV() && "This JacobiSVD decomposition didn't compute V. Did you ask for it?"' failed.
SUCCESSThe program has unexpectedly finished.
(请注意,它在到达第 (3) 行之前就死了)如果我注释掉创建 pcl::IntegralImageNormalEstimation (第 (1) 行下的行)或打开 zed 相机(第 (2) 行下的行),则不会发生崩溃。如果我交换它们,崩溃仍然存在。
有人遇到过问题吗?来自stereolabs.com 的任何人都可以提示尝试解决方法?