IEEERobotics / bot

Robot code for 2014.
BSD 2-Clause "Simplified" License
18 stars 11 forks source link

Unable to connect to Beaglebone ctrl server. #137

Closed AhmedSamara closed 10 years ago

AhmedSamara commented 10 years ago

After turning on the bot, sshing into the bone, and running the setup script, when I enter the startup command, I just get

(venv)root@bot:~/bot# ./start.py -sc
Starting server
Starting CLI
ctrl_server.py | __init__ | 95 | INFO | CtrlServer running in non-test mode
Traceback (most recent call last):
  File "./server/ctrl_server.py", line 319, in <module>
    server = CtrlServer(sys.argv[1])
  File "./server/ctrl_server.py", line 112, in __init__
    self.systems = self.assign_subsystems()
  File "./server/ctrl_server.py", line 132, in assign_subsystems
    self.follower = Follower()
  File "/root/bot/server/../follower/follower.py", line 36, in __init__
    self.color_sensor = color_sensor_mod.ColorSensor()
  File "/root/bot/server/../hardware/color_sensor.py", line 37, in __init__
    enable.write('PON', 'Enable')
  File "/root/venv/local/lib/python2.7/site-packages/i2c_device-0.1-py2.7.egg/i2c_device/i2c_bitfield.py", line 60, in write
    old = self.read_byte()
  File "/root/venv/local/lib/python2.7/site-packages/i2c_device-0.1-py2.7.egg/i2c_device/i2c_register.py", line 11, in <lambda>
    self.read_byte = lambda byte=0: device.read_byte(self.address+byte)
  File "/root/venv/local/lib/python2.7/site-packages/i2c_device-0.1-py2.7.egg/i2c_device/i2c_device.py", line 72, in read_byte
    data = self.bus.read_byte_data(self.address, comm)
IOError: [Errno 121] Remote I/O error
(venv)root@bot:~/bot# ./start.py -sc
Starting server
Starting CLI
ctrl_server.py | __init__ | 95 | INFO | CtrlServer running in non-test mode
Traceback (most recent call last):
  File "./server/ctrl_server.py", line 319, in <module>
    server = CtrlServer(sys.argv[1])
  File "./server/ctrl_server.py", line 112, in __init__
    self.systems = self.assign_subsystems()
  File "./server/ctrl_server.py", line 132, in assign_subsystems
    self.follower = Follower()
  File "/root/bot/server/../follower/follower.py", line 36, in __init__
    self.color_sensor = color_sensor_mod.ColorSensor()
  File "/root/bot/server/../hardware/color_sensor.py", line 37, in __init__
    enable.write('PON', 'Enable')
  File "/root/venv/local/lib/python2.7/site-packages/i2c_device-0.1-py2.7.egg/i2c_device/i2c_bitfield.py", line 60, in write
    old = self.read_byte()
  File "/root/venv/local/lib/python2.7/site-packages/i2c_device-0.1-py2.7.egg/i2c_device/i2c_register.py", line 11, in <lambda>
    self.read_byte = lambda byte=0: device.read_byte(self.address+byte)
  File "/root/venv/local/lib/python2.7/site-packages/i2c_device-0.1-py2.7.egg/i2c_device/i2c_device.py", line 72, in read_byte
    data = self.bus.read_byte_data(self.address, comm)
IOError: [Errno 121] Remote I/O error

There's not much useful information that I can get out of that error.

dfarrell07 commented 10 years ago

There's a problem with the low level setup code in the color sensor hardware abstraction. Is it hooked up, powered and such? A quick fix in software may be to just comment out the call that builds it, which is in Follower, via the stack trace.

AhmedSamara commented 10 years ago

@dfarrell07 Yep, that's what the problem was. It was unplugged.