Skip to main content

Posts

Showing posts from November, 2017

boost 文件操作

使用boost来访问文件夹中的每一个文件, 通过迭代器进行迭代时,每次都是随机的,不按顺序(当需要按顺序读取图片时,就会有问题) 因此需要先对文件进行排序:     namespace bf = boost::filesystem;     bf::path path_l("/home/wk/DataSet/GRC/route01/seq01/image_0");   //default seq04     bf::directory_iterator dir_begin_l(path_l);  //-- boost的迭代起每次是随机访问下一个,不是按顺序的     bf::directory_iterator dir_end_l;     std::vector<long> files_l;     char name_str_l[50];     for (; dir_begin_l != dir_end_l; ++dir_begin_l) {         sscanf(dir_begin_l->path().filename().c_str(), "%*4s%[^.]", name_str_l);         files_l.push_back(atol(name_str_l));         //std::cout << "left:" << *dir_begin_l <<std::endl;     }     sort(files_l.begin(), files_l.end(), less<long>());

ros下camera的使用

使用stereo_image_proc校正双目时,rosbag中一定要包含camera_info信息 http://wiki.ros.org/stereo_image_proc/Tutorials/ChoosingGoodStereoParameters 在录rosbag时最好一起录下来。 使用IDS的驱动ueye_cam时,会在/.ros/camera_info/路径下读取left.yaml和right.yaml的标定文件,并写成/camera/left/camera_info、/camera/right/camera_info话题。如果未事先标定,这两个topic就为空。 事后需要时,可以在将camera_info写进去,参照: https://answers.ros.org/question/12687/replacing-camera_info-messages/ 读取标定文件参照: https://answers.ros.org/question/33929/camera-calibration-parser-in-python/ 这个博客中的代码,需要修改: camera_calibration_parsers_python 改为 camera_calibration_parsers 在ros源码中,相关信息在image_common 和 image_pipeline包中

开源VIO运行记录

 VINS-Mono 运行VINS-Mono项目出现一些问题,记录如下: 启动launch文件时,vins_estimator模块莫名奇妙的挂掉 检查发现,ceres中要求的Eigen的版本与实际安装的版本不一致, 第一步:根据Ceres中要求的版本,安装相应的Eigen版本 但是在终端中编译时还是会有报错,再Clion中不会报错,编译后的结果运行也正常。 第二步:  打开/usr/local/lib/cmake/Ceres/CeresConfig.cmake  在设置Eigen版本及检查版本的地方,去掉相关的版本限制 备注:CLion中使用的cmake可能和终端中使用的cmake不是一个,取决于clion中的设置。因此运行的结果不完全一致 编译新的版本,只需要在vins_estimater中指定ceres的1.13的版本就直接能编译过去。 很多问题都是eigen和ceres的版本问题 okvis-ros 是okvis的ros版本 编译时再会自动下载借个库,但是在下载Opengv时会出问题, 修改如下: 先离线下载,然后将Cmakelist中的在线下载关闭掉,将Opengv部分的SOURCE_DIR指向离线包,  ExternalProject_Add(opengv_external     #GIT_REPOSITORY https://github.com/laurentkneip/opengv     UPDATE_COMMAND ""     PATCH_COMMAND # forcing static libs         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/cmake/opengv/CMakeLists.txt ${CMAKE_CURRENT_BINARY_DIR}/opengv/src/opengv/CMakeLists.txt         COMMA...

C++ 轻量级第三方库

有时候只是为了为了一个简单的功能,就得引入boost这种重量型的库,还有eigen、gflags、glogs这种不算重量也不轻的库,还是使用一些特定功能的轻量库比较好,自己也更好定制修改,然后自己再完善,也锻炼自己的能力 记录一些轻量级的第三方库 C++操作目录文件: https://github.com/cxong/tinydir https://github.com/tronkko/dirent C++日志库: https://github.com/gabime/spdlog  C++命令行参数: github 上比较多

Python使用记录

在PyCharm中编写python代码时,不支持中文注释,会报错: SyntaxError: Non-ASCII character '\xe6' in file /home/wk/DataSet/GRC/calib_kilibr/kalibr_bagcreater on line 21, but no encoding declared; 因此,在Python文件开始处添加: #!/usr/bin/python   # -*- coding: utf-8 -*-     就可以支持中文了。

SSE指令了解

DSO代码中核心的计算部分用了SSE进行优化,因此需要了解一些SSE的相关知识。 基础使用参考: SSE指令的使用学习 在C/C++代码中使用SSE等指令集的指令(1)介绍 相关函数说明参考: c/c++ 代码中使用sse指令集加速    以上博客中对基础的介绍已经非常完美了。  

Ubuntu 环境配置、工具使用

word、ppt使用 使用wps作为文档编辑工具。但是不能画图和编辑公式。 画流程图: LibreOffice Draw,bantu已自带 公式编辑:KLatexFormula,ubuntu自带的LibreOffice math还没搞明白如何与wps配合使用 latex安装: sudo apt-get install texlive-full latex-beamer sudo apt-get install latex-cjk-all 参考: Linux之latex的初学教程 编辑器采用KLatexFormula,安装见官网, 使用时提示ghostscropt版本要大于9.15。重新安装以下,下载源码,然后 ./configure --prefix=/usr/ make sudo make install 这种安装方式使用有问题,不能生成svg,直接下载可执行程序,然后在klatexFormula中设置gs的路径即可 生成C++类关系图 使用Doxygen、Graphviz, 安装: sudo apt-get install doxygen sudo apt-get install doxygen-gui sudo apt-get install graphviz 使用方法参见: http://blog.csdn.net/u010740725/article/details/51387810 该文章虽然讲的是windows,但是在ubuntu上使用一样

一、VO篇(monocular、stereo)

单目相关的一些资源 1、该作者实现了最简单的单目、Stereo VO,都是基于点特征的 Monocular Visual Odometry using OpenCV Visual Odmetry from scratch - A tutorial for beginners     2、Matlab官方文档中的例子: Monocular Visual Odometry 3、基于RANSC野点剔除: https://github.com/sunzuolei/mvo_ransac/tree/master/mvo_ransac   在Android平台的实现: https://github.com/sunzuolei/mvo_android  https://github.com/sunzuolei/vo_basis 这里还向相关的视频  4、论文+代码   http://www.cs.cmu.edu/~rahuls/pub/icra2005-rahuls.pdf http://www.cs.cmu.edu/~vo/vo-0-2.tgz  5、libviso2  单双目   基于点和线的VO:包括双目、单目(svo) http://mapir.uma.es/mapirwebsite/index.php/people/115-people/164-ruben-gomez.html   6、fovis 7、bpvo https://github.com/halismai/bpvo  该套算法来自CMU,以及作者的另一套开源算法photobundle,有作者的博士论文链接,拜读。       双目vo:  https://github.com/ucsdxiaoyuzhou/CSE252C_visual_odometry https://github.com/fovis/fovis 深度相机或者stereo https://github.com/jaiprakashgogi/visualodometry 带有简...