I've installed ZED SDK version 1.0.0b on Jetson TX1 board (32bit Linux For Tegra R24.1). It turns out that it crashes most of the time for some strange reason when I use it with pcl::IntegralImageNormalEstimation.
I could narrow it down to the following simple program. 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;
}
When built into Release and started, it crashes often (about once in three sequential runs) with following output:
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.
(note that it died before reaching the line (3)) If I comment off either creating pcl::IntegralImageNormalEstimation (lines under (1)) or opening the zed camera (lines under (2)) no crash occurs. If I swap them the crash is still there.
Has anyone had the problem? Anyone from stereolabs.com to make hint of a workaround to try?