Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Andrew Tridgell dce2d4e7d8 | 6 months ago | |
---|---|---|
dsdl @ 8eb730a593 | 1 year ago | |
libuavcan | 9 months ago | |
libuavcan_drivers/posix | 3 years ago | |
tools | 10 years ago | |
.gitignore | 5 years ago | |
.gitmodules | 2 years ago | |
.travis.yml | 5 years ago | |
CMakeLists.txt | 3 years ago | |
CMakeLists.txt.in | 5 years ago | |
LICENSE | 10 years ago | |
README.md | 6 months ago | |
Vagrantfile | 5 years ago | |
bootstrap.sh | 5 years ago |
NOTE! This libuavcan library is not recommended for new projects. Instead use
the C++ API in the libcanard library, which provides a much lighter
weight and easier to use API.
See https://github.com/dronecan/libcanard/tree/master/canard
See this example for a quick start on using the new libcanard C++ API:
https://github.com/dronecan/libcanard/tree/master/examples/ESCNode_C%2B%2B
Portable reference implementation of the DroneCAN protocol stack in C++ for embedded systems
and Linux.
DroneCAN is a lightweight protocol designed for reliable communication in aerospace and robotic applications via CAN bus.
git clone https://github.com/DroneCAN/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.
Libuavcan can be built as a static library and installed on the system globally as shown below.
mkdir build
cd build
cmake .. # Default build type is RelWithDebInfo, which can be overriden if needed.
make -j8
sudo make install
The following components will be installed:
libuavcan_dsdlc
)libuavcan_dsdl_compiler
)Note that Pyuavcan (an implementation of DroneCAN in Python) will not be installed.
You will need to install it separately if you intend to use the Libuavcan's DSDL compiler in your applications.
It is also possible to use the library as a submodule rather than installing it system-wide.
Please refer to the example applications supplied with the Linux platform driver for more information.
For ARM targets, it is recommended to use GCC ARM Embedded;
however, any other standard-compliant C++ compiler should also work.
Despite the fact that the library itself can be used on virtually any platform that has a standard-compliant
C++11 compiler, the library development process assumes that the host OS is Linux.
Prerequisites:
cppcheck
)Building the debug version and running the unit tests:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j8
make ARGS=-VV test
Test outputs can be found in the build directory under libuavcan
.
Note that unit tests suffixed with "_RealTime" 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.
Vagrant can be used to setup a compatible Ubuntu virtual image. Follow the instructions on Vagrantup to install virtualbox and vagrant then do:
vagrant up
vagrant ssh
mkdir build
cd build
mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCONTINUOUS_INTEGRATION_BUILD=1
Note that -DCONTINUOUS_INTEGRATION_BUILD=1 is required for this build as the realtime unit tests will not work on a virt.
You can build using commands like:
vagrant ssh -c "cd /vagrant/build && make -j4 && make test"
or to run a single test:
vagrant ssh -c "cd /vagrant/build && make libuavcan_test && ./libuavcan/libuavcan_test --gtest_filter=Node.Basic"
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.
No Description
C++ Python Text Shell
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》