Robot swarms and you…

December 19, 2008 at 1:04 pm

I was checking my RSS feeds today and came across this article about swarm robots, with this video attached:

It kind of reminds me of an episode of Numb3rs where Charlie uses swarm bots to map out a train to allow rescue of the passengers. I know that it’s well-meaning research and all, but I can’t help but laugh at the video. Not because it’s overtly funny, but rather because of how it all comes together, and because the look on the girl’s face. Well, watch it and find out. Now, robot swarm, my name is Chris Hansen, why don’t you  have a seat.

Catchup post

July 8, 2008 at 12:49 am

I know, I’m terrible at keeping up to date on these blog posts. What usually happens is there’s something I want to post but don’t want to take the time to do it right now and it gets permanently stuck in my queue of stuff to do. Then I want to post about something else but don’t want to go out of order. Then it gets to be 9 months later and I post a large backlog of things. This is another one of those posts.

After Defcon and Robogames last year, Joe and I were pretty tired of working on projects so we took some time off to do some non-project related things. It’s a lot easier to get projects done when you’re in college and only have to be at school 15-20 hours a week versus having full time job and obligated for 40+ hours a week. However, it’s also nice being able to afford things rather than being stuck with a shoestring budget. I guess it’s the old catch-22 of having enough time or enough money, never both.

To celebrate my minimum spare time, I decided to remake the Tournament Software I use to run the robot tournaments with WPF (instead of PHP). The initial reasoning behind doing it in PHP was that was what I was most familiar with and that I wanted people in the pits to be able to look at the brackets, etc over wi-fi without having to bug me. However, that aspect never got used and the software was hard to work with if there was any problem whatsoever (entered match wrong, or someone shows up late). I’ve wanted to learn WPF for a while, and this was a good excuse to have a project to do that with.

The new program is a lot easier to run, and the data is a lot more manageable. As a first WPF project it turned out pretty good, even though I’m not doing enough stuff the “WPF way” and didn’t accomplish all of the goals I had for it, namely the ability to integrate in with video mixing software so that the matches could be recorded and high-quality overlays for who’s fighting and who’s next. I must say though, WPF is nice, and LINQ is even better.

I used the software successfully at the CSUS event “Smackdown in Sactown” in April, and again at Robogames in June after making a few changes to support multiple brackets, among other things. Joe and I were kind of burned out of combat robots, so we didn’t enter any. Both Emsee Fry Pants and Big Bloom were out of commission, and we didn’t want to rebuild them.

Instead of working on another combat robot, we decided to focus our efforts on this years Defcon robot. We decided that it would be a good fit to have the shooting gallery event from Defcon at Robogames and suggested it to Judge Dave. He agreed and we decided to host the event by making the arenas for it and organizing the matches. Unfortunately, in doing so, we ran out of time to finish the gun before Robogames. Instead of doing a half-assed job with the arena and the gun, we decided that it would be better just to get the arena built properly and relax a little bit on the weeked, so we ended up just hosting the event and not competing in it.

Part of the problem with the gun is we got a late start on the design process. We are trying to address all of the problems from last years gun, and the biggest one was inaccurate pan/tilt. To address this, we bought some stepper motors to replace the servos. The second was the cardboard facade, which is being addressed by a frame made of a non-cardboard material. The manufacturing of the frame was delayed a while, and by the time the pan/tilt was fully assembled, there was only a few weeks left until the competition. And then there was still the matter of creating another custom hopper for firing and mounting all of the electronics. All of the delays added up to us not finishing it by Robogames. However, it gave us a big head start instead of doing the same thing before Defcon. And believe me when I say it, this years gun will be really impressive.

However, in the mean time, we decided to do a smaller projects with less pressure. One of which is a autonomous slot car. Basically it is a car that can decide for itself how fast to go around the track based on an accelerometer measuring the cornering g-force. Joe sent of a while ago to have a pcb made for it, and after diagnosing and fixing a problem on it (the transistor was in the wrong place) got it working. This last weekend we took it down to Fast Track Hobby and tested it out to see how well it worked. For the initial prototype, we decided it would only react to changes and see how well it worked. As it turns out, the car needs to be able to memorize the course and be able to react before the course changes (or add a camera and detect it early; the former sounds easier though). It was able to successfully navigate the track without flying off and slowing down on the corners and speeding up on the straightaways, however we needed to turn the max speed down in order to have it not fly off on the first sharp corner after a long straightaway. We took some pictures of the course and the autonomous slot car, as well as some video:

