KaCanOpen
|
![Licence](https://img.shields.io/badge/licence-BSD%203--Clause-blue.svg) ![drivers_lgpl Licence](https://img.shields.io/badge/drivers__lgpl%20licence-LGPL%202.1%2B-blue.svg) ![Build Status](https://api.travis-ci.org/KITmedical/kacanopen.svg?branch=master)
KaCanOpen is an easy-to-use CANopen stack, which consists of four parts:
core.sdo.upload(node_id, index, subindex)
. It furthermore allows you to register callbacks on certain events or any incoming messages, so one can build arbitrary CANopen nodes (master or slave) using this library.mymotor.set_entry("Target velocity", 500)
. A main feature of this library is transparent SDO/PDO access to dictionary entries: By default a value is fetched and set via SDO, but you can configure PDO mappings to instead keep the value up-to-date in background via (more lightweight) PDO messages. The call itself (mymotor.set_entry("Target velocity", 500)
) keeps unchanged. The dictionary structure of a device can be loaded automatically from a set of generic, CiA® profile-specific, or device-specific EDS files which is distributed along with KaCanOpen. This allows you to write a meaningful Plug and Play master node with only a few lines of code.KaCanOpen is designed to make use of modern C++11/14 features and to avoid redundant code on the user side wherever possible. This makes the interface neater than it is in other products on the market.
First make sure you've got a recent C++ compiler with C++14 support (GCC >= 4.9, Clang >= 3.6), as well as CMake >= 3.2 and Boost >= 1.46.1.
KaCanOpen without the ROS part can be built easily using CMake:
<driver>
can be one of the following: serial, socket, virtual, lincan, peak_linux.
The examples
directory lists some examples on how to use KaCanOpen libraries. You can run them from the build/examples
directory.
KaCanOpen including the ROS part must be built using Catkin. Make sure you have ROS Jade installed. Go to your workspace and clone the repository into src
:
When building with Catkin, you can excute example programs like that:
Complete build instructions can be found here.
Full documentation can be found at https://kitmedical.github.io/kacanopen/.
Core, Master and ROS Bridge are licensed under the BSD-3-Clause license. Drivers from CanFestival are licensed under the LGPLv2.1+ license.