Use the FRC Control System to drive a car with an iPhone

In case you were searching for more ways to reuse for FRC control system, Waterloo Labs posted a new video demonstrating how to control a car with the FRC-cRIO and an iPhone/Laptop/power wheels.

http://waterloolabs.blogspot.com/2009/11/driving-car-with-iphone-episode-3.html

More on how this was implemented
http://zone.ni.com/devzone/cda/tut/p/id/10507

Let the safety flame-war begin.

This would be a great thing to do in the FIRST offseason, with all this hardware laying around, just begging to be played with. Not to mention a great way to train the new kids on everything.

New fundraiser idea: remote control demolition derby. We could get the career center’s auto body shop to help!:smiley:

Wow cool.

I’m really interested in how they got the iPhone to control the car. I’ve always wanted to do something like that to control our robot (not during competition, of course), but I wouldn’t know where to begin. Ideally, I would not have to put new code on the cRIO, and just have the iPhone run a “Virtual Driver Staton” app (like the one shown here http://www.chiefdelphi.com/forums/showthread.php?t=75431&highlight=virtual+driver+station).

Has anyone done/tried anything similar? Thanks!

They just posted a new video about how the iPhone part works, might answer some of your questions.

Sweet thanks, i’ll check it out.

I wrote an app to drive 971’s robot. I reverse engineered the driver station protocol and wrote an iphone app to drive. I’d say joysticks work a lot better. I steered by using the ipod like a steering wheel, and had an onscreen throttle and ball manipulation buttons. I found that I ended up just pegging the throttle full forwards, and then steering, which didn’t work all that well when playing another robot in a practice match.

To do it, you need to either jailbreak your iphone/ipod, or pay for the $99 developer fee for 1 year worth of licensing, mess with all the encryption, and use a mac. I wrote an app for work over the summer, so I already had access to a developer key and a fair amount of knowledge on how to do the graphics.

I’m really bad at remembering this kind of thing, but I’ll see if I can get a video up online.

I wouldn’t be surprised that the joysticks work much better. I’m thinking of doing this more for a wow/cool factor, rather than functionality.

Thanks a lot for the info though. I’m looking forward to seeing that video :slight_smile: Sounds cool.

Here’s a video of me driving 971’s bot with the iphone app I wrote.

That’s pretty sweet. Thanks for showing the vid!

Did you need to put any special code on the cRIO, or not since the iPod Touch was emulating the DS, like you said earlier?
Also, were both the iPod and the Gaming Adapter on the robot both connected to the blue router?

Thanks again :slight_smile:

I didn’t have to load any special code.

Yes. Since the whole control system is just a network with devices on it, all I had to do was get the ipod and cRIO on the same network.

Okay thanks again!

Any chance you’ll be releasing the app?

-RC

After reading through the article my first reaction was… gee I hope one of those Jags doesn’t burn out for some reason and lock the accelerator in the “on” position. Could be problematic. :ahh: :rolleyes:

Very cool idea regardless though, even cooler with the different kinds of portable devices you can link to it as well. Just need webcam feedback and you wouldn’t even have to be near the thing to drive it! :rolleyes:

The current implementation hard codes the specific buttons to drive 971’s bot, and provides no way to change what virtual button acts like what physical button. If you would still be interested, understanding that you would have to change your code on the robot to use the stick mapping that I hard coded into the app, I can work on getting it on the app-store as is. (I might change the colors …)

Or, if someone has ideas about an easy way (in terms of developer time) to set which buttons do what, I’m all ears and would be willing to implement it after Finals if it isn’t too hard.