GithubHelp home page GithubHelp logo

isabella232 / uavcan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ardupilot/archived-uavcan

0.0 0.0 0.0 2.82 MB

UAVCAN is a lightweight protocol designed for reliable communication in aerospace and robotic applications via CAN bus.

Home Page: http://uavcan.org

License: MIT License

Shell 0.41% Python 3.19% C++ 77.26% C 18.12% Objective-C 0.05% Makefile 0.27% CMake 0.69% GDB 0.02%

uavcan's Introduction

UAVCAN stack in C++

Coverity Scan Travis CI Gitter

Portable reference implementation of the UAVCAN protocol stack in C++ for embedded systems and Linux.

UAVCAN is a lightweight protocol designed for reliable communication in aerospace and robotic applications via CAN bus.

Documentation

Library usage

Dependencies

  • Python 2.7 or 3.3 or newer

Note that this reporitory includes Pyuavcan as a submodule. Such inclusion enables the library to be built even if pyuavcan is not installed in the system.

Cloning the repository

git clone https://github.com/UAVCAN/libuavcan
cd libuavcan
git submodule update --init

If this repository is used as a git submodule in your project, make sure to use --recursive when updating it.

Building and installing

This is only needed if the library is used in a Linux application.

mkdir build
cd build
cmake .. # Default build type is RelWithDebInfo, which can be overriden if needed.
make -j8
sudo make install

For cross-compiling with CMake the procedure is similar (assuming that you have the toolchain file, Toolchain-stm32-cortex-m4.cmake in this example). If you're using Make, please refer to the documentation. For embedded ARM targets, it is recommended to use GCC ARM Embedded; however, any other standard-compliant C++ compiler should also work.

mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-stm32-cortex-m4.cmake
make -j8

The following components will be installed into the system:

  • Libuavcan headers and the static library
  • Generated DSDL headers
  • Libuavcan DSDL compiler (Python script libuavcan_dsdlc)
  • Libuavcan DSDL compiler's support library (Python package libuavcan_dsdl_compiler)

Pyuavcan will not be installed into the system together with the library; you'll need to install it separately. The installed DSDL compiler will not function unless pyuavcan is installed.

Library development

Despite the fact that the library itself can be used on virtually any platform that has a standard-compliant C++03 or C++11 compiler, the library development process assumes that the host OS is Linux.

Prerequisites:

  • Google test library for C++ - gtest (see how to install on Debian/Ubuntu)
  • C++03 and C++11 capable compiler with GCC-like interface (e.g. GCC, Clang)
  • CMake 2.8+
  • Optional: static analysis tool for C++ - cppcheck (on Debian/Ubuntu use package cppcheck)

Building the debug version and running the unit tests:

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make

Test outputs can be found in the build directory under libuavcan. Note that unit tests must be executed in real time, otherwise they may produce false warnings; this implies that they will likely fail if ran on a virtual machine or on a highly loaded system.

Contributors, please follow the Zubax Style Guide.

Developing with Eclipse

An Eclipse project can be generated like that:

cmake ../../libuavcan -G"Eclipse CDT4 - Unix Makefiles" \
                      -DCMAKE_ECLIPSE_VERSION=4.3 \
                      -DCMAKE_BUILD_TYPE=Debug \
                      -DCMAKE_CXX_COMPILER_ARG1=-std=c++11

Path ../../libuavcan in the command above points at the directory where the top-level CMakeLists.txt is located; you may need to adjust this per your environment. Note that the directory where Eclipse project is generated must not be a descendant of the source directory.

Submitting a Coverity Scan build

First, get the Coverity build tool. Then build the library with it:

export PATH=$PATH:<coverity-build-tool-directory>/bin/
mkdir build && cd build
cmake <uavcan-source-directory> -DCMAKE_BUILD_TYPE=Debug
cov-build --dir cov-int make -j8
tar czvf uavcan.tgz cov-int

Then upload the resulting archive to Coverity.

Automatic check can be triggered by pushing to the branch coverity_scan.

uavcan's People

Contributors

pavel-kirienko avatar i-sheremet avatar bendyer avatar suiauthon avatar tridge avatar antoinealb avatar miccio-dk avatar jgoppert avatar julianoes avatar bugobliterator avatar lorenzmeier avatar magicrub avatar papatience avatar kylemanna avatar jamesstewy avatar oxinarf avatar dagar avatar andreasantener avatar eshamaev avatar guludo avatar peterbarker avatar frizensami 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.