Coder Social home page Coder Social logo

naksh-io / robotfarm Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 3.0 135 KB

A convenience project to build and install certain open source libraries(and listed dependencies) using cmake external projects. See files under the cmake directory to learn about available options.

License: MIT License

CMake 86.63% Dockerfile 9.25% Shell 4.12%
cmake opencv vtk boost ogre3d spdlog glog gtest gflags capnproto

robotfarm's Introduction

robotFarm

A convenience project to build and install certain open source libraries(and listed dependencies) using cmake external projects. See files under the cmake directory to learn about available options.

Usage

Before getting started, come up with paths as listed below. You must have read and write permission to each directory you come up with here. Each path here will be denoted using the following tags throughout the rest of this document. Make replacements in commands appropriately.

<SOURCE_TREE>

Path where you'd like clone the robotFarm project. This can be a temporary directory if you don't plan on iterating on the builds and would like to simply build the libraries once and get on with life. Eg: ${HOME}/sandbox/robotFarm or /tmp/robotFarm

<BUILD_TREE>

Path where you'd like to place the build tree. This too can be a temporary directory if you don't plan on iterating on the builds and would like to simply build the libraries once and get on with life. Eg: <SOURCE_TREE>/build or /tmp/robotFarm-build or ${HOME}/sandbox/robotFarm-build

<INSTALL_TREE>

Path where you'd like to place all the installation artifact. This will be the location were all the executables, libraries, and other supporting files will be installed at. You will want to keep this directory around for the long-term. Eg: ${HOME}/usr or /opt/robotFarm or /usr(requires sudo)

Now we are all set to get started.

1. Download Step

Clone the robotFarm project using the following:

git clone [email protected]:ajakhotia/robotFarm.git <SOURCE_TREE>

2. Configure Step

Use the command below to configure the build with the default generator for the system:

cmake \
    -S <SOURCE_TREE> \ 
    -B <BUILD_TREE> \ 
    -DCMAKE_BUILD_TYPE:STRING="Release" \
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_TREE>
  • Alternatively, it's recommended to use Ninja as the generator instead of the default for faster builds.
    cmake \
        -G Ninja \
        -S <SOURCE_TREE> \ 
        -B <BUILD_TREE> \ 
        -DCMAKE_BUILD_TYPE:STRING="Release" \
        -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_TREE>

3. Build Step

You can build a specific subset of libraries available via robotFarm using:

cmake \
    --build <BUILD_TREE> \
    --target <target-name-1> <target-name-2> ... \
    --parallel <num-jobs>
  • The valid values that can be used for <target-name-*> tokens in the above command are the names of the external project targets defined in the files under cmake directory. Below is a consolidated list of the same names:
    • BoostExternalProject
    • CapnprotoExternalProject
    • CerealExternalProject
    • CeresSolverExternalProject
    • Eigen3ExternalProject
    • FlatBuffersExternalProject
    • GFlagsExternalProject
    • GlogExternalProject
    • GoogleTestExternalProject
    • NlohmannJsonExternalProject
    • OatppExternalProject
    • OatppWebsocketExternalProject
    • OgreExternalProject
    • OpenCVExternalProject
    • ProtobufExternalProject
    • Python3ExternalProject
    • SpdLogExternalProject
    • VTKExternalProject
  • Replace <num-jobs> with the number of virtual cpu cores you'd like to spare for the build. Using all cores available on your machine is the fastest way to build but, it may prevent you from performing other tasks during the duration of the build. Plan accordingly.
  • Alternatively, you may build all libraries available via robotFarm by simply omitting the --target argument to the build command. CMake assumes to build all targets by default if none are provided.
    cmake --build <BUILD_TREE> --parallel <num-jobs>

4. Make Money

Yup!! make money.

Notes:

Python3

This project can build python3 from source if needed. However, more often that not, its more convenient to use the system's version of python3 so the build skips it by default.

  • If you'd like to build python3 from source anyway, provide -DROBOT_FARM_SKIP_PYTHON3:BOOL=OFF as cache argument to cmake at the configure step.
  • If you are relying on system's python3 installation, remember to install the following packages:
    • python-dev
    • python3-dev

Issues:

Python3

The configure command for python3 has issues with the following flags:

  • --with-address-sanitizer
  • --with-libs="-lbz2 -lreadline -lncurses -lhistory -lsqlite3 -lssl"

OpenCV

  • Building OpenCV with CUDA requires building with OpenCV-contrib.

    • This is due to a dependency of CUDA based features on cudev.
  • Cuda codec are no longer a part of cuda >= 10.0

    • OpenCV build here is forced to use -DBUILD_opencv_cudacodec:BOOL=OFF
  • The support for following feature is off due to lack of information on the required system packages:

    • OpenGL support
    • GtkGlExt
    • Installing libgtkglext1 and libgtkglext1-dev did not help.

robotfarm's People

Contributors

ajakhotia avatar darren-harton avatar github-admin-nakshio avatar pratool avatar

Stargazers

 avatar  avatar

Watchers

 avatar

robotfarm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.