예제 #1
0
def setup():
    robot.gfx = gfx.RobotGraphics(
        drawSlimeTrail=True,  # slime trails
        sonarMonitor=False)  # sonar monitor widget

    # set robot's behavior
    robot.behavior = mySM
예제 #2
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
    startTheta = io.SensorInput().odometry.theta
    # static plot of robot angle (from start) vs time
    robot.gfx.addStaticPlotFunction(
        y=('angle', lambda inp: util.fixAnglePlusMinusPi(
                (inp.odometry.theta-startTheta))))
예제 #3
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)

    robot.gfx.addStaticPlotFunction(
        y=('diff', lambda inp: inp.analogInputs[1] - inp.analogInputs[2]))

    robot.behavior = MySM()
    robot.behavior.start(traceTasks=robot.gfx.tasks())
예제 #4
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
    startTheta = io.SensorInput().odometry.theta
    # static plot of robot angle vs eye voltage
    robot.gfx.addStaticPlotFunction(x=('angle',
                                       lambda inp: util.fixAnglePlusMinusPi(
                                           (inp.odometry.theta - startTheta))),
                                    y=('eye voltage',
                                       lambda inp: inp.analogInputs[1]))
예제 #5
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
    startTheta = io.SensorInput().odometry.theta
    # static plot of robot angle vs left eye, right eye and difference
    # assumes that left is analog input #2, right is analog input #3
    robot.gfx.addStaticPlotFunction(
        x=('angle', lambda inp: util.fixAnglePlusMinusPi(
         (inp.odometry.theta-startTheta))),
        y=('left', lambda inp: inp.analogInputs[1]))
    robot.gfx.addStaticPlotFunction(
        x=('angle', lambda inp: util.fixAnglePlusMinusPi(
         (inp.odometry.theta-startTheta))),
        y=('right', lambda inp: inp.analogInputs[2]))
    robot.gfx.addStaticPlotFunction(
        x=('angle', lambda inp: util.fixAnglePlusMinusPi(
         (inp.odometry.theta-startTheta))),
        y=('diff', lambda inp: inp.analogInputs[1] - \
               inp.analogInputs[2]))
예제 #6
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail = True)
    robot.behavior = mySM
예제 #7
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
    robot.gfx.addStaticPlotSMProbe(y=('rightDistance', 'sensor',
                                      'output', lambda x:x))
    robot.behavior = mySM
    robot.behavior.start(traceTasks = robot.gfx.tasks())
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
예제 #9
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
    plotSonar(3)
    robot.behavior = mySM
    robot.behavior.start(traceTasks=robot.gfx.tasks())
예제 #10
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False, sonarMonitor=False)
    robot.behavior = mySM
예제 #11
0
def setup():
    robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False)
    startTheta = io.SensorInput().odometry.theta
    # static plot of robot angle (from start) vs time
    robot.gfx.addStaticPlotFunction(
        y = ('neck', lambda inp: inp.analogInputs[0]))