forked from ioflo/ioflo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
204 lines (156 loc) · 5.61 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
![Logo](docs/images/ioflo_logo.png?raw=true)
#Ioflo
##Enabling The Programmable World
http://ioflo.com
## Getting Started
### Installation
``` bash
$ pip install ioflo
```
on OS X
``` bash
$ sudo pip install ioflo
```
### Command Line
``` bash
$ ioflo -h
```
```text
usage: ioflo [-h] [-V] [-v VERBOSE] [-c CONSOLE] [-p PERIOD] [-r] [-R]
[-n NAME] -f FILENAME [-b [BEHAVIORS [BEHAVIORS ...]]]
[-m PARSEMODE] [-U USERNAME] [-P PASSWORD] [-S [STATISTICS]]
Runs ioflo. Example: ioflo -f filename -p period -v level -r -h -b
'mybehaviors.py'
optional arguments:
-h, --help show this help message and exit
-V, --version Prints out version of ioflo.
-v VERBOSE, --verbose VERBOSE
Verbosity level.
-c CONSOLE, --console CONSOLE
File path name to console log file.
-p PERIOD, --period PERIOD
Period per skedder run in seconds.
-r, --realtime Run skedder at realtime.
-R, --retrograde Shift skedder timers when retrograde clock detected.
-n NAME, --name NAME Skedder name.
-f FILENAME, --filename FILENAME
File path to FloScript file.
-b [BEHAVIORS [BEHAVIORS ...]], --behaviors [BEHAVIORS [BEHAVIORS ...]]
Module name strings to external behavior packages.
-m PARSEMODE, --parsemode PARSEMODE
FloScript parsing mode.
-U USERNAME, --username USERNAME
Username.
-P PASSWORD, --password PASSWORD
Password.
-S [STATISTICS], --statistics [STATISTICS]
Profile and compute performance statistics. Put
statistics into file path given by optional argument.
Default statistics file path is
/tmp/ioflo/profile/NAME.
```
Example:
Put the following into the file box1.flo
``` text
#example mission box1.flo
house box1
framer vehiclesim be active first vehicle_run
frame vehicle_run
do simulator motion uuv
framer mission be active first northleg
frame northleg
set elapsed with 20.0
set heading with 0.0
set depth with 5.0
set speed with 2.5
go next if elapsed >= goal
frame eastleg
set heading with 90.0
go next if elapsed >= goal
frame southleg
set heading with 180.0
go next if elapsed >= goal
frame westleg
set heading with 270.0
go next if elapsed >= goal
frame mission_stop
bid stop vehiclesim
bid stop autopilot
bid stop me
framer autopilot be active first autopilot_run
frame autopilot_run
do controller pid speed
do controller pid heading
do controller pid depth
do controller pid pitch
```
To run
```bash
$ ioflo -v terse -f box1.flo
```
Something like this should print on the console.
```text
----------------------
Building ...
Building Houses for Skedder Skedder ...
Created house box1. Assigning registries, creating instances ...
Built house box1 with meta:
plan: Share {'value': 'Test'}
version: Share {'value': '0.7.2'}
platform: Share {'os': 'unix', 'processor': 'intel'}
period: Share {'value': 0.125}
real: Share {'value': False}
filepath: Share {'value': 'box1.flo'}
mode: Share {'value': []}
behaviors: Share {'value': []}
credentials: Share {'username': '', 'password': ''}
name: Share {'value': 'box1'}
Warning: Nonexistent goal share goal.heading ... creating anyway
Warning: Transfer into non-existent field 'value' in share goal.heading ... creating anyway
Warning: Nonexistent goal share goal.depth ... creating anyway
Warning: Transfer into non-existent field 'value' in share goal.depth ... creating anyway
Warning: Nonexistent goal share goal.speed ... creating anyway
Warning: Transfer into non-existent field 'value' in share goal.speed ... creating anyway
Ordering taskable taskers for house box1
Resolving house box1
Resolving framer vehiclesim
Resolving framer mission
Resolving framer autopilot
Tracing outlines for house box1
Tracing outlines for framer vehiclesim
Tracing outlines for framer mission
Tracing outlines for framer autopilot
Starting mission from file box1.flo...
Starting Framer vehiclesim ...
To: vehiclesim<<vehicle_run> at 0.0
Starting Framer mission ...
To: mission<<northleg> at 0.0
Starting Framer autopilot ...
To: autopilot<<autopilot_run> at 0.0
To: mission<<eastleg> at 20.0 Via: northleg (go next if elapsed >= goal) From: <northleg> after 20.000
To: mission<<southleg> at 40.0 Via: eastleg (go next if elapsed >= goal) From: <eastleg> after 20.000
To: mission<<westleg> at 60.0 Via: southleg (go next if elapsed >= goal) From: <southleg> after 20.000
To: mission<<mission_stop> at 80.0 Via: westleg (go next if elapsed >= goal) From: <westleg> after 20.000
Stopping autopilot in autopilot_run at 80.000
Stopping vehiclesim in vehicle_run at 80.125
Stopping mission in mission_stop at 80.125
No running or started taskers. Shutting down skedder ...
Total elapsed real time = 0.2099
Aborting all ready taskers ...
Aborting vehiclesim at 80.125
Tasker 'vehiclesim' aborted
Aborting mission at 80.125
Tasker 'mission' aborted
Aborting autopilot at 80.125
Tasker 'autopilot' aborted
----------------------
```
### Documentation
github
https://github.com/ioflo/ioflo_manuals
#### License
APACHE 2.0
#### Supported Python Versions
Python 2.6
Python 2.7
Python 3.4