getting_started:tutorials:firstproject
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| getting_started:tutorials:firstproject [2015/08/06 12:57] – visentin | getting_started:tutorials:firstproject [2016/11/29 15:36] (current) – removed graf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Your First EEROS Project ====== | ||
| - | First of all, make sure that you have set up your environment as described in [[..: | ||
| - | <code c> | ||
| - | int main() { | ||
| - | std::cout << "SCARA Robot Control started" | ||
| - | | ||
| - | // Define logger | ||
| - | StreamLogWriter w(std:: | ||
| - | w.show(); | ||
| - | Logger< | ||
| - | | ||
| - | // Get HAL istance | ||
| - | HAL& hal = HAL:: | ||
| - | | ||
| - | // Get Control System instance | ||
| - | MyControlSystem controlSystem; | ||
| - | | ||
| - | // Get Safety System instance | ||
| - | double dt = 0.001; | ||
| - | | ||
| - | MySafetyProperties safetyProperties(& | ||
| - | SafetySystem safetySystem (safetyProperties, | ||
| - | |||
| - | Sequencer sequencer; | ||
| - | MySequencer | ||
| - | sequencer.start(& | ||
| - | | ||
| - | while(sequencer.getState() != state:: | ||
| - | usleep(10000); | ||
| - | } | ||
| - | | ||
| - | controlSystem.stop(); | ||
| - | safetySystem.shutdown(); | ||
| - | sequencer.shutdown(); | ||
| - | | ||
| - | std::cout << "SCARA Robot Control stopped" | ||
| - | return 0; | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | To start, create an instance of the [[eeros_architecture: | ||
| - | |||
| - | Then you have to define the [[eeros_architecture: | ||
| - | |||
| - | Finally, a sequence has to be defined and assigned to a [[eeros_architecture: | ||
| - | |||
| - | Here follows the basic implementation of the three subsystems of a simple EEROS application: | ||
| - | |||
| - | Control System: | ||
| - | |||
| - | .hpp: | ||
| - | |||
| - | <code c> | ||
| - | </ | ||
| - | |||
| - | .cpp: | ||
| - | |||
| - | <code c> | ||
| - | </ | ||
| - | |||
| - | Safety System: | ||
| - | |||
| - | .hpp: | ||
| - | |||
| - | <code c> | ||
| - | </ | ||
| - | |||
| - | .cpp: | ||
| - | |||
| - | <code c> | ||
| - | </ | ||
| - | |||
| - | Main Sequencer: | ||
| - | |||
| - | .hpp: | ||
| - | |||
| - | <code c> | ||
| - | </ | ||
| - | |||
| - | .cpp: | ||
| - | |||
| - | <code c> | ||
| - | </ | ||
getting_started/tutorials/firstproject.1438858640.txt.gz · Last modified: 2015/08/06 12:57 by visentin