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:13] – visentin | getting_started:tutorials:firstproject [2016/10/07 14:02] – gehrig | ||
---|---|---|---|
Line 4: | Line 4: | ||
- Then create a new project following the steps under " | - Then create a new project following the steps under " | ||
- The following example shows a typical EEROS application. | - 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: | ||
+ | |||
<code c> | <code c> | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | #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; | ||
+ | |||
+ | |||
int main() { | int main() { | ||
std::cout << "SCARA Robot Control started" | std::cout << "SCARA Robot Control started" | ||
Line 29: | Line 51: | ||
sequencer.start(& | sequencer.start(& | ||
| | ||
- | | + | // |
- | usleep(10000); | + | // |
- | } | + | // } |
+ | |||
+ | sequencer.join(); | ||
| | ||
- | | + | // |
- | safetySystem.shutdown(); | + | // |
- | sequencer.shutdown(); | + | // |
| | ||
std::cout << "SCARA Robot Control stopped" | std::cout << "SCARA Robot Control stopped" | ||
Line 102: | Line 126: | ||
// Run Blocks | // Run Blocks | ||
// e.g. timedomain.addBlock(& | // e.g. timedomain.addBlock(& | ||
- | } | ||
- | |||
- | void MyControlSystem:: | ||
- | timedomain.start(); | ||
- | } | ||
- | |||
- | void MyControlSystem:: | ||
- | timedomain.stop(); | ||
- | timedomain.join(); | ||
} | } | ||
</ | </ | ||
Line 316: | Line 331: | ||
target_link_libraries(test-project eeros) | target_link_libraries(test-project eeros) | ||
</ | </ | ||
- | |||
- | - After creating all those files, modify the CMakeLists.txt and CMAkeCache.txt files accoring to [[getting_started: |