Giter Site home page Giter Site logo

apr-project's Introduction

Advanced Programming for Robotics - Project Page

Project Structure

Project Structure Flowchart

Setup and Quick Start

If possible, please use the docker container. Install and setup from there on.

Building and Running the Docker Container

The bash scripts contained in the root directory can be used to build, start and setup the docker container. Building and instantiation are done locally. The install_image.sh script is run automatically from inside the container during the build process.

A vim configuration will be copied onto the container and it will come preinstalled with Neovim (the better Vim fork!), which can be run using nvim.

Linux

Run build_image.sh. This will load all the required docker images and install the system dependencies, e.g. ROS Noetic and some useful packages (since it contains Eigen3 and GTest).

Once the build is complete, create a persistent container from the image using run_image.sh. This will mount the catkin_ws and packages directories shared volumes.

NOTE that the container is privileged and gets access to the host network as well as read-only access to your ~\\.ssh directory!

Windows

Please just use WSL instead.

Assuming you have Docker for Windows installed, open a PowerShell terminal and run

docker build -t apr:latest .

inside this directory.

When the build is finished, run the container using

docker run `
--name apr `
-it `
--privileged `
--network host `
-v $(Get-Location)\\catkin_ws\\src:\\catkin_ws\\src `
-v $(Get-Location)\\packages:\\packages `
apr:latest `
bash

I did not test this command but it might work. It is however missing the following things:

  • ssh access
  • X11 support (that is, no GUI here)

The container will then be listed in the docker gui and it can be started from there.

Developer Notes

Please use your own branch, do not singlehandedly merge onto the main branch.

git branch <your name>
git checkout <your name>

Setup your own project inside the packages folder, develop and test it from there if possible. We will have a look at how to best combine them when time is ready.

Compiler Settings

  • --std=c++17 or higher
  • -Wall -Wextra -pedantic if possible

CMake Template

Setup your project with the following basics.

cmake_minimum_required(VERSION 3.16)
# define the project name
set(PROJECT_NAME <YOUR_PROJECT_NAME>)
project(${PROJECT_NAME})
# the program REQUIRES features that are only available from C++17 and onward
set(CMAKE_CXX_STANDARD 17)
# load dependencies and include locations for all projects
find_package (Eigen3 3.3 REQUIRED NO_MODULE)

If you intend on writing tests, add this directly below.

# fech the latest Google Test Library release
# from: https://google.github.io/googletest/quickstart-cmake.html
include(FetchContent)
FetchContent_Declare(
  googletest
  URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
FetchContent_MakeAvailable(googletest)

If you are writing utilities that will be used by others as libraries, add this

# ------------- LIBRARIES AND PROGRAMS ----------------
include_directories(include)
# the library that enables to detect the position of a circle from lidar data
add_library(${PROJECT_NAME}_your_library
    src/CircleDetection.cpp
)
target_link_libraries(${PROJECT_NAME}_your_library
    Eigen3::Eigen # in case you use Eigen
    # others go here as well
)

Again - if you intend on writing tests, add this directly below.

# -------------------- TESTS --------------------------
enable_testing()
add_executable(${PROJECT_NAME}_circledetection_lib_test
    src/tests/circle_detection.cpp
)
target_link_libraries(${PROJECT_NAME}_circledetection_lib_test
    GTest::gtest_main
    ${PROJECT_NAME}_circledetection_lib
)
include(GoogleTest)
gtest_discover_tests(${PROJECT_NAME}_circledetection_lib_test)

apr-project's People

Contributors

jodokf avatar machistef avatar grilli-t avatar

Watchers

 avatar

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.