Thursday, April 18, 2013

SSRD and Project Report Draft

Quick status update this week. I gave a talk on my senior project during Student Scholarship Recognition Day (SSRD) at Willamette, which you can view here. Unfortunately, although my robot was working (avoiding obstacles) the night before, when I went to take a video of it for the presentation (just in case it didn't work when I wanted to demo), it stopped working, so the video in the presentation is just my old one which demos the various movements possible on the robot. I haven't had time to figure out what is wrong yet, but the problem seems to be that it isn't always detecting the floor.

I also finished a pretty rough draft of my project report which can be found here. There is a lot of stuff that still needs to be filled in (images, diagrams, future work, lessons learned, etc) but its a start.

By next week I hope to have fixed the issues with the obstacle avoiding robot, and start work on the simulation to finish up my project.

Hardware vs Simulation

Last week I mentioned that I would be probably end up changing some elements of my project, based on the time I have left and what still needed to be accomplished. Recently I have decided that I will not be able to accomplish what I set out to do in the project if I continue on the same pace, working with hardware. I have been spending a lot of time hooking parts together, debugging them, figuring out I need different parts, ordering those and waiting for them to be shipped, making little progress for the large amount of time spent.

In order to get the robots to accomplish the simple task (finding a glyph and then gathering around it) I would need to order a webcam (which the Pi would hopefully be able to power), set up the robots to recognize the glyph using image processing (which the Pi would hopefully be able to do quickly enough) and then somehow get the robots to communicate to each other (or at least notify the others when the glyph is found, and then have them locate and group around the successful robot). Given more time, I think I'd be able to accomplish this, but since there is only 19 days left until we present out senior projects (with the paper due before then), I don't think its reasonable to assume this would be possible. However, I don't just want to finish the semester with no cooperative activity either (the project is entitled Swarm Robotics, after all  - not very impressive without something you could call a swarm).

My plan to accomplish the original goal of creating a swarm is to switch over and finish the project in a simple simulation. I want to simulate a 2D world, and create robots that mimic the one I designed: able to spin freely, sensors to detect obstacles, etc. In this world I will place a goal for the robots to find, and have them run code similar to what I have now. This way, I will be able to demonstrate the swarm behavior of the robots, but without having to spend too much time dealing with the issues that arise with the hardware. I think that I have enough time left to create an finish this simple simulation, and that it is a suitable compromise between what I set out to do and the time I have left to do it.

Thursday, April 11, 2013

SSRD Draft

The parts I ordered last week arrived, and I've now hooked up the sensors, so I can have a working obstacle-avoiding robot to demo during my Student Scholarship Recognition Day (SSRD) presentation next week.

One problem I ran in to this week is that because of the way I had my demo program startup on the boot of the Raspberry Pi, I was unable to bypass it (in order to actually change anything in Linux) so I ended up setting up the other SD card, getting the network drivers working, downloading RPi.GPIO, and using that to test the sensors.

The rest of the time this week was spent creating a draft of the SSRD presentation and a really rough draft of the project report. I'll post versions of these next week, once they are more polished.

One last thing is just a note that I will be probably end up changing some elements of my project, based on the time I have left and what still needs to be accomplished... more on that soon.

Thursday, April 4, 2013

More parts

This week I attempted to get the distance sensors hooked up to the robot, but noticed that I ordered sensors without the carrier boards, which are necessary to run them... whoops. So, I ordered the carrier boards for the sensors, breadboards that will fit everything that I need on the robots, and a a couple more chassis plates that I can stack on top of the existing plate (with some sort of standoff/screw) in order to create more space for all the components.

Thursday, March 14, 2013

Its Alive!

This week I finally got the robot working without having to be plugged in for power. I ran in to a couple issues, but the robot is able to drive itself around now. One issue I had was that the breadboard I intended to use wasn't big enough to fit the breakout kit, as well as all the other components, so I had to borrow one from a classmate. I also had trouble trying to fit everything (the two battery packs, raspberry pi, and the larger breadboard) on to the chassis, but managed to pile it all on there using quite a bit of tape.

Right now, the bot is just running a simple demo python script that I wrote which shows the different movements the robot can make. Below is a video of the robot running the script.
I'm having the raspberry pi run the python script as soon as it boots up, which works fine for demoing. However, since I have the script running an endless loop, the script never finishes, so the only way to make the robot stop is to unplug the power from the breadboard. By next week, I hope to have a button hooked up to control the starting/stopping of the script, as well as getting the distance sensors working.

Thursday, March 7, 2013

There's Always Something...

The parts that I ordered last week arrived today, so I can start to make more progress on the robot's hardware. Unfortunately, the Micro-USB B end of the cables I ordered have a casing which is just barely too big to plug in through the Pi Box case. It's not a huge deal right now, but I'll either want to make the hole for USB on the Pi Box bigger, or trim down the casing on the cable later on.

Now that I can move forward on the hardware, my goal for next week is to have the bot able to move around (following hard-coded instructions) free of all cable connections. (Although I might still have to manually boot up the Pi and start up the program first, unless I can get a button hooked up too)

Thursday, February 28, 2013

Driving the Robot

Quick Update: I ordered some USB A ports, short USB A to Micro-USB B cables, and breakout kits for the Raspberry Pi so I can proceed in my project.

My next (small) hurdle is to actually get the software running for the robot. The issue right now is that the Raspberry Pi takes a while to actually start up, and at the moment I have to enter in a username and password, then execute the file I want to run, all which requires interaction from me. Ideally, I would just be able to plug in the Pi and have it start running the code which I write, and I think I can easily do this. (find somebody who has already done it and follow what they did)

The issue still remains for actually starting / stopping the program on the Raspberry Pi without unplugging it or having it start when I don't want it to. An easy solution to this would be to have the program automatically start (as I said above) but have nothing happen until I press a button on the robot, which would act as a way to start/stop the robot's program. This is pretty simple to do once I have the Raspberry Pi GPIO pins hooked up to the breadboard, I just need to get a couple buttons. (Not hard to find, I think Radio Shack even has them)

I've decided I'm going to code for the robots in Python, since I have a little experience with it, and somebody wrote a nice library called RPi.GPIO which makes it simple to control the Pi's GPIO pins. More on this in the coming weeks.