On another weekend, we decided to measure how fast Joe’s Corvette was by creating a G-Meter. Instead of creating something fancy, we decided to just use the sample development board for the development kit we got for free (plus shipping and handling) for a freescale microcontroller that happened to have an accelerometer on it. I created a quick application in WPF on his laptop that parsed the serial data that it was sending and displayed it in a few hours, and we took it out for a spin on the freeways to see what it could do.

I’ve also been listening to podcasts in my car in my commute. Some of the podcasts I listen to are TWiT, .Net Rocks! and NPR’s Science Friday. In fact, one of my comments to .NET rocks was read on the show and I got a free mug from it. It’s a nice big mug too, that can hold a lot of tea. For those that are coming to this blog from the show, I’ve done more robots than just the sentry gun below. Also I’ve been listening to audio books from Audible (one of TWiT’s sponsors). Specifically the one I read (or listened to, rather) was The Time Traveler’s Wife. It was a really good listen, and I hear they are making a movie based on it which I’d be curious to see how it turns out. At least Will Smith isn’t in it, since he has a good habit of being in movies that bastardize the originals they are based on (iRobot, I am legend, Wild Wild West, and to some degree Hancock) and make them into more mainstream movies but missing out on the point of the originals. One of the problems with listening to audio books though is getting behind in the podcasts.  That book was 18 hours worth, and it caused me to get around 2 weeks behind. With taking a day of vacation and 2 sick days off between then and now, it’s made catching that much harder.

This is the end of my catchup post. I’ve created a Twitter account that I’ve updated somewhat more frequently than this blog. You can follow me on Twitter, and maybe some day I’ll get popular and catch up to Kevin Rose. I could also win the lottery and become a super-millionaire.

Also, I’m hosting some videos from Robogames 2008 on my website. Right now it’s mainly high-speed (aka slow motion, like they do on MythBusters), but the compilations on the bottom right are pretty good.

Defconbot video

September 3, 2007 at 11:25 pm

Over the weekend Joe and I made a video showcasing the sentry gun we made for defcon. See the defcon bot on the right side, or read the digg story

Back from DefCon

August 14, 2007 at 4:49 pm

We got back from DefCon last weekend. Our Sentry Gun didn’t do very well (tied for last place), but the trip was a lot of fun overall. We knew before we went that we weren’t going to win, so coming in to it with that mindset made it a lot more enjoyable.

The robot was mostly finished a few weeks before the competition, which was good compared to the 30 pound combat robot where we stayed up until 2 am the week before the competition and barely finished a functional robot in time. This was also nice in that Joe was going to summer school every weekday, so the only time we could work on it together was on the weekends. The biggest part remaining at that point was just optimizing the software, which I could do during the week and then do minor changes to the gun itself during the weekend, like getting a single power supply with appropriate connectors rather than having 3 separate batteries with alligator clips to power the gun.

There were a few hurdles we had to overcome to make the gun function properly. Originally the intent was to have a single fixed camera, and calibrate the gun based on that. However, the servos aren’t very accurate when commanded to go to a particular position from another. Going to position 2000 from position 2300 was up to a couple inches off from position 2000 from position 1800. It was possible to change it so that we could manually make it go to the same spot from different approaches (instead of 2300 -> 2000 -> 1800 -> 2000, we did 2300 -> 1992 -> 1800 -> 2008), but after running the gun for a while, what was working a half hour ago to make the gun go to the same position, doesn’t work now (now required 2300 -> 1990 -> 1800 -> 2010). To solve this, Joe glued the camera on to the gun itself, and I modified the algorithm to use this. The down side to this approach though is it takes a lot longer to go to a particular position because it has to move, then see where the target is, then move closer, then see how close it is, then finally move again and then see that it’s in the right spot.

Another problem we were having was due to the way the gun was created, in that there is a servo that pushes a switch that triggers the air valve. Occasionally the solenoid in the valve triggering would cause a big EM pulse that messed up the USB <-> Serial converter we were using, requiring it to be unplugged and plugged in again. However, this happened when the servo was contacting the switch, so the valve was stuck open until the serial port could be reattached and the servo moved away from the switch. Luckily this didn’t happen at the competition though.

