首页 > 其他分享 >相机+IMU+雷达环境搭建

相机+IMU+雷达环境搭建

时间:2024-07-04 10:08:42浏览次数:18  
标签:ceres cmake package 相机 Ceres IMU ncnn install 搭建

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

因为环境不兼容问题,我的 特征跟踪模块无法启动。该方案已经放弃。

标签:ceres,cmake,package,相机,Ceres,IMU,ncnn,install,搭建
From: https://www.cnblogs.com/odesey/p/18281252

相关文章

  • JAVA开发环境的搭建(JDK下载与安装)
    一、什么是JDK、JREJDK(JavaDevelopmentKit):是Java程序开发工具包,包含JRE和开发人员使用的工具。JRE(JavaRuntimeEnvironment):是Java程序的运行时环境,包含JVM和运行时所需要的核心类库。小结:        JDK=JRE+开发工具集(例如Javac编译工具等)        ......
  • unity canvas显示相机照射画面的方法
    1. 使用 Image 组件显示处理后的图像如果你的图像数据已经是一个 Texture2D 或 Sprite,你可以将它直接显示在Canvas上的 Image 组件中:创建 Sprite:将你的 Texture2D 数据转换为 Sprite,以便可以在 Image 组件中使用。publicSpriteCreateSpriteFromTexture(......
  • springboot+vue前后端分离项目-项目搭建7-菜单显示权限控制
    1.user表增加role,entity同步增加  2.controller增加通过id获取user信息并返回的方法 3.增加如下从session获取user的id,并重新从后台再获取一遍确保正确 控制菜单,系统管理只有管理员(role=1)时才能看到 效果:  ......
  • 搭建论坛和mysql数据库安装和php安装
    目录概念步骤安装mysql8.0.30安装php安装Discuz概念搭建论坛的架构:lnmp+DISCUZ l表示linux操作系统n表示nginx前端页面的web服务m表示mysql数据库用来保存用户和密码以及论坛的相关内容p表示php动态请求转发的中间件步骤(已经提前安装了nginx)1.关闭......
  • 如何从零搭建10万级 QPS 大流量、高并发优惠券系统
    需求背景春节活动中,多个业务方都有发放优惠券的需求,且对发券的QPS量级有明确的需求。所有的优惠券发放、核销、查询都需要一个新系统来承载。因此,我们需要设计、开发一个能够支持十万级QPS的券系统,并且对优惠券完整的生命周期进行维护。需求拆解及技术选型需求拆解要配置......
  • 【鸿蒙性能优化】基于Camera Kit,获取相机流数据传递给native,进行压缩编码
    示例场景:ATS侧启动相机,使用摄像头采集视频流数据,获取相机视频流数据传递到native侧,通过buffer模式将视频编码成MP4文件保存到沙箱路径。方案描述:具体实现步骤可分为:Step1:申请权限,启动相机。Step2:启动录制,获取视频流数据,获取一帧图像转成JPG格式保存到沙箱路径。Step3:......
  • Minecraft Java 1.20.1 forge服务器搭建
    ☁️MinecraftJava1.20.1forge服务器搭建......
  • 搭建redis cluster集群
    环境:RedhatLinux7.x系统主机:192.168.1.1-192.168.1.6Redis版本5.0.3版本说明:一般情况下,redis使用虚拟机部署即可1.安装redis将redis-5.0.3.tar.gz安装包上传至/app目录下解压软件包tar-zxvfredis-5.0.3.tar.gz-C/app编译rediscd/app/redis-5.0.3&&makeMALL......
  • matlab相机内参标定
      1视频抽帧1是否要缩放2保存的文件夹名字不许有中文,自动创建文件夹3间隔帧数 #-*-coding:utf8-*-importcv2importosimportshutildefget_frame_from_video(video_name,save_path,interval,resize):cv2.namedWindow('Read_Image',cv2.WINDOW......
  • 最新AI大模型系统源码,ChatGPT商业运营版系统源(详细图文搭建部署教程)+AI绘画系统,DALL-E
    一、前言人工智能语言模型和AI绘画在多个领域都有广泛的应用.....SparkAi创作系统是一款基于ChatGPT和Midjourney开发的智能问答和绘画系统,提供一站式AIB/C端解决方案,涵盖AI大模型提问、AI绘画、文档分析、图像识别和理解、TTS&语音识别、AI换脸等多项功能。支持GPTs应......