Kuroko - Updates

Kuroko is a multi-robot system controlled over the internet to arrange furniture, stage pieces, you name it into various user-specified configurations. The goal of our project is to cut down labor costs for menial, repetitive arrangement tasks that must be executed with precision. Our final project will be a proof-of-concept prototype, where we use the robots to play a board game with the ability to save board configurations for future play.

This is the final design project of four seniors in the Department of Electrical and Computer Engineering at Carnegie Mellon University as part of their requirements to graduate.

A hearty thank you to our TA and our professor for their support!

To visit our official website click the link above or on the blue globe below.

Thank you for visiting our page!
Recent Tweets @

Thanks, everyone!

Here are some pictures and a video from testing as well as a list of everything that needs to get done.

What we have now:

  1. Configurable grid.
  2. Dead-reckoning with right-angles. It seems like the angle for clockwise doesn’t work very well, so that needs some tweaking.
  3. 1 robot. We need the charger for our second robot still.
  4. A buggy robot avoidance system that we are going to scrap for a better one.
  5. Nice camera-tracking software, but it’s not linked up to our program yet.
  6. Local servers, clients. The working version is not online yet although we have an architecture set up for that already. We just need to merge it with what we have.

What we need:

  1. A way of being able to disconnect the robots and clients without having to restart the server.
  2. A different color to track other than red or green.
  3. Working 2nd robot.
  4. New avoidance system for the robots.
  5. Link the camera to our avoidance code.
  6. Add a correction system for the camera.
  7. Chutes and ladders game “board” and game programming.
  8. Get the online server working with our code.

Our final demo for our project is going to be a game of Chutes and Ladders where the pieces are the robots, and you can save and load the game board. Basically, the robot is starting off in the upper right-hand corner and snakes its way down the board. The first “dice roll” is a 2, so it moves to the end of that row. The next “dice roll” is a 3, so it needs to go down to the next row and move all the way to the right. The yellow square is meant to represent the location of another robot, so the moving robot moves around that square to get to where it needs to be. If that robot wasn’t there, then the moving robot would have just moved straight to the end of the row.

image

We’re approaching the final stretch, but we still have much to do. Below, we just posted a bunch of photos and videos from our various testing sessions.

First, here’s a video from right before our midterm demo:

Next, we have some pictures from testing. We basically would line up the robot with the tape and tell it to go various distances at various speeds in order to get an idea for how accurately it could move.

image

In the process of testing our robots, we’ve also been developing a camera tracking system for them using Processing.

image

image

Here’s our camera and tripod. We’re doing color tracking with various materials (see below). You’ll notice the red and green squares on the computer monitor, which correspond to…

image

image

Well, that’s it for now. We need to get back to work on our robot and user clients as well as our control server.

 

Here are the tests that we will conduct to ensure reliable operation of our system:

  • Tests for how accurately we can make the robots move fixed distances
  • How long do the robots take to respond to real time stop commands
  • Tests for error in rotation angle
  • Tests for if the robots move in a straight line
  • Tests for how much load they can carry
  • How long the battery lasts
  • What happens to the robot when the battery life is low
  • What happens in emergency situations when the robot hits a wall, etc.

We will write scripts to automate as many of these tests as possible, in order to achieve easy reproducibility. 

We just completed setting up the central server part of the project. Our server setup involves an Amazon EC2 instance, which is a virtual server in the cloud. This allows us to have a fully customizable server with a static IP address. The static IP was required so that each robot knows how to contact the server at any given time.

We’re working on a big update, and will have something for you guys to see soon enough. Our mid-semester demo is coming up this Friday, and we’re really excited to show off what we have. 

For now, all I’ll say is that Python is a very fun language!

I’ve been discovering things about it and learning it along the way as we need it for our development, and are planning on having at least all the code on our Pi be in Python.

One thing slightly annoying about the language is manipulating bits around. Well, it was annoying for me because I wasn’t quite familiar with the usual tricks and tips of how to do it in Python. But instead of talk about those today, I’d like to introduce a new library we’ve decided to use, bitstring

Say you want to create one unsigned byte, and two 16 bit signed 2’s complement integers, and form one five byte string to send across a serial port. This becomes trivially easy with bitstring.

num1 = BitArray(uint=INTEGER1, length=8)

