getting_started:tutorials:firstproject
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
getting_started:tutorials:firstproject [2015/08/10 11:08] – visentin | getting_started:tutorials:firstproject [2016/10/07 14:02] – gehrig | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Your First EEROS Project ====== | ====== Your First EEROS Project ====== | ||
- | - First of all, make sure that you have set up your environment as described in [[..: | ||
- | - Then create a new project following the steps under " | ||
+ | - First of all, make sure that you have set up your environment as described in [[..: | ||
+ | - Then create a new project following the steps under " | ||
+ | - The following example shows a typical EEROS application. | ||
+ | - After creating all those files, modify the CMakeLists.txt and CMAkeCache.txt files accoring to [[getting_started: | ||
- | http://wiki.eeros.org/ | + | <code c> |
+ | #include < | ||
+ | #include <unistd.h> | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | #include " | ||
+ | #include " | ||
+ | #include " | ||
+ | |||
+ | |||
+ | using namespace eeros; | ||
+ | using namespace eeros::hal; | ||
+ | using namespace eeros:: | ||
+ | using namespace eeros:: | ||
+ | using namespace eeros:: | ||
+ | using namespace eeros:: | ||
+ | using namespace testproject; | ||
- | The following example shows a typical EEROS application. | ||
- | <code c> | ||
int main() { | int main() { | ||
std::cout << "SCARA Robot Control started" | std::cout << "SCARA Robot Control started" | ||
Line 34: | Line 51: | ||
sequencer.start(& | sequencer.start(& | ||
| | ||
- | | + | // |
- | usleep(10000); | + | // |
- | } | + | // } |
| | ||
- | controlSystem.stop(); | + | |
- | safetySystem.shutdown(); | + | |
- | sequencer.shutdown(); | + | // |
+ | // | ||
+ | // | ||
| | ||
std::cout << "SCARA Robot Control stopped" | std::cout << "SCARA Robot Control stopped" | ||
Line 107: | Line 126: | ||
// Run Blocks | // Run Blocks | ||
// e.g. timedomain.addBlock(& | // e.g. timedomain.addBlock(& | ||
- | } | ||
- | |||
- | void MyControlSystem:: | ||
- | timedomain.start(); | ||
- | } | ||
- | |||
- | void MyControlSystem:: | ||
- | timedomain.stop(); | ||
- | timedomain.join(); | ||
} | } | ||
</ | </ |