cmake

一起做RGB-D SLAM (1)

↘锁芯ラ 提交于 2020-04-30 17:15:10
前言 2016.11 更新 增加了对16.04的支持。 整理了过时的代码 。   SLAM,即Simultaneous Localization and Mapping,中文译作同时定位与地图创建,是近几十年里机器人领域有重大发展的研究方向。作为自主机器人的核心技术,SLAM在机器人导航、控制、生产等方面都有着重要的研究意义。尤其在二十一世纪,以视觉传感器为中心的视觉SLAM技术,在理论和方法上都经历了明显的转变与突破,正逐步从实验室研究迈向成熟的市场应用。在国外研究如火如荼之际,它在国内的研究尚处于起步阶段。有关SLAM的中文资料、书籍更是难以一见。然而,随着机器人技术得到国家的重视,越来越多的青年研究者、学生正逐渐跨入这片领域。本文档则试图为这些刚走进SLAM的同事们,提供一些简单而实际的参考。   小萝卜:师兄!你上面写的都是些什么东西啊!   师兄:都是些没什么卵用的废话啊……但是没这些东西文档就不上档次啊。   小萝卜:师兄!你别干这些无聊的事情了!赶紧教我做SLAM啊!   师兄:前言才写了一段,读者会觉得我在敷衍他们的吧。算了,不管了,前两天让你跑的rgbd-slam怎么样了?   小萝卜:跑起来了!然后呢?   师兄:然后你就可以调调参数,改改代码啥的啊。   小萝卜:师兄!我看不懂!   师兄:呃这个……   小萝卜:师兄!你给我写一个SLAM程序吧!   师兄

使用CMake构建OpenCV项目

旧街凉风 提交于 2020-04-30 13:11:47
这篇文章我们来对我们的安装进行测试,并介绍如何用CMake工具快捷地构建OpenCV项目。 为了使整个项目更加条理,我们的文件夹采用如下组织方式: bin build CMakeLists.txt src 其中bin目录用于放编译生成的可执行文件,build目录用于cmake构建项目,src用于放源代码。"CMakeLists.txt"这个名字,一个字都不能错。 编写的OpenCV示例代码: #include < opencv2 / core / core.hpp > #include < opencv2 / highgui / highgui.hpp > #include < opencv2 / imgproc / imgproc.hpp > #include < iostream > using namespace std; using namespace cv; int main( int argc, char * * argv) { if (argc != 2 ) { cout << "Usage: opencv_test <image path>" << endl; return - 1 ; } char * imgName = argv[ 1 ]; Mat image; image = imread(imgName, 1 ); if ( ! image.data) {

Running NuSMV on Mac

六眼飞鱼酱① 提交于 2020-04-30 07:44:57
问题 I downloaded NuSMV source code for mac and started installing using the README. However, there is a step which asks me to build using 'cmake..' when I run that I get the issue The source directory does not appear to contain CMakeLists.txt. Any help please? 回答1: The NuSMV binaries certainly do not need to be compiled, so I conclude that you downloaded the sources package of NuSMV . The file CmakeLists.txt is contained in ..../NuSMV-<version>/NuSMV . Check again that you created the build

How to print a message exactly once per cmake invocation?

