May 2008 Archives

I had the most insane dream sequence this morning... ... ...

I was at a party, and I was talking to people when Kara came up and she was clearly intoxicated... but she was pregnant. So I was trying not to make a scene, but I was mad and was trying to tell her that that's not cool, but meanwhile she was pouring herself another beer! And then I couldn't actually get the words out, because I suddenly had a retainer AND a giant gob of big league chew in my mouth.

So I started trying to pull out the gum and retainer, but it was stuck, and I was making a mess of stringy gum and drool, so Kara said "go to the bathroom and deal with that and then we can talk." So I hurried to the bathroom all embarrassed with drool and gum dripping out of my mouth.

When I got to the bathroom, I got the gum and retainer out and then I looked in the mirror and I had what looked like really bad acne, and I thought "wait, I didn't have ache before..." and then it was getting worse right before my eyes! My forehead turned a deep red and all over my face big nasty bumps were blistering up.

And then I woke up and thought "Wow... is my brain mad at me?"

I'm taking an experimental robotics class this semester and it is by far the most fun of my classes. It's actually not much of a class, but more of a group project with teacher guidance. Our three hour class is just a time to meet up with our group and work together while also getting feedback/advice from the professors.

Even the projects that the various groups are working on were decided by us. I spearheaded the campaign to make a group to develop a person following robot, and fortunately there were a few others that were interested in such a project.

So the last month or so, we've been making our little Pioneer robot follow us around, and it's doing quite well! At the moment, it detects people by using a laser scanner range finder to look for legs in the vicinity. If it finds any pairs of legs, it stores them in a constantly updated world model which keeps track of the person the robot is trying to follow.

Then the navigation part gets the location of the person from the world model and actually drives the wheel motors toward the person.

Our plan is to also incorporate the onboard camera as an additional sensor for detecting people. That way if the laser can't find a person, the camera still can.

I wrote the laser leg detect using an algorithm I found described in a research paper. I also wrote the navigation code which is getting more and more complex every day! My team mates are working on the world model code (pretty complicated because it has to match up new leg detects with old leg detects even as the robot is moving) and the camera detection code.

The craziest part of this navigation code is how much trigonometry I've had to code up. I'm going to attempt to describe what I've been working on lately, because it's quite insane.

The laser scanner returns locations of people in polar coordinates relative from the robot location. That is, it doesn't return an (x,y) of the person (these are called Cartesian coordinates), but instead returns an angle (where 90 degrees is straight ahead) and a distance in meters to the person. Polar coordinates are usually written as (r,t) where r is the distance, and t is the angle.

So, I have the relative (r,t) but I need to convert that to an (x,y) in an absolute coordinate space where (0,0) is the initial starting place of the robot. To do this, I have to do a lot of math... First I get the current robot position and also the angle the robot is facing (0 degrees means it's facing along the positive x axis).

Then I convert the relative angle to the person, to an angle in the absolute space with the following equation:

absoluteAngle = relativeAngle - 90 + angleOfRobot

With the absolute angle, the current robot location, and the distance to the person, I can determine where in the absolute coordinate space the person is at with the following:

personX = distance*cos(absoluteAngle) + robotX
personY = distance*sin(absoluteAngle) + robotY

Now, at some point the robot might no longer be able to see a pair of legs. In that situation, I want the robot to go to the last known location of the person. To do that, I get the current robot location including its angle, and basically work backwards from the personX and personY that I calculated above...

First I find the absolute angle and distance from the robot to the person as follows:

distance = sqrt((robotX-personX)^2 + (robotY-personY)^2)
absoluteAngle = arctan((robotY-personY)/(robotX-personX))

Then I must convert the absolute angle into a relative angle from the robot (again where 90 degrees is straight ahead).

relativeAngle = absoluteAngle - angleOfRobot + 90

And at this point the robot has enough information to drive itself toward the last known spot of the person.

Last night I tested my first attempt at this code, and it didn't work very well. Actually it wasn't doing the steps I described above, I was doing the relative to absolute angle translation wrong which meant the robot would act crazy once it lost the legs. I had to really think hard about what was happening, and I came up with the plan as I just described. I've coded it up but I haven't been able to test it on the robot yet. I'm planning on going into the robot lab later today to try it out!

As I recall it, 1998 was a good year for Elmore Leonard. At least it was a good year for me and Elmore... A silly summer TV show called Maximum Bob caught my attention and when I realized it was based on a book by the same author that wrote Get Shorty, I decided to give him a look. I feel like in that same time span, Out of Sight and Jackie Brown (two movies based on his books) also came out, so yeah, I planned to check him out.

I read Get Shorty and Maximum Bob, and then I proceeded to burn through most of his 30+ books. And since then, I've faithfully read his new books as they come out.

The funny thing is I don't really remember many of the older stories anymore, but one scene is forever blasted into my mind. I'm pretty sure it was in Glitz... the main character (I think he was a cop or detective) is walking an arm full of groceries to his car when a thug confronts him. The cop doesn't handle the situation well and ends up getting shot. Later he thinks back and wonders "why didn't I just throw down my groceries and shoot the guy?" or something like that. He didn't even consider it an option at the time, because ya just don't throw your groceries... the eggs might break!

Now whenever I'm carrying groceries, I think "man, I'd effin' throw these groceries so hard if someone attacked me right now!!" Fortunately for the groceries, the situation has yet to arise.

Today is kind of my birthday... I mean I was born on May 22nd, and today is May 22nd in Australia. But then I was born in America, where it is still the 21st. So I don't know if I'm actually 30 yet...

Kara gave me GTA IV as a present and I'm excited to play it. I've never been 100% sold on the GTA games, but everyone raves that this one has amazing depth and it is a landmark in gaming. Since I'm a gamer, I suppose my hands are tied! I have a US 360, so Kara had to ship the game here from America due to region restrictions. A few interesting points about that:

* The Australian government rates all games and movies (unlike America where ratings are handled by the industry). The highest video game rating in Australia is MA 15+ (aka suitable for 15 year olds) and any game that doesn't meet those requirements is actually BANNED for sale in Australia! This ain't America, folks! So, the version of GTA IV released here has actually been censored so that it could achieve the MA 15+ rating. I'm not quite sure what the rules are about importing a game that is unrated by Australia, but we pulled it off anyway...

* PC and console games are rediculously expensive in Australia. If I were to walk in to EB Games and buy GTA IV, it would cost me $120. INSANE! And here's what's even crazier... Kara bought the game in the states for $60, and had it shipped over here for $13 for a total of $73 USD. Convert that to Australian dollars and the cost was $76. It was actually $45 cheaper to import the game from America rather than going to the local game store. I wonder if importing is the norm here, at that price difference I imagine it's quite common.

I stumbled across this song today and was surprised how much it meant to me. It sums up exactly how I've been feeling lately...

Random Photo