To connect to the blackfins with Serialdaemon:

./serialdaemon -baud 921600 -serial /dev/ttyUSB[#] -port [YourPort]

[#]: lower = slave, higher = master, generally 0 & 1
[YourPort]: > ~5000

If /dev/ttyUSB* does not exist:

  • If you ran robocup code without the serialdaemon:
    • Try reconnecting the USB (unplug and replug the cable)
  • If the ftdi_sio driver became unloaded somehow:
    • Check for ftdi_sio loading on startup using 'dmesg |grep ftdi'
    • Load the driver if it is not loaded using 'modprobe ftdi_sio'

Start GUI (Blackfins)

  1. Connect the micro usb cable
  2. Start serialdaemon
  3. Compile and run the console:

javac edu/gmu/robocup/*.java
java edu.gmu.robocup.Console -ra [host] -rp [port]

With serialdaemon, [host] = localhost, [port] = [YourPort].

Color Calibration with the GUI

Setting the colors once connected with the GUI:

  1. If the colors are completely off, turn on "Auto-Gain" point the camera at a bright light, and when the colors stop changing, turn off "Auto-Gain" (before turning the robot away from the light).
  2. Select "Highlight" for the color you want
  3. Select "Calibrate" for the "close" value of the color you want
  4. Left click and drag a box over the color and you will see that color highlighted everywhere in the image
  5. If you want to add additional areas to the color, right click and drag a box over the area.
  6. Select "color-> save to flash-> slot 0" to save the value (slot 0 is loaded at boot time).

Connecting to the Gumstix (USB)

Using kermit:

kermit -l /dev/ttyUSB[#]
> set carrier-watch off
> set flow-control none
> set speed 115200
> conn

[#]: usually 0

CTRL-\ C will get you back to kermit. "quit" will get you out of kermit.

Connecting to the Gumstix (Wireless)

Using ssh when connected to "rp" in the lab:

ssh root@[IP]

[IP]: each robot has his own ip, see the corner of the dry erase board

Password is "root".

Starting the Robot

  1. Connect to the gumstix
  2. Start serialdaemon on the gumstix to the master camera
  3. Run robocup, the menu explains the commands

Note: if you skipped starting serialdaemon, you'll have to pull the USB cable between the gumstix and the blackfins and reconnect it.

Flashing the Blackfins

  1. Start serialdaemon
  2. make the "srv" directory
  3. Run flashloader, with serialdaemon [host] = localhost and [port] = [YourPost]:

    ./ [host]:[port] [PathToLDR]

  4. If it hangs, CTRL-c and retry
  5. When finished, type "zZ" then "$!" to save to flash and restart

Emergency Reflash the Blackfins

When something goes really really wrong:

./ /dev/ttyUSB[#] ../surveyor/srv1.recovery.ldr [PathToYourLDR]

[#]: lower = slave, higher = master, generally 0 & 1

Follow the directions and at the end enter "zZ" to write to flash, but not "$!" (you'll need to manually restart).

Note that serialdaemon does not need to be running, but it will need to be compiled in the serialdaemon directory and called "serialdaemon".

Modify Wireless Settings on the Gumstix

Modify /etc/network/interfaces and comment out what you want to change for the given wlan[#]. Enter:

address [IP]
netmask [mask]
network [network]
gateway [gateway]

Save, exit, and enter:

ifdown -a
ifup -a
iwconfig wlan[#] essid [SSID]

Heart2Heart Oddities

  • "Play motion" will usually freeze everything up
  • In the project settings, if you click on a non-connected servo or you click on the servos on one side of the robot and then the other, sometimes the values won't load and you can't actually save. So make sure the values load before you start testing new values and saving.