zoukankan      html  css  js  c++  java
  • ORB-SLAM2(一)----使用Eclipse进行开发

    1.导入项目

    准备工作

    1, first we should make sure the compile with build.sh under ORB_SLAM2-master is OK.

    2, then if we want to build debug version, we need to duplicate the build.sh to build_debug.sh and change the "-DCMAKE-BUILD_TYPE=Release"  to "-DCMAKE-BUILD_TYPE=Debug"

    3, make sure build_debug.sh can also build pass. 

    It's convenient to use Eclipse to manage and build your code, in order to utilize Eclipse, we need to convert the project managed by cmake to project managed by Eclipse, how to do it?  

    步骤1 

    1, at the same level as your ORB slam code, make dir "build_debug".

    for example, your Slam code is at  ~/Downloads/larry/ORB2/ORB_SLAM2-master

    then you need to create a dir : ~/Downloads/larry/ORB2/build_debug

    the reason we don't create build_debug under ORB_SLAM2-master is that Eclipse doesn't support this kind of structure well right now.(不将build_debug目录建在ORB_SLAM2-master下,是因为当前eclipse还不支持这样的目录结构,因此需要将编译的目录放在外面,这一点在其他的CMake项目也是一样有效 

    步骤2

    到工作空间ORB2下进行编译,在终端执行一下指令:

    cd ORB2
    cd build_debug
    cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../ORB_SLAM2-master

     you will find the ".cproject" and ".project", which are the project files generated for Eclipse and can be used for later import from Eclipse.  

    步骤3

    Eclipse import the project generated from cmake:

    In Eclipse: File -> Import -> General -> Existing Projects into Workspace -> Next

    In "Import Projects" Dialogue, select "Select root directory" and import the generated eclipse project from "~/Downloads/larry/ORB2/build_debug"  

    步骤4

    Then we can build from Eclipse:  

    Click the button "Build Default" in Eclipse to build the whole project, pay attention to the Console output. 

    导进来的项目结构如下图所示:

    参考资料:ORBSLAM code, use Eclipse to import project from cmake

  • 相关阅读:
    Timestamp (rowversion) Data Type
    replace(/\s/g,"")中的/g是什么意思? 及replace函数的用法
    取消ie6自动打开excel
    C#日期函数使用大全
    Photoshop制作Favicon.ico图标(转载)
    为什么就没有中文版 数据库设计和优化 的书呢
    C#操作Access的一些小结
    asp.net 下发布水晶报表调试经验
    ASREP Roasting & Kerberoast
    重新点亮linux 基本软件————防火墙[一]
  • 原文地址:https://www.cnblogs.com/cv-pr/p/7838939.html
Copyright © 2011-2022 走看看