别等时光非礼了梦想. 提交于 2020-04-30 07:03:09
问题 Wanting to cause a package foobar to print where it was found, when using find_package(foobar CONFIG) I am using find_package_message(foobar "Found foobar: ${info} (version ${foobar_VERSION})" "[${info}][${foobar_VERSION}]" ) The idea of using find_package_message is to only print this message once. However, I want to print it every time cmake is run from the start. I only want to avoid duplicates during the same run of cmake. find_package_message stores a variable in the cache ( FIND_PACKAGE

How to print a message exactly once per cmake invocation?

故事扮演 提交于 2020-04-30 07:02:21
问题 Wanting to cause a package foobar to print where it was found, when using find_package(foobar CONFIG) I am using find_package_message(foobar "Found foobar: ${info} (version ${foobar_VERSION})" "[${info}][${foobar_VERSION}]" ) The idea of using find_package_message is to only print this message once. However, I want to print it every time cmake is run from the start. I only want to avoid duplicates during the same run of cmake. find_package_message stores a variable in the cache ( FIND_PACKAGE

Compilation fails due to relocation error

假如想象 提交于 2020-04-30 05:10:51
问题 I'm trying to compile ANN. I compiled using the following command, make linux-g ++ Later when I try to use this in another code, the code is not compiling. I'm getting the following error, > relocation R_X86_64_PC32 against symbol `_ZSt4cerr@@GLIBCXX_3.4' can > not be used when making a shared object; recompile with -fPIC > /usr/bin/ld: final link failed: Bad value After going through various questions , I tried adding the following line to CMAKE, set_target_properties(${LIBRARY_NAME}

OpenGL Windows 窗口程序环境搭建

微笑、不失礼 提交于 2020-04-28 22:09:52
OpenGL环境搭建步骤: Downloading OpenGL 根据官网的说法: In all three major desktop platforms (Linux, macOS, and Windows), OpenGL more or less comes with the system. However, you will need to ensure that you have downloaded and installed a recent driver for your graphics hardware. OpenGL 的基础头文件什么的已经随系统提供,然后在安装好显卡驱动就可以下一步了。 Initialization && OpenGL Context Creation 初始化与获取OpenGL Context 方法有两种: 第一种:自己用windows的API写消息循环,获得HWND,然后初始化OpenGL 第二种:使用库,FreeGLUT,自动创建窗口并且获得OpenGL Context 介绍第二种,第一种以后抽时间记录。 首先FreeGLUT自从3.0以后只提供了源码,需要先下载下来然后用Cmake编译成dll。 编译freeglut参照这篇文章: https://blog.csdn.net/yinglang19941010/article

NDK android Error:Expected caller to ensure valid ABI: MIPS

怎甘沉沦 提交于 2020-04-28 19:14:30
android studio 安装NDK之后,报错 Error:Expected caller to ensure valid ABI: MIPS 环境: android studio 2.3 gradle-3.3-all dependencies { classpath 'com.android.tools.build:gradle:2.3.3' } 安装NDK的方式:直接在SDK tools底下安装的(LLDB、CMAKE、NDK) 先出现的问题是:Error:No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android 解决方法是:按照网上的方法,下载NDK r11b的版本,将里面的mips64el文件夹复制到自己的ndk-bundle/toolchains下。具体查阅百度。我上传了这个文件夹,不用去下载整个NDK了,链接如下: 链接:https://pan.baidu.com/s/1yTJw86BtAz24xGCdvCMUvg 提取码:5ebw 但是这种方法好像不太好,因为听说是因为NDK不支持mips64el这玩意了,并不是少了这个文件夹。但是其他方法我都试了,没用,这样能用就行了。。。 解决完这个问题,重新sync,报错: Error

Windows环境下编译Assimp库生成Android可用的.so或.a文件

那年仲夏 提交于 2020-04-28 18:58:04
在做项目过程中需要使用 Assimp 这个3D模型读取库来读取obj格式的模型,因为项目是基于Android平台,采用NDK开发,所以就打算编译Assimp库并生成.so文件。本文使用Assimp-v.5.0.0.rc1( https://github.com/assimp/assimp/releases/tag/v.5.0.0.rc1 ),此版本已经支持在导入FBX的同时导入blendshape。网上的资料大多比较老,针对assimp-3.3的比较多,新版本的编译还是有些不同,特记录下。 首先我们看下Assimp中blenshape导入的代码:以FBX为例 在FBXConverter.cpp中,也就是说blendshape以顶点动画的形式 保存在了aiAnimMesh这个数据结构中,后续对bs的操作只需要操作对应的aiAnimMesh即可。 /** @brief An AnimMesh is an attachment to an #aiMesh stores per-vertex * animations for a particular frame. std::vector<aiAnimMesh*> animMeshes; for (const BlendShape* blendShape : mesh.GetBlendShapes()) { for (const

引擎开发五: Assimp库及使用

我与影子孤独终老i 提交于 2020-04-28 15:24:28
  Assimp :全称为Open Asset Import Library,这是一个模型加载库,可以导入几十种不同格式的模型文件(同样也可以导出部分模型格式)。只要Assimp加载完了模型文件,我们就可以从Assimp上获取所有我们需要的模型数据。Assimp把不同的模型文件都转换为一个统一的数据结构,所有无论我们导入何种格式的模型文件,都可以用同一个方式去访问我们需要的模型数据。 官网地址: https://www.assimp.org 安装及使用 环境:win7 VS2015 1. 下载Assimp: 地址: https://github.com/assimp/assimp 2. 下载安装assimp源码编译需要用到的其他库directx sdk、boost库 a. 安装 DirectX SDK:assimp view依赖directx sdk DirectX下载地址: DirectX官方下载   安装DirectX SDK时,可能遇到一个错误码为s1023的错误,这种情况下,请在安装SDK之前根据这个先卸载C++ Redistributable package(s) 卸载: Visual C++ 2010 Redistributable Package version 10.0.40219 在控制面板里像卸游戏一样卸,注意看清楚一定要把x86和x64两个都卸载了