Files
Failed to load latest commit information.
rtt-exercises
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
OROCOS RTT >= 2.4 Tutorial This directory contains exercises for exploring the Orocos Real-Time Toolkit in order to learn how to create Orocos components. Each exercise compiles out of the box. It is your task to extend it such that it becomes more functional. Start with the hello-1-task-execution directory and work your way down until you have done all hello-* examples. The assignment can be found at the top of each HelloWorld.cpp file. When you're done with the hello-* examples, proceed with the controller-1 example, which has instructions in its Exercise.txt file. Requirements ------------ Orocos Toolchain 2.4 or later is installed. Setup & Compile --------------- 'source' the Orocos Toolchain env.sh script: $ source /path/to/orocos-toolchain/env.sh Build the component using cmake: $ cd hello-1-task-execution $ mkdir build ; cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/../../install $ make install $ cd .. Running ------- If from the exercise directory, set (once) the component path to the lib/orocos directory of your install path: $ export RTT_COMPONENT_PATH=$(pwd)/../install/lib/orocos:$RTT_COMPONENT_PATH Now run the deployer: $ deployer-gnulinux -s start.ops And checkout the .cpp files for instructions. Eclipse Users ------------- IMPORTANT: see http://www.orocos.org/wiki/rtt/eclipse for correctly setting up Eclipse. You need Eclipse Ganymede (3.4) or better with the C/C++ toolkit support. For each project, you must generate the Eclipse C++ project from the console. For example: $ cd hello-1-task-execution $ mkdir build ; cd build $ cmake .. -DCMAKE_GENERATOR="Eclipse CDT4 - Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$(pwd)/../../install Now import this project in Eclipse using 'File' -> 'Import...' -> 'Existing projects into workspace'. You'll also need to add the 'automatically discovered' compiler paths in order to get the Eclipse Indexer (syntax highlighting) working. Use: Kepler: Go to project properties, find 'Preprocessor Include Paths', then under the tab 'Providers' you will find 'CDT_GCC Built-in Compiler Settings'. Check it and that's it. Then build in Eclipose and run as shown above using the RTT_COMPONENT_PATH. Feel free to contribute other examples on Orocos.org. Have fun!