Last week, I wrote a short Python script that uses a USB GPS device under Linux to help with navigation. It doesn’t have maps or anything — it just gives distances and, while you’re moving, the direction to the destination (as in “two o’clock”). It prints this info on the terminal and speaks it using speech synthesis.
I joked about this in Comic #407, but it’s actually a pretty practical way to get around. Just knowing what direction something’s in is a huge step toward finding it. This past week I’ve used it successfully to find my way around towns I don’t know, and we even used it while driving to navigate to an out-of-town destination.
Plus, there’s the bonus that when you’re walking, wearing an earpiece, laptop in the bag, listening to the computerized voice whisper “TARGET DIRECTION THREE O’CLOCK DISTANCE ONE POINT THREE KILOMETERS ETA FIFTEEN MINUTES” into your ear, you feel like a cyborg. I’ll have to set it up with a female voice and rename it “jane.py”.
Edit: I’ve just been testing the recent changes to this script, and it’s really not in a condition where I should be posting it anywhere. But if you can use it as a starting point for hacking, here’s the link. Some of you might find it useful sometime soon.
First, the current captcha says Howard’s Malmstrom, which is pretty much the coolest thing ever.
And secondly, I’m going to go ahead and register ‘Jane’ as a project on Launchpad. I’m thinking of a modular python audio UI ala emacs-speak, but just for updates.
…
Actually come to think of it, one could just plug *your* program into emac-speak and create the same thing.
And Jane is born
One of the professors at my university did something like this.
They had an ipod with linux on it and some sort of gps device (It was a while ago I heard about it) and it played music just like normal, except it seemed to come from the direction you were to go in.
There are some java based gps apps for phones. I’m now trying out the free (with a 3 sec ad) j2memap. Just using the compass display in combination with a bluetooth gps device (including logger) always brings me to the destination. Problems are bad gps reception due to slow walking speed and high buildings. And you have to apply the rule that any surface is walkable as long as the inclination is less than 45 degrees.
The question is, does anyone know how to program such java apps that handle bluetooth gps connections? It shouldn’t be so hard to expand the program so that it plays prompts through a connected earpiece.
How long after these exist until someone hacks them?
“Turn right here.”
(After turning right)
“Hah, you moron, I didn’t say Simon says!”
or reprogramming it so all roads lead to sextoy shops or giving distances in umbrella steps.
Other random messages:
“Wizard needs food!”
“Warning, proximity alert! Raptors at 6, 9 and 3 o’clock! Take evasive actions! Oh my God they’re everywhere! We’re going to die!”
The last one should probably not be given in the middle of traffic circles or on bridges.
Why not do a parade of a lot of people loaded with glow sticks and phosphorus paint running through the night to a fixed location. would make some freaky Satelite pictures.
This could be used for good or evil, Like misleading people who want to find a whorehouse but instead send them to their mothers, or those who want to see their mother being sent to a whorehouse. And if someone wants both then we send them to a psychiatric hospital.
make it so you have to do math to figure out where your going or make a code that only you understand. and make it so that if there is somthing directly between 9 and 10 you have raptors attack you
Well, this is gonna be cool. I’m putting it on a Nokia N800 internet tablet with Bluetooth GPS and headset. Totally cyborg, and no backpack required. It’ll be perfect for geohashing. I should even be able to make it connect to mpd and fade down the music while speaking… This will be FUN.
BTW, Randall, if you haven’t, you should really look at the N800 and N810; the N800 is around $200 these days, and you’ll _never_ regret it.
I’d recommend it over an N800 to most (technically inclined) people. 800×480 touchscreen, 802.11b/g WiFi, BT, USB OTG, 2xSD, and most importantly, *Linux*, all on a 400MHz ARM in my shirt-pocket.
Woah! I’d recommend the N800 over an eeePC, not over an N800…
the ETA string construction seems to have an error.
instead of “ETA x hours y minutes” it is “ETA x hours y hours”
instead of
etastring=etaprepend+str(int(eta/3600))+etainpend+str(int(eta/60)%60)+etainpend
it should be
etastring=etaprepend+str(int(eta/3600))+etainpend+str(int(eta/60)%60)+etaappend
I would also suggest to add seconds portion for times under two minutes.
the ETA stands for Estimated time of Arrival that is time you are expected to be at the destination point. What your program is announcing is different.
I don’t know what is the standard name for it. May be Estimated Time to Destination ?
Oskar: here’s why a one-time access to Google Maps to obtain the directions is not enough. You can always make a wrong turn, or find out a road is blocked. A GPS navigator will usually recalculate the directions for you if you do so, but without permanent internet access on the road, you can’t do that with Google Maps. BTW, Google Maps’ EULA disallows using it to build automatic GPS navigation systems.
This is a great idea. For me, it’s probably even better than the regular GPS navigator. With the Garmin navigator that I use, I drive the same paths over and over again, blindly following the turn-by-turn directions and never having a chance to learn what roads there are, how they meet each other etc. If I happen to be without my navigator, I can drive the same ways I usually do, but once I have to make a small detour, I’m totally lost because I remember the step-by-step directions, not the road network. With a direction-only GPS, I’d probably learn the roads eventually.
I’m currently waiting for my developer’s version of the OpenMoko device to ship. As soon as I get my hands on it, I’ll try to make an implementation of this idea, probably using a blutetooth headset to say directions,
I thought about implementing some thing like that too. It would be a great thing for geocaching.
Oooh something to put on my Neo Freerunner (if I ever get one)
MadJo: Also, if it is ever released.
I have both an OpenMoko version 1 and a nokia 770. The 770 is easier to set this up on, since it already has flite and python. I’ve done mobile java programming for years, so I could probably whip up a j2me version as well.
Now to develop some game concepts based on that.
“You are in danger. Run.”
Getting within bluetooth range counts as a “kill”. This could be good.
>Now to develop some game concepts based on that.
>“You are in danger. Run.”
>Getting within bluetooth range counts as a “kill”. This could be good.
Oh, you’re so right! This would be an awesome game! Three guys are “hunters” and one guy is “prey”. The prey receives info on the locations of the hunters every two minutes or so (in the “Five o’clock, 200 meters”-format) and the hunters get the location of the prey every eight minutes, and coming within 20 meters of the prey counts as a kill.
Give the prey a two-minute head start in an urban setting and forbid every method of transportation except by foot: The hunt is on!
This will enter a new world of awesome if the iPhone 2.0 has a GPS receiver ( http://blog.wired.com/gadgets/2008/05/iphone-20-to-in.html ).
make somthing that actually has a geocash algorith in it and it only tells you your direction to that point
Does anyone know where one can find more flite voices? I have done quite a bit of googling and have so far found none.
Alas, flite doesn’t have pluggable voices. You can port festival voices, which shouldn’t be too hard; but you have to recompile flite with the new voice. I’ve been unable to find any preported festival voices ready to drop into the source tree, so it’s only good if you really want it…
But the default’s not bad, for 8 kHz…
Of course, the .py extension isn’t strictly necessary. Then it won’t feel like you’re talking to a snake.
> Of course, the .py extension isn?t strictly necessary. Then it won?t feel like you?re talking to a snake.
Haha I laughed (although actually if you want to get picky, Python was named after Monty Python’s Holy Grail… in one of the more major Python guides, Learning Python, all the strings in the examples are Monty Python references like “Spam” and “Lumberjack”).
P.S.
I can’t stand it when the text in my parentheses is longer than my actual sentence, but oh well…
Seems you’re probably on Ubuntu (you make Ubuntu/Debian references in the code). Have you head of the eSpeak synthesizer (http://espeak.sourceforge.net/)? I’m pretty sure it comes in a default installation of Ubuntu and is pretty good. I haven’t heard flite, and it may well be much better, but if you want fewer package requirements there’s one off the list for Ubuntu people. Plus it does male and female voices and you can change the pitch and speed, etc. It even tries its best at other languages, although you obviously will have to add translations to the program, too…
Don’t know if anyone’s posted on this idea yet, but it’d be pretty cool to skip the whole Linux thing, and just get a microcontroller to operate the GPS and do the speaking thing. You’d be able to reduce the size and power tremendously.
@Alex: flite is not better; it’s designed for minimal hardware, and is about as pathetic as can be… OTOH, that makes it a great choice for low-performance, hence compact, hardware. ARM handhelds, for example.
@Allen: It’d be cool, I suppose, but you’ve gotta ask which is cheaper: the days of effort in that project, or about $200 for an N800 and a BT GPS? You probably won’t reduce the size and power below that level on your first attempt, anyway; and you do get benefits from using a pocket computer, namely, you wind up with a computer in your pocket, for all the things you might need one for…
We enjoy the convenience of attention should be paid to science and technology brought about by the
Oooh…
If you could create a small gps device to connect to an ipod with firewire, then ran something like this on iPod linux, that’d be AMAZING!
Cool.
I should look into gps for my laptop… i’m installing Ubuntu next week!
A rip off of this has already gone into production:
http://www.pinktentacle.com/2008/06/robot-teddybear-car-navigation-system/
Actually, this would make you a cyborg (more of a cyborg than you already are, that is).
I wanted my GPS to do this, but the stupid thing insists on following the roads.
Of course it would be great to connect it to other people’s GPS devices. Good way to find your friends at the mall, or in the forest, or whatever.
It would also be kind of cool to use speakers instead of headphones. See how people around you reacted to “TARGET ACQUIRED, DISTANCE SIX HUNDRED METERS, INTERCEPT IN TEN MINUTES”.
thanks..
heh, python nerd fight with references to the style guide, wow. Sorry Robin, but not even those improvements will make python code look less like cat vomit.
Very nice, I agree with DrZiro with the having speakers, mayby mounted to your bag? Also being a nerd it would be awesome if you could have GLADOS’s voice from portal telling you the directions and occasionally insulting you…
Blind people would truly appreciate something like this!
This advancement, together with a nice exoskeleton that could allow paraplexic people to walk, are great promises of a not-so-far future.
I’ve been using the GPS option on my cellphone. Sometimes it gets a little confused in needlessly complex cities like DC, but overall its very useful, and I’ve really cut down on the amount of time I spend lost.
I was just wondering, I wanted to do something like this with an arduino (carrying around a laptop seems a bit much to me, but a small device like an arduino wouldn’t be bad), I know how to hook a gps up to it (at the very least I can use the GPS Logger shield), but I’m wondering about ideas for outputing the result to the user, the only idea I have so far is a led matrix, though I suppose, I have a smartphone with python maybe I could work something with that…
In a few days I’ll be getting a smartphone with Windows Mobile OS 5, and I was wondering if somehow a GPS script could be written for Windows and put on a smartphone like that, so I was going to toy around with it for a little while. All these new phones have headphone jacks so a small phone with the GPS script could easily fit in your pocket unobtrusively and still give you directions. (Of course, the phone has its own GPS, but I won’t use that for two reasons here. 1.) That, of course, would be MUCH too easy. You can’t let the phone win. It’s like the comic “Duty Calls”. 2.) I’m cheap. I don’t want to pay for that service.) I’m gonna begin working on a python script for this for windows, because on the chance that I can’t put in on that phone an ASUS PC is definitely small enough to work that
[...] as you probably know, I am a fan of the webcomic XKCD. Back in May, Randall posted a comic and a blag article about his idea of a dead reckoning type navigation system, which every couple of seconds it speaks [...]
AFAIK java runs on windows mobile and there is a possibility to access GPS devices (internal and external via bluetooth etc) with the java mobile API.
Speech may be done with some generated speech files (think this works somehow with espeak, else speak them yourself) and an algorithm to put them together…
Think I’m going to try this out
This would be an awesome app for the Pandora ( http://www.openpandora.org/ ), especially since the Dev-Team made sure the battery is very long-lasting (:
With Python for S60, it wouldn’t be at all hard to send the GPS data as SMS messages, or if you like over cellular IP.
Think about it: to start the game, we form two teams. Each player is assigned a partner in the other, at random. We create a hash based on each player’s details and print out a big QR code of it. Everyone wears their QR codes. As you move around, every few seconds, your GPS location is sent to your partner. Jane uses this as the target, until you get within X metres with the target in your field of view, when she says “TARGET BEARING X, RANGE X; RELEASE TO LOCAL CONTROL…” and goes quiet for 30 seconds, in which time you have to snap a cameraphone image of the target’s QR code.
Each player has a list of the hashes, encrypted with their partner’s phone number, and each player is assigned another player as referee. The QR is sent to the ref, who decrypts it with your phone number and compares the hash with your target. If it matches, the ref sends everyone the “X IS DEAD!!!” message; if not, you lose a point. Too many down and you’re dead.
The winner is the team with the most players left standing at the agreed finish. I’d call it Urban Gorilla and have one team dress as gorillas, and the others as something…urban. Refinement: at the agreed finish, you start getting directions to the agreed pub.
thank you for the Ender reference
Awesome thoughts, I’ve been thinking of this for a while, I’m planning on building a web site that basically tracks your gps location via live internet updates and is accessible via a client, useful for many of the game ideas that have been mentioned already.
I haven’t been working on the project as of yet, although I believe it has a lot of potential with multiple platforms/devices, I just need to get started on it and/or get some help with the coding. I already registered the domain name geobashing.com (like geohashing / geocaching, but you *bash* people when you find them)
Anyone around, feel free to take a look at the following document, and please, email me comments or thoughts, especially if you would be interested in being a part of the development team.
Geobashing.com writeup/brainstorming:
http://docs.google.com/Doc?id=dfbpc2xf_7gmqw3tcz
Email: webmaster…aaaaat…. aximilation…dot…com
[...] Randall Munroe’s cyborg.py [...]
I thought about implementing some thing like that too. It would be a great thing for geocaching.
hi i have a oskar gps and i am trying to find any company or anywhere i can get parts for it . please help. i tried google etc no luck