Week 1: This week has been pretty much spent getting settled in. The drive up from Nebraska was fairly uneventful. I didn't even get lost... well not until I got to campus at least. I met Jessamy, the other woman in the program, almost immediately upon arriving. She even helped me move in! Dr. Gini set us up with the Psychology REU program. They have quite a few organized social activities and lectures so we have something to do besides sit around and feel homesick in our spare time. Picking a project to work on has been somewhat difficult for me. Everything sounds interesting and over my head all at the same time. Right now I have it narrowed down between two projects. I hope to have a final decision by Monday. I think I will work on one of the robotics projects that Dr. Gini has going on at the moment.
Week 2: Monday I picked which project. I am going to work on getting the radio communication between some preexisting robots working. I also have to get them to figure out a way to discover their position. I think that will be done with light sensors. Or, at least that is how I understand it. I might have to upgrade three of the robots to match the design of the later two. Then we will try to see if communication makes their tasks more efficient. Their task is getting these infrared blocks back to home (a light).
This week I spent time learning about how to program a Handy Board. I am using Robotic Explorations by Fred G. Martin to get the basics of building Lego Robots. I have also learned to solder. I've seen it done a lot, but it is so much harder than it looks. It took me about an hour yesterday to get 6 connections. Paul, the guy who originally built the robots, will be back from vacation next week. Hopefully, he will help me get a bit more direction and we can get the radios ordered.
I am a little worried that I will not have enough time to get anything done. I feel like I have already wasted two weeks. I know it really couldn't be helped. But it is frustrating none-the-less. However, this summer is going so much better than my last REU. I am incredibly happy about this.
Week 3: I stated the triangulation algorithm. Dr. Gini's husband, Dr. Boley, helped me with the math. It has been a really long time since I have done Trig. I finished coding the algorithm by Wednesday and spent Thursday and Friday testing it. I discovered that the algorithm was better than I expected and only seemed to blow up where the angle between the two far lights were the same. For a while the computer was trying to get me to believe that a=b=.7071069 and c=a/b=2. Gotta love floating point division errors. But I think I got the code working pretty well and next week I will test it on the robot (hopefully). I also learned/fumbled my way through learning La TeX. Click here to see the algorithm.
Week 4: This week has been one of those waiting weeks. I finished up the very last of my fine tuning to the triangulation algorithm. It responds pretty quickly and it seems to work fairly well. The real test will be how well it does with error from the sensor readings. I started messing around with how I will actually detect the lights from the robot. I have some code written but now I need three lights. One of the great things about universities is that there is bureaucracy just like everywhere else. So, I have to find a place that will take pay orders in order to get the lights. One of the undergrads, Frank, also pointed out that I might have problems with the robot not picking up one of the lights from certain positions. Not because it can't see the third light but because it will be so close to the other two lights that it would see the three points near it and would return incorrect values. I will have to do a lot of testing once we get 3 bright lights in.
Since I am waiting to get in the lights and I have written as much code as I can on the light stuff without something to test with, I have been reading up on the radios. The second part of my project involves us using radios to communicate between the robots. I have never done work with radios before. So, I am going to have to do lots of reading. Time has just been flying by.
Week 5: Paul, one of the grad students, found an extra light jack. So, right now we are using 3 light bulbs. At first I was worried that there might be some spill but it seems to be okay. I learned that if you add a long black tube to a light sensor it increases the resolution. This made a lot of difference to my readings. So, I spent most of this week getting the robot to talk to the computer, remembering gnuplot, and running tests. It has been really interesting to see how putting the robot in different spots will affect how well it notices 3 distinct changes in lights.
I couldn't start on the radio because I have to wait for permissions to use a program called minicom. So, that will have to be done next week. My next step is to get the robot to come up with 3 points it thinks are the lights, and have those lights be accurate. Then I will test to see how well the algorithm works all together.
Week 6: Monday I spent the day trying to detect the lights and coming close but not quite yet. I also got Ethan, one of the CE/EE REU students to help me with the radios. He has a quite a bit of experience with radios and after about an hour and a half he figured out how to get the to talk. I would have NEVER figured it out! He ended up using the command prompt to echo command to the serial port. Then the message showed up in the minicom terminal on the other computer. So apparently it wasn't as easy as I thought it was supposed to be. He also explained what the format for the the message was. You have four fields. The first one is a to/from field, the second is the sequence, the third is the length, and the fourth is the message. We had to convert stuff in to octal. I have never seen that before either. Base 8 is very different. I also learned what nibbles are. This whole experience is making me feel like I can't do anything on my own because I always need help.
Tuesday my robot started to actually pick out the three light points pretty well. But then I ran into a weird bug while testing on Wednesday. For some reason some of my code is getting overwritten. This is terribly frustrating and I know exactly where it is happening. The code that is causing the problem has nothing whatsoever to do with the array that is loosing values. And I have no clue how to fix it.
Well, it seems that it must be some type of memory error that is causing the problem. So I tried a different robot with no luck. I will have to try loading different firmware on to the robot to see if that helps. The other possibility is that somewhere in my program I have a memory error. Right now everyone from our lab is gone to a presentation. So, I have started learning about serial ports and such.
Week 7: The serial port documentation I found is quite nice. If you want to know about programming on serial ports these two sites links are helpful: http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html and http://www.linuxdoc.org/HOWTO/Serial-Programming-HOWTO.html. I am also getting used to qbasic so that I can port this code over to C.
This whole task is becoming quite daunting. I keep finding myself overwhelmed and I feel like I am moving far too slowly. I have no experience at all in any of this and I have no clue if I am even going about this in the right way.
I spent this entire week getting absolutely nowhere. Well, I did learn that the radios are half-duplex which means they can only send or receive at any given time. Full-duplex means that they could do both at the same time. I also learned a little more about writing to the serial port but nothing that has gotten me very far at all.
Week 8: Monday was a great day! Dr. Gini came back from her trips. And I've decided she must be good luck. I was messing around with the robot trying to figure out why it was overwriting the values in the middle of the array. One time I just happened to not run the program on the PC that captured the data the robot was sending up. When I did that the code worked fine and everything was happy. If the program on the PC was running, however, the data got overwritten. Since these robots are autonomous I don't really want them to talk to the computer in the end anyway. So, I stopped sending information to the PC and everything is working so much better.
Tuesday I got the robot to figure out where it was in respect to the three lights. I was getting strange values for a while and then realized I had been sending the angles in degrees not radians. I then started working on increasing the accuracy of the algorithm. However, when I increased the number of values sampled from 120 to 150 I started to get a divide by zero error.
Wednesday I realized that my average value was getting too big for the 16 bits allotted for ints. I changed it to a float and everything was working much better. Figuring this problem out was really exciting for me. Usually someone else would have to help me find this problem. So, I was pretty proud that I actually figured out the problem on my own.
Thursday and Friday I spent running trials on the algorithm. I need to see how well it performs and if there are any big errors I forgot about.
Week 9: This week I have a presentation on Tuesday. I spent a good part of Sunday and Monday working on it. I also realized I had to still figure out which direction the robot was facing. While I messed with that I found another boundary condition that needs to be dealt with. The condition occurs when the back of the robot is directly pointing at a light. This means that immediately upon taking values it will get high points and it will get high values at the end. This means that the light is going to be split and thus it will not find the three lights accurately.
I also discovered another error that I made. The robot will not always see the first light first. This means that I had to add in extra cases to my code to consider the situations where the second light was detected first and the third light was detected first. I fixed that error and then went back to work on figuring out how to find the angle. It seems like there are about four cases that have to be considered. I just need to figure out which way the robot is pointing in the first place. This could be done using the servo values to the middle point. But, to figure out exactly which values would mean what things would take some testing and I don't think I will have time to do all that. Friday I said good bye to Dr. Gini. She and most of the grad students, including Paul are going to IJCAI. I reviewed my code with Paul and I gave Dr. Gini an overview of what I had done this summer.
Week 10: This week we are presenting posters of our work on Wednesday and Thursday. I feel very frustrated by my inability to stop oversimplifying what I have done. I think the project is incredibly cool. But when I talk to about it to people I tend to make it sound very easy and trivial. I really dislike it when people try to make their stuff sound overly complex so no one can understand...but doing the opposite is very bad as well.
I don't think I will get the orientation stuff done this week. I got all of my data entered in so that they can use my trials to figure out some of the error. I also commented up my code and tried to clean things up bit so that people would understand what was going on better.
I just wish there was more time so that I could get all of my stuff done. But doing the presentations has been very educational. I had forgotten all the stuff you need to do to make an effective poster.