num2 = BitArray(int=INTEGER2, length=16)

num3 = BitArray(int=INTEGER3, length=16)

return num1.bytes + num2.bytes + num3.bytes

And there you have it! As opposed to randomly manipulating bits with masks, and shifts, and other really low level operations that behave ever so slightly differently from C on some occasions!

Here’s just some information we used to started with our Pi 

Installing the OS

We installed the Raspbian Wheezy OS on our Pi. The OS image we used was from this website.

And we used the following tutorial to install our OS.

Connecting to Pi using an Ethernet Cable

Getting an ethernet connection working to SSH into the Pi directly from our computer was the next step we completed, and we followed this forum post to get that working. We also found this guide helpful.

Wifi Access on the Pi

1) The wifi dongle we are using is the Edimax EW-7811Un USB Wifi dongle. We got it on amazon at 

http://www.amazon.com/dp/B005CLMJLU/ref=pe_175190_21431760_M3T1_ST1_dp_1

2) The Raspbian Wheezy OS is supposed to have the driver for this dongle pre-installed, but our OS wouldn’t even boot when the dongle was plugged into the USB port.

We had to install the driver for dongle. The driver we used can be found at

https://www.dropbox.com/s/ybtum0p27r1vszw/8192cu-latest.tar.gz

3) After transferring the 8192cu.ko file to the /boot directory in the SD card, we then ran this script by MrEngman

https://www.dropbox.com/s/k47uissx8yte56d/install-rtl8188cus.sh

4) At this point, the blue light on the Edimax should turn on. You should also be able to boot into the OS with the dongle connected to the USB port. 

Try the following commands to see if installation worked

lsusb - Check if it recognizes the USB connection

lsmod - to see if the driver has been installed. You should see 8192cu in the list

iwconfig - you should see wlan0 there you should be ready to go.

5) Run these commands to connect to the wifi

sudo iwconfig wlan0 essid YOUR_NETWORK

sudo dhclient wlan0

This should give your Pi an IP address. If you run ifconfig again you should be able to see this IP address.

Note: This only works for WPA networks without passwords.

6) To have wireless turn on when the Pi boots follow the steps 

http://elinux.org/images/4/4b/Raspberry_Pi_wireless_adapter.pdf

The wpa_supplicant.conf file needs to be changed based on the network you are trying to connect to. For an open network the is no “psk” field and

key_mgmt = NONE

7) When you reboot the computer it should connect to the internet without having to do the steps in (5)

image

Useful Tutorials

http://www.savagehomeautomation.com/projects/raspberry-pi-installing-the-edimax-ew-7811un-usb-wifi-adapte.html

http://dev.mikamai.com/post/31062030033/how-to-add-wifi-capability-to-the-raspberrypi-in-10

You might also want to try deleting /var/run/wpa_supplicant/wlan0 and rebooting. 

image

Finally connecting to the internet on the Pi! Nidhi and Dhaval did some great work today.

[UPDATE] Wireless SSH works! No more ethernet for us! Tomorrow, we’re going to try to get communication between the Pi and a computer over the internet working. Maybe we’ll also get communication between the Pi and the iRobot working?

So this is pretty much our first real post. We met with our TA in the Robotics Club at CMU, and we ended up getting a colossal amount of work done. We were a little worried that our DB-25 cable (used for serial communication between our Raspberry Pi and iRobot Create) and our MicroUSB cable (used to power the Pi) had not arrived, but this turned out to be a non-issue. We used a ribbon cable header for our serial communication purposes and the GPIO pins themselves on the Pi to power it. All in all, we got a ton of work done. 7 days ‘til our midterm demo!

image

[Above] 5V regulator circuit.

image

[Above] Solder!

image

image

[Above] Setting up the Pi with our Robot.

image

[Above] A better view.

image

[Above] Running the Raspberry Pi purely off of the iRobot’s battery power!!!

image

[Above] Late night programming session with the Pi. At this point, we were struggling to connect our Pi to CMU’s wireless signals.

image

[Above] Our trusty steed.

image

[Above] Success! We can establish a Wi-Fi connection! Now, all we need is for CMU to allow us to use their secured network. Back to work… :-/

We’re just getting started, but stay tuned for more exciting updates!