The weekend before the competition we created a façade for the gun to make it look like a sentry gun from team fortress (well, Zach and Joe did; I mostly watched). The original plan was to make it out of pieces of plastic, but when we actually started to mount all of the parts it was way too heavy for the servos, so they decided to make it out of cardboard instead. It turned out really nice for being made out of cardboard.

The trip to Vegas was pretty nice. All three of us bought a Nintendo DS and Mario Kart DS before going and we played that on the airplane. I still don’t like Southwest though, as the boarding procedure is what my family calls a “Cattle Call” to find seats. We found 4 seats near each other, and someone with a shirt that was something like “I’ve got the root password to your box” sat down next to Joe and Jamie. I commented that I bet he was going to Defcon too, and it turned out that he was.

We arrived Friday morning and Joe and Jamie went to get the air compressor and pick up the package from the hotel while Zach and I went to a talk on SQL Injection and out-of-band channeling. We got there late so we missed the introduction (luckily I knew what SQL injection was already, but Zach didn’t). It was a very neat attack as it allowed data to be leaked out of the SQL server than would be allowed in a normal SQL injection attack, and in places that injection wouldn’t even allow data to get out of the system. I’m trying to be vague here as not to confuse, but suffice it to say, I was pretty impressed with it.

After the talk, we met up and assembled the gun and took it to the practice area. It was both nice and awkward carrying the gun down the hotel lobby, as some people were like “woah what’s that, that’s cool” while we were walking down the halls, and then there was hotel security I was wondering what they were thinking. They didn’t say anything though, so we proceeded to the practice area. We did a bit of firing and tuning to get the system to work a little bit better. When we were satisfied that it would knock down the targets, we packed it up and took it back to their hotel room.

Then Zach and I went to another talk about how to use FPGAs to speed up brute-force attacks. I was thinking it would be more of an introduction to them, and how they worked, but the speaker just skipped over that because “a lot” of the audience had seen his previous talk(s) (it was about one in four), so the talk was mostly “Here’s me running this code on my laptop.. look how slow it is. Here’s me running it on the FPGA.. look how fast it is,” and the different things that all used the same kind of encryption (Bluetooth, and a few others). After that we went to a talk on how to hack the ECU on a car. It was a really interesting talk as he talked about the different settings in them, and the history of the different ways to do it: purchase a completely custom one, fake out the sensors, or reflash the current one, with the reflashing being the current method. He also explained what the different kinds of things meant, like the fuel mixtures at different RPMs and loads, and had a few analogies to the Dukes of Hazard. I think Zach liked that one the most, as he could relate to it the most.

After that Zach and I did a bit of walking down the strip (Joe and Jamie were already down the strip somewhere when we went to the talk). On the Defcon web site it said that Las Vegas is hot, and they were right. Even at 9-10 pm it was still hot enough to sweat. It was nothing like Sacramento where it gets cool in the night. We were hungry so the first stop was to get some food. Originally I wanted to go to Dennys, but we decided to see what else was there. We ended up making it to a place called “Strip Burger” which was on the Strip (not because they had strippers; I was slightly disappointed that there weren’t). The burger was pretty good, and I got a raspberry something on the waiter’s suggestion (it had mint leaves in it, which was slightly disturbing). Then we went and saw one of the shows on the road with a siren ship and a pirate ship – apparently women can cause another ship to sink simply by dancing in the show’s alternate reality. It was incredibly cheesy and we didn’t have a good view. We continued on and went into Caesar’s Palace and saw a bunch of stores that sold things which we couldn’t afford, and one of the talking statue shows. The animatronics were pretty neat. After that, we decided we would each get one of the “Yard Long Margaritas” or something to that effect (I think it was 40+ oz), and proceeded to drink most of them before getting back to the hotel.

On Saturday we went to the contest area again and set up our gun for the contest itself. In our first round we went against the winners from last year. Our gun had only shot down one target before they got to their last target, but their gun jammed and we managed to shoot down 2 more before they got their gun un-jammed and finished off the last target. Our second round we went up against a two-gun team that didn’t seem able to hit targets by aiming at them, so it just sprayed bullets everywhere, and they managed to knock down more targets than us, so they won, even though we were 100% accurate. There was supposed to be black targets to discourage this, but there weren’t any so they took advantage of that and beat us because of that.

