def setup(): robot.gfx = gfx.RobotGraphics( drawSlimeTrail=True, # slime trails sonarMonitor=False) # sonar monitor widget # set robot's behavior robot.behavior = mySM
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))))
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())
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]))
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]))
def setup(): robot.gfx = gfx.RobotGraphics(drawSlimeTrail = True) robot.behavior = mySM
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)
def setup(): robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False) plotSonar(3) robot.behavior = mySM robot.behavior.start(traceTasks=robot.gfx.tasks())
def setup(): robot.gfx = gfx.RobotGraphics(drawSlimeTrail=False, sonarMonitor=False) robot.behavior = mySM
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]))