Beispiel #1
0
from sturdyRobot import SturdyRobot
import reactiveCode as reactiveCode

robot = SturdyRobot("exit")
exit_behavior = reactiveCode.ExitCrowd(robot)
reactiveCode.runBehavior(exit_behavior)
Beispiel #2
0
from SturdyBot import SturdyBot
import reactiveCode as reactiveCode

firstConfig = {SturdyBot.LEFT_MOTOR: 'outC',
               SturdyBot.RIGHT_MOTOR: 'outB',
               SturdyBot.SERVO_MOTOR: 'outD',
               SturdyBot.LEFT_TOUCH: 'in4',
               SturdyBot.RIGHT_TOUCH: 'in3',
               SturdyBot.ULTRA_SENSOR: 'in2',
               SturdyBot.COLOR_SENSOR: 'in1',
               #SturdyBot.GYRO_SENSOR: 'in3'
               }
robot = SturdyBot("honeybee", firstConfig)
honey_behavior = reactiveCode.Honeybee(robot)
reactiveCode.runBehavior(honey_behavior)
Beispiel #3
0
from sturdyRobot import SturdyRobot
import reactiveCode as reactiveCode

robot = SturdyRobot("braitenberg2")
berg2_behavior = reactiveCode.Timid(robot)
reactiveCode.runBehavior(berg2_behavior)
Beispiel #4
0
from sturdyRobot import SturdyRobot
import reactiveCode as reactiveCode

robot = SturdyRobot("exit")
line_behavior = reactiveCode.LineFollowing(robot)
reactiveCode.runBehavior(line_behavior)
Beispiel #5
0
from sturdyRobot import SturdyRobot
import reactiveCode as reactiveCode

robot = SturdyRobot("wary")
wary_behavior = reactiveCode.Wary(robot)
reactiveCode.runBehavior(wary_behavior)
Beispiel #6
0
#!/usr/bin/env python3

from SturdyBot import SturdyBot
import reactiveCode as reactiveCode

firstConfig = {
    SturdyBot.LEFT_MOTOR: 'outC',
    SturdyBot.RIGHT_MOTOR: 'outB',
    SturdyBot.SERVO_MOTOR: 'outD',
    SturdyBot.LEFT_TOUCH: 'in4',
    SturdyBot.RIGHT_TOUCH: 'in3',
    SturdyBot.ULTRA_SENSOR: 'in2',
    SturdyBot.COLOR_SENSOR: 'in1',
    #SturdyBot.GYRO_SENSOR: 'in3'
}
robot = SturdyBot("escapeBox", firstConfig)
escape_behavior = reactiveCode.escapeBox(robot)
reactiveCode.runBehavior(escape_behavior)
Beispiel #7
0
from sturdyRobot import SturdyRobot
import reactiveCode as reactiveCode

robot = SturdyRobot("vehicle1")
vehicle1 = reactiveCode.Vehicle1(robot)
reactiveCode.runBehavior(vehicle1)
Beispiel #8
0
from sturdyRobot import SturdyRobot
import reactiveCode as reactiveCode

robot = SturdyRobot("timid")
timid_behavior = reactiveCode.Timid(robot)
reactiveCode.runBehavior(timid_behavior)