Zach and I went to a few more conferences on Saturday. One was about how the radio signal used to tell GPS devices of road conditions works, and how to broadcast it. It was a really nice talk because the presenter was a good speaker and pretty funny to listen to. One of the things he mentioned was how it’s possible to send fake alerts to a particular car that says there’s a road is closed because of an air raid, or maybe bull fight instead (along with a bunch of other reasons). The next talk we went to was about identification devices (like smart card readers, fingerprint scanners, etc) to get in to buildings, and how easy it was to hack them (essentially unscrewing the plastic cover and installing a “tap” on it by cutting a few wires). He gave a nice demonstration of the device he made and how it worked. This speaker was a very good presenter as well and very funny.

On Saturday night we went and saw Penn & Teller at the Rio. We took a taxi from the Riviera to the Rio (which was my first time taking a taxi actually) and made it there about an hour ahead of time. Originally we were going to take the bus, but we didn’t realize how long it would take. We had pretty good seats: close to the front row of the balcony, right in the middle. The show was as amazing as I could have hoped for; with the exception of one or two parts (I’m not really interested in juggling or fire-breathing).

On Sunday, we didn’t see any more talks and instead went to Denny’s for brunch, then took the air compressor back and then headed off to the airport. I originally wanted to have a later flight because I wanted to stay a little longer, but I didn’t really feel like staying there by myself, so I went with them to the airport and just played my DS while I waited for my flight. It would’ve cost like $200 to move my flight up, so I decided it wasn’t worth it and just waited a little longer.

Overall the event was a lot of fun, and we’re definitely going to do it next year if we can. For our next gun we’re going to try to build it with a more reliable control system (stepper motors most likely) and probably a gun that doesn’t need to be calibrated, but rather just works, so probably something powered solely with air to fire and load the next pellet. I have a few ideas on how that’s going to work. Also Joe is looking in to another camera, even though the one we have worked pretty well. I think the main upgrade would be a cleaner image and a controllable zoom so that we’re not wasting 75% of the camera area on the surroundings of the arena.

Back from Robogames

June 30, 2007 at 2:05 am

We made it back from RoboGames. We lost both fights with Big Bloom. The first fight was against Billy Bob, a vertical drum spinner, which took a bunch of big chunks out of our frame, however it seemed to hold up pretty well since it’s half-inch thick, and the chunks were only a sixth of an inch thick at the deepest place. He cracked the polycarbonate piece on the top though after a big hit. We ended up losing that fight because the screws that hold the motors in came loose and the gears didn’t mesh any more. In our second fight we fought a wedge. We didn’t finish the melty brain on the final version, so it was a sit and spin. He charged at us and we made contact and threw each other around the arena a little bit, but we had some problems with using bluetooth to control it. It came disconnected after going out of range, or taking a big hit and bumping the power switch on the receiver. However, the bluetooth stack on the PC causes the program to freeze when this happens and you try to disconnect the serial port. I think that it’s trying to close a port that it already closed, so it blocks infinitely. I restarted the program really quick, but we got counted out and right after that happened we gained control of it and it started moving again. Oh well. For the next version, we’re going to use a standard Spektrum transmitter/receiver for r/c, and have the bluetooth only for debugging.

The next project that we’re working on is going to be the DefCon Bot. I’ve put a description of it up. It’s not quite finished yet, but I should finish it pretty soon (the description that is). We finished getting the hopper mechanism working yesterday, so as soon as we receive the pan/tilt servos, we can start testing it out. I have been working on getting the algorithm to determine what order to shoot the targets down in. This is what’s known as the Traveling Salesman Problem in computer Science, and is intractable for finding the most optimal solution (essentially unfeasable to do the calculations). However, I have created a heuristic for this and made a demo program that generates random points and gets a relatively optimal solution and “shoots” down the targets in order.

At work, I’ve got a project that involves a GPS antenna on my desk. However, there’s no real place to mount it, so I stuck the mounting pole in the corner of my cubicle. However, the side effect of this is that everybody that walks by asks me what it is. The most common thought is that it’s a sprinkler.