相机+IMU+雷达环境搭建
1. 相机颜色不正确
cd hik_camera_driver vim src/mvs_ros_pkg/src/grab_trigger_new.cpp nRet = MV_CC_GetImageForRGB(handle, pData, nBufSize, &stImageInfo, 1000);
启动相机:
source devel/setup.bash roslaunch mvs_ros_pkg mvs_camera_trigger.launch
2. LET-NET VINS-mono 代码
copy 到 目录下:
rm src/CMakeLists.txt
catkin_make
报错:
CMake Error at xx/camera_model/CMakeLists.txt:19 (find_package):
By not providing "FindCeres.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Ceres", but
CMake did not find one.
Could not find a package configuration file provided by "Ceres" with any of
the following names:
CeresConfig.cmake ceres-config.cmake
Add the installation prefix of "Ceres" to CMAKE_PREFIX_PATH or set
"Ceres_DIR" to a directory containing one of the above files. If "Ceres"
provides a separate development package or SDK, be sure it has been
installed.
http://ceres-solver.org/installation.html#linux
手动下载:
https://ceres-solver.googlesource.com/ceres-solver/+/refs/tags/2.2.0
下载 tgz
或者:
git clone https://ceres-solver.googlesource.com/ceres-solver
# CMake sudo apt-get install cmake # google-glog + gflags sudo apt-get install libgoogle-glog-dev libgflags-dev # Use ATLAS for BLAS & LAPACK sudo apt-get install libatlas-base-dev # Eigen3 sudo apt-get install libeigen3-dev # SuiteSparse (optional) sudo apt-get install libsuitesparse-dev
cd ceres-solver mkdir ceres-bin cd ceres-bin cmake .. make -j8 make test # Optionally install Ceres, it can also be exported using CMake which # allows Ceres to be used without requiring installation, see the documentation # for the EXPORT_BUILD_DIR option for more information. sudo make install
附加驱动安装 nvidia 驱动
重启
nvidia-smi 检验
安装 ncnn: https://www.cnblogs.com/odesey/p/18237733
报错:
CMake Error at VINS-Mono-LET-Net/feature_tracker/CMakeLists.txt:20 (find_package):
By not providing "Findncnn.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ncnn", but
CMake did not find one.
Could not find a package configuration file provided by "ncnn" with any of
the following names:
ncnnConfig.cmake ncnn-config.cmake
Add the installation prefix of "ncnn" to CMAKE_PREFIX_PATH or set
"ncnn_DIR" to a directory containing one of the above files. If "ncnn"
provides a separate development package or SDK, be sure it has been
installed.
vim src/VINS-Mono-LET-Net/feature_tracker/CMakeLists.txt
set(ncnn_DIR "/home/xx/programs/ncnn/build/install/lib/cmake/ncnn" CACHE PATH "Directory that contains ncnnConfig.cmake")
export ncnn_DIR=/home/xx/programs/ncnn/build/install/lib/cmake/ncnn
需要安装 opencv3.x
更新 opencv 3.4.20: https://www.cnblogs.com/odesey/p/18237733
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "cv_bridge" with
any of the following names:
cv_bridgeConfig.cmake cv_bridge-config.cmake
https://www.cnblogs.com/odesey/p/18237733
报错:fatal error: ceres/local_parameterization.h: 没有那个文件或目录
4 | #include "ceres/local_parameterization.h"
解决:https://github.com/chichengcn/gici-open/issues/4#issuecomment-1626684365
ceres-solver 2.2 版本不行,降级到1.14.0版本
Ceres卸载
Ceres只有一个库文件在"/usr/local/lib/“中,并且所有的头文件都在”/usr/local/include/ceres/"中,卸载就是很简单的两步:
sudo rm -r /usr/local/lib/cmake/Ceres sudo rm -rf /usr/local/include/ceres /usr/local/lib/libceres.a
git tag git checkout 1.14.0 cd ceres-bin/ cmake .. make -j$(nproc) make test # Optionally install Ceres, it can also be exported using CMake which # allows Ceres to be used without requiring installation, see the documentation # for the EXPORT_BUILD_DIR option for more information. sudo make install
vim package.xml # 可以看到版本
ROS noetic 版本中自带的 OpenCV4 和 VINS-mono 中需要使用的 OpenCV3 冲突 的问题.
安装 ros noetic 后:
pkg-config opencv4 --modversion 4.2.0
我们自己装的:
pkg-config opencv --modversion 3.4.20
这会导致冲突。编译报错。
pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: error: ‘CV_RGB2GRAY’ was not declared in this scope #include <opencv2/imgproc/types_c.h> pose_graph.cpp:312:97: error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope CV_FONT_HERSHEY_SIMPLEX参数改为cv::FONT_HERSHEY_SIMPLEX
IMU 读取
cd lidar_color_map sudo chmod 777 /dev/ttyUSB0 roslaunch livox_ros_driver livox_lidar.launch
因为环境不兼容问题,我的 特征跟踪模块无法启动。该方案已经放弃。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
2023-07-04 ubuntu20.04 + windows10 双系统,ubuntu 的wifi 图标消失