Still in the comp lab at SMU. Wondering why the NUS comp center doesn't open 24hr like the SMU one... grrrr..... Then again, the NUS one is a typical university comp lab - large, impersonal, has hundreds of PCs. The SMU one, on the other hand, is small with only about 10 PCs of which 2 are video-editing stations (!!). The room is furnished simply and is small, but has a certain homeliness to it. Reminds me of the days spent in the Chinese High comp labs. Sigh, those halcyon days.... forever a fond memory. Ok, now I sound like a geek, don't I? B-) Fancy reminiscing about days spent in comp labs. Boy, have I got stories! But those another day....
Again, flashback to Sunday afternoon. After church, I headed straight back to school, to the USP robots lab. I had no idea at that time what the next 20 hours was going to be like. It was nearly non-stop work from 3:30 right till the minutes before we presented our project to A/P Chris Mendis and friends. I think a chronological account of what transpired is difficult, so I'll just ramble ...
At some point, we decided we would call our robot Mr Postman. There was a robot called Mr Chef in last year's class that could cook. Our robot is supposed to go around collecting addressed packages, and then delivering them to the right places. Then, I think it was Lidan who suggested the name. I know I suggested we should play the oldie of the same title when we presented. That didn't happen, eventually.
We had this huge idea that there would be three houses which Mr Postman would visit and pick up packages. It then returned to a "hub" where a customised (homemade light sensors) sensor array scans the packages and decodes the address they should go to. This information is beamed via IR to the robot which would then attempt to deliver the packages FIFO and with shortest route. The addresses are encoded on the packages using a special pattern I designed that accommodates three houses and more importantly can be uniquely identified no matter which side a package lands on in the 'chute'. The sensor array would also be able to tell whether there is really a package in front of it or whether it is just "reading air".
[It's bright outside and the aircon is finally back on. Guess what, I was moving the MPEGs to Dominic's H:\ and realised that they get 50Mb in SMU!!! Not fair!!]
We started off slow, even though we had less than a day to work. I don't think it was last minute work because we actually came together a few times the previous two weeks to work on this. I guess it was just that we left many things in theory and didn't try out our ideas in implementation. So when the first practical difficulty surfaced, we were stumped! Apparently, we had photodiodes for our custom sensors, instead or photoresistors. It was already 7:30pm and there was no place where we could get electronic parts at such short notice. This problem completely incapacitates the addressing system, so .... We decided we would simplify (first of many) and use a single LEGO light sensor for the address scanning at the hub. The addresses became colors - red, black and white - since we realised that the LEGO light sensor differentiates between these colors quite well. I had to make a >1hr trip to PGP to get 2 extra sensors from Garry, since his team thankfully did not use any in their robot design.
Close to midnight, Kim Chun came over from S16. He had to pull an all-nighter too, to rush his MM project. It was nice to have him around, although we were so busy with our own projects, we hardly talked to each other the whole time.
[7:22am: I'm hungry... Haven't been back in SMU for some time, feels good to be here again.. think I'll see if I can get Yiping or Weishan for breakfast .. Dominic's sleeping in his Chorale room - think I'll let him, he has class at 10]
I finetuned my package-collecting system (where trapdoors at the houses are triggered by a bar on the robot as it passes underneath, and the package falls into a chute on the robot. The packages must stack up on each other and on their sides, in order for the scanner at the hub to read them properly) until I got it close to a 90% success rate which was quite good. I rebuilt the robot (which Eugene and Jonathan built) keeping things essentially the same. The original was too speedy because the wheels were stuck straight onto the motors. I added gears, slowing it down and almost resulting in the wheels being more centered. Problems with pivot-steering made me shift the light sensors to alongside the wheels. The original design was too long, I felt, for a differential drive system, so I moved the motor of the punching arm inwards. I replaced and reinforced joints and connections for structural integrity. It was getting rear-heavy so I added a castor at the back too, in addition to the one in front. I ended up with a shorter, more balanced, more stable robot. Jonathan, I must mention, didn't appear pleased that I changed the package system and some of the robot design. He did put in a lot of effort in this project - more than me I would say - but I think the changes I made were good. He didn't protest, of course, but right till near the end, he was always saying how his design might be better. I'm not sure if he knows, but I really think his design, much of it in theory and untested, wouldn't have worked as well. I had rationale for changing them, and I have experience in this. Sigh, I always had the impression that he's quite a proud person, since taking Writing module with him. Still, I must admit that working together with him on this project has not been as unenjoyable as I imagined. He turned out to be quite nice, and we had a pleasant if cordial chat over dinner. He was also cooperative and wasn't as stubborn as I imagined him to be. I need to be less judgmental.
Kudos to Eugene Ching for his programming genius. He was clearly under much stress, being solely in charge of programming. I know how he felt. While glad I'm not in his shoes, I was sympathetic too and tried to encourage him (and everyone) as much as I could. Anyway, he came up with this rather innovative way of guiding the robot around the landscape without using path-tracing (so cliched every other group was doing it) and instead using a series of "guiding" lines. The robot travels blindly forwards much of the time, until it sees a line in its path. It straightens itself (!) and continues. At junctions, it turns. At houses, it slows to collect the package. Brilliant. But we kept having difficulty programming the robot to execute the 90deg turns it needed to make. After considering many methods, we went brute force and calibrated its turning time. With the self-correcting feature, that eventually turned out fine.
We couldn't get the hub to work. Firstly, the RCX was a little faulty and kept getting amnesia (not good since it takes 15min just to flash it with its firmware). Also, we were quite out of time to program its scanning function. Which isn't particularly easy to begin with. By this time, we were already weary and had learnt that things in theory don't always translate into practice that seamlessly. In short, we made more simplification to our plans. Now, instead of a 8-shaped route that allows the robot to take short cuts around town, we have a simple circular loop. Since we didn't have a hub, we decided that we would just present the collection sequence. That itself was nerve-wrecking because somehow the robot went nuts and stopped slowing down in front of the houses. The slowdown is crucial because otherwise, the packages will miss quite surely. Me and Eugene went to and fro between the computer and the "maze" (it's so much like micromouse, I can't help it) countless times trying to find out what was wrong. The presentations have already started and our robot - simple as it is now - still isn't working!! I think only the two of us knew what was going on and the others just got confused since in our hurry, we couldn't stop to explain. Lidan was plain worried - I know she can't take this sort of stress. (She was so tired being not used to staying up late, but she refused to sleep just so that she can quietly watch us work. Thanks, Lidan. =) Jonathan was trying to offer suggestions. I'm sorry that we were in such a frenzy we couldn't stop to listen. I think we knew what we were doing too, just that we couldnt slow down to explain. Thankfully, we spotted the bug (a typo, Sensor_2 instead of Sensor_3) and the thing worked in the nick of time. Thanks anyway, Jonathan. =)
It came time for our group to present. I think I was very happy that it was working quite satisfactorily, albeit merely a shadow of what we had intended. I prepped Eugene up to be the main presenter, promising to back him up when needed. Somehow Lidan took the lead in presenting. I'm not sure why, but in her presentation she actually sounded sad. Poor girl, I think the whole experience really drained her and it showed in her oral presentation. Still I wished Eugene had talked instead, since he already had some sorta speech prepared. =/ I pressed the Run button on the robot. It collected the first package, made a 70deg(!!) turn and ... veered off course. I don't know how the rest felt at that moment but I thank God I had my wits with me (I prayed many times the whole time). I didn't panic. Mentally I just went Restart, restart, restart... so that's what I did. I stopped the robot, swiftly extracted the already-collected package, set up everything again, and pressed Run a second time. The entire circuit takes less than a minute to complete but everytime it approached a house or a turn, I would be holding my breath. At the last house, the package missed slightly, didn't enter the chute but rather got itself perched at the top and it looked like it was going to get stuck between the robot and the house. Bad, because that would definitely cause the robot to go off course. I let out an audible Oh..... and then, praise God! the package slipped neatly into the chute! Mr Postman (reinstating the textual relevance of the referent after a lapse in reference with a definite explicit nominal expression. After all this geek speak, I must remind my readers than I am an English Language major... hahahhahahahha... sorry, cranky from lack of sleep =P) ... Mr Postman then carried on and completed the circuit perfectly, stopping exactly where I wanted so I could punch the packages out one by one into a "collection bin" (obediently made by Grace just minutes before. Now, Grace is a really sweet girl. She can't build a robot or write a line of code to save herself, but she sure is creative. She transformed our boring looking mounting board - full of control lines and nothing much else - into a park, roads with traffic signs, a playground. It really looked much better. I think she did more than that. She always did her best to turn her for meetings, though she knew she couldn't do much technical-wise. She would always be around, helpful, asking whether we need this, or that. And she's also the cheerful, cutesy sort so she kinds of lightens the stressed tensed atmosphere .... Thanks!)
Prof Mendis offered to let us present to him personally on Friday, seeing that we were unable to to fulfill our initial plans partly because the RCX was faulty. I think he was also impressed, seeing that ours was (actually) one of the more interesting robots and our methods (the guiding lines) were innovative and fresh (look ma! no pathtracing! =P). Eugene thinks that if we finish the hub and brush up the whole thing, we can score much higher. I concur. Tiring though it was (esp just barely a day after the Civil Society Seminar!!) this project turned out to be fun and I'm now interested to see us complete what we had designed. It would definitely bring a sense of satisfaction to see Mr Postman deliver the packages!!
[8:47am: Weishan having lessons, can't have breakfast. Think I should wake Dominic up too, his lesson is at 10.]
Goodness, such a long entry. Hmmmmmm..... [deep thought] ... I haven't talked about the Civil Society Seminar yet. Will that be this long?!