Here's a quick robot that should go forward if it's safe to do so, but will stop and back up if it gets too close to something

import nengo_pushbot

import nengo

model = nengo.Network()
with model:
# change this like to correspond to your robot ip
    bot = nengo_pushbot.PushBotNetwork('10.162.177.47')
    bot.track_freqs([200])
    bot.laser(200)
    #bot.show_image()

    pos1 = nengo.Ensemble(100, 2, label='pos1')
    nengo.Connection(bot.tracker_0, pos1)

    def orient(x):
        if x[0] > 0.5:
            return [-1, -1]
        else:
            return [1, 1]

    nengo.Connection(pos1, bot.motor, function=orient, 
                     transform=0.2, synapse=0.003)
    nengo.Probe(pos1)