Public tutorial for using Klepsydra API. It consists of three chapters:
- Chapter 1 covers the core API of Klepsydra.
- Chapter 2 covers the ROS and DDS connection API.
- Chapter 3 cover the code generator tool. It shows how to create a small application and build up to integrate with middlewares like ROS, ZMQ or DDS.
Each chapter has its corresponding code in the examples folder.
- Ubuntu 14.04 or above
- Google Tests (https://github.com/klepsydra-technologies/googletest)
- ROS Indigo or above (optional)
- DDS (optional)
- Cmake 3.5.1 or above
- gcc for C++11 5.4.0 or above.
Note that Google Tests is pulled in automatically when installing this project and does not need separate installation.
No separate installation is needed for the following dependencies if the Klepsydra installation was done correctly.
- ConcurrentQueue (https://github.com/klepsydra-technologies/concurrentqueue)
- Cereal (https://github.com/klepsydra-technologies/cereal)
- spdlog (https://github.com/klepsydra-technologies/spdlog)
- kpsr-core (installed with yaml support)
- kpsr-build (https://github.com/klepsydra-technologies/kpsr-build)
kpsr-build will be pulled in automatically by the install process of this project.
If you wish to follow the DDS and ROS examples in this
project, then the Klepsydra software must have been installed using the
-DKPSR_WITH_DDS=true
and -DKPSR_WITH_ROS=true
arguments with cmake.
sudo apt install build-essentials
sudo apt install git
sudo apt install cmake
Given $KLEPSYDRA_HOME
, for example $HOME/klepsydra
:
cd $KLEPSYDRA_HOME
git clone https://github.com/klepsydra-technologies/kpsr-tutorial
cd kpsr-tutorial
git submodule update --init
mkdir build
cd build
cmake ..
make
make test
The cmake has the following options:
- -DKPSR_INSTALL_PATH to specify where kpsr-tutorial binaries should be installed (/opt/klepsydra by default)
- -DKPSR_WITH_DDS for building the DDS version of the tutorial.
For compiling ROS examples, we further need to install the kpsr-tutorial module. This can be done by running (after the above build process):
make install
Next, make a symlink in your ROS catkin workspace to point to the ROS subfolder of this project.
cd $CATKIN_WORKSPACE/src
source /opt/ros/melodic/setup.bash (alt: source /opt/ros/kinetic/setup.bash)
ln -s $KLEPSYDRA_HOME/kpsr-tutorial/tests/kpsr_ros_tests
catkin_make
To execute the tests:
catkin_make tests
catkin_make run_tests_kpsr_ros_tutorial
Run the ROS example as you would run any ros node:
source devel/setup.bash
rosrun kpsr_ros_tutorial kpsr_ros_tutorial
© Copyright 2019-2020, Klepsydra Technologies, all rights reserved. Licensed under the terms in LICENSE.md
This software and documentation are Copyright 2019-2020, Klepsydra Technologies Limited and its licensees. All rights reserved. See license file for full copyright notice and license terms.