Indemind双目模组
安装程序
参考Ubuntu 安装
参考使用Indemind双目模组跑ORB_SLAM3
安装opencv3.4.3
[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
# 直接从opencv网站下载
$ git clone https://github.com/opencv/opencv.git
$ cd opencv/
$ git checkout tags/3.4.3
$ mkdir build
$ cd build/
$ cmake \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=/usr/local \
\
-DWITH_CUDA=OFF \
\
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
..
$ make -j4
$ sudo make install
安装protobuf
[required] sudo apt-get install autoconf automake libtool
# git clone https://github.com/google/protobuf.git
git clone https://gitee.com/nfengjing/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
protoc --version # 若安装成功,将显示protoc版本
执行 “git submodule update --init --recursive” 之前,先修改 .gitmodules,把地址修改下
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://gitee.com/zhang1021/benchmark.git
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://gitee.com/extra-mirrors/googletest.git
ignore = dirty
编译安装MNN了
# git clone https://github.com/alibaba/MNN.git
git clone https://gitee.com/zeekim/MNN.git
cd MNN
./schema/generate.sh
mkdir build $$ cd build
cmake ..
make -j4
sudo make install
安装完之后,还是报错
[ERROR] [1641920128.358859146]: Failed to load nodelet [/imsee/imsee_wrapper_node] of type [imsee/ROSWrapperNodelet] even after refreshing the cache: Failed to load library /home/xhb/ros/IMSEE-SDK/ros/devel/lib//libimsee_wrapper.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = libopencv_calib3d3.so.3.3: cannot open shared object file: No such file or directory)
[ERROR] [1641920128.358941221]: The error before refreshing the cache was: Failed to load library /home/xhb/ros/IMSEE-SDK/ros/devel/lib//libimsee_wrapper.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = libopencv_calib3d3.so.3.3: cannot open shared object file: No such file or directory)
由于我用环境是unbutu18.04,所以要把 IMSEE-SDK/lib/others/x64-opencv3.4.3/libindemind.so,复制到 IMSEE-SDK/lib/x86-64,替换一下文件
这时执行下面的语句,指定opencv3.4.3的库文件位置
echo "/home/xhb/soft/opencv-3.4.3/lib" >> /etc/ld.so.conf
在IMSEE-SDK目录运行程序,必须用管理员权限
sudo su
root@xhblinux-sz:source ros/devel/setup.bash
root@xhblinux-sz:/home/xhb/ros/IMSEE-SDK# roslaunch imsee_ros_wrapper display.launch
所以这里使用的管理员的帐号,必须修改管理员下面的.bashrc ,在最下面添加
source /opt/ros/melodic/setup.bash
# OpenCV_DIR is the directory where your OpenCVConfig.cmake exists
export OpenCV_DIR=/home/xhb/soft/opencv-3.4.3/share/OpenCV:/home/xhb/soft/opencv-3.4.3
source /home/xhb/ros/IMSEE-SDK/ros/devel/setup.bash
把setup.bash 也加进去,就不用每次都导入了,在这里加上 export OpenCV_DIR ,好像也没用,但也加上
只有修改/etc/ld.so.conf 才有用。坑了我好久