视觉学习笔记7——ZED2安装SDK,并用于ORB-SLAM3( 二 )


ZED——ZED传感器,ZED2支持;
ZED ——用于zed相机的实时预览和录制;
ZED Depth ——捕获和显示深度图像和点云;
ZEDfu——ZED相机的实时3D映射和制图;
2、报错问题 报错1:未安装
WARNING! Python API failed to install
执行:
cd /usr/local/zed/python get_python_api.pypython3 -m pip install pyzed-3.1-cp37-cp37m-linux_x86_64.whl

视觉学习笔记7——ZED2安装SDK,并用于ORB-SLAM3

文章插图
检查:
python3import pyzed
成功安装
报错2:找不到 .so.0文件
./ZED_Depth_Viewer: error while loading shared libraries: libturbojpeg.so.0: cannot open shared object file: No such file or directory
1、进入下载官网页面,下载2.0.x版本的-turbo-2.0.2.tar.gz,网址可能要爬墙 。
2、使用tar -zxvf -turbo-2.0.2.tar.gz 将压缩包解压, 接着在解压文件下执行以下命令:
mkdir build cmake -G"Unix Makefiles" ..(我用的是cmake-GUI)makesudo make install(被安装在opt下)
3、复制到到 /usr/local/lib库路径:
sudo cp /opt/libjpeg-turbo/lib64/libturbojpeg.so.0 /usr/local/lib
检查:
cd /usr/local/zed/tools./ZED Depth Viewer
成功调用
三、ROS调用ZED2 1、编译ZED的工作空间
安装zed ros
这里默认各位已经有自己的ros工作空间了
进入工作空间cd ~/catkin_ws/src下载文件git clone --recursive https://github.com/stereolabs/zed-ros-wrapper.gitgit clone --recursive https://github.com/stereolabs/zed-ros-examples.git退出安装依赖与编译cd ../rosdep install --from-paths src --ignore-src -r -ycatkin_make -DCMAKE_BUILD_TYPE=Releasesource ./devel/setup.bash通过ros调用zed2roslaunch zed_display_rviz display_zed2.launchroslaunch zed_rtabmap_example zed_rtabmap.launch
1、.
2、.
报错1:多cuda问题
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):Could NOT find CUDA: Found unsuitable version "10.2", but required is exactversion "10.1" (found /usr/local/cuda)Call Stack (most recent call first):/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE)/usr/share/cmake-3.10/Modules/FindCUDA.cmake:1080 (find_package_handle_standard_args)/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake:86 (find_package)/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake:108 (find_host_package)zed-ros-examples/tests/zed_sync_test/CMakeLists.txt:10 (find_package)-- Configuring incomplete, errors occurred!See also "/home/llw/Guide_blind/ROS/catkin_ws/build/CMakeFiles/CMakeOutput.log".See also "/home/llw/Guide_blind/ROS/catkin_ws/build/CMakeFiles/CMakeError.log".Invoking "cmake" failedPlease delete if you wish to re-initialize
大概指.cmake有误,因为之前是在.1下编译的CV,想彻底解决可能需要重新编译 。
可是我用的是多cuda,于是尝试一个捷径,可能会存在一定后患 。
sudo gedit/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake
修改成10.2和8.0.5
成功编译上面的工作空间命令,之后还要多思考cuda问题 。
报错2:imu包缺失
PluginlibFactory: The plugin for class 'rviz_imu_plugin/Imu' failed to load.Error: According to the loaded plugin descriptions the class rviz_imu_plugin/Imu with base class type rviz::Display does not exist. Declared types arerviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/WrenchStamped rviz_plugin_tutorials/Imu rviz_plugin_zed_od/ZedOdDisplay