Revision 25694a03
ID | 25694a039a518c4f952916bb95f831b42a5e3359 |
Changes so that scout1 automatically spawns upon creation of the
simulator environment, and that line follow just continuously follows
lines instead of prior line-following-capability testing code.
scout/libscout/src/behaviors/line_follow.cpp | ||
---|---|---|
141 | 141 |
|
142 | 142 |
void line_follow::run() |
143 | 143 |
{ |
144 |
follow_line(); |
|
145 |
turn_right(); |
|
146 |
follow_line(); |
|
147 |
turn_straight(); |
|
148 |
motors->set_sides(-MOTOR_BASE, -MOTOR_BASE, MOTOR_ABSOLUTE); |
|
149 |
Duration meow(2); |
|
150 |
meow.sleep(); |
|
151 |
spot_turn(); |
|
152 |
follow_line(); |
|
144 |
while(ok()) |
|
145 |
{ |
|
146 |
follow_line(); |
|
147 |
} |
|
153 | 148 |
} |
Also available in: Unified diff