2013-09-26

Summer of Code wrapup

Summer is over and so is GSoC. Here's a wrap up of my work on trip planning in Maps.

The plan was to implement fastest route searching for pedestrian, car and bike via a service called OSRM and then in the second period implement support for public transportation via a plugin interface.
As I later found that the public OSRM-server didn't have profiles for pedestrian and bike installed, I turned to other solutions. I rediscovered GraphHopper, which is another fastest route search server that has made great progress recently. The developer of GraphHopper also has a stated goal to add support for global public transportation, which would mean less maintenance burden inside Maps.
After discussions at the geo-BoF at GUADEC I switched focus a bit and started re-implementing most of the code to cater for GraphHopper instead. The idea was that I then would use any remaining time working on the public transportation code inside GraphHopper.

So how much of this did I actually complete? The answer is less than I hoped, but the current status of my git branch is that searching for and showing a route via markers on the map works, I can pan between turn points¹ by clicking on the instructions in the route sidebar and I can clear the map from the route again by pressing the sidebar close button.
What isn't finished is support for switching between transportation mode (it's all there, it just needs to be hooked up with the UI) and searching for new from- and to locations via the sidebar. I haven't had time to work on GraphHopper at all (but me and Andreas had a really nice Skype call with the developer during a small hack weekend in Gothenburg in August). It turns out that public transportation routing is hard, and adding initial support for it in GraphHopper would probably be a GSoC in its own right. But I got a lot of interesting information on the problem as such and a link to a research paper and some recorded lectures on this from the University of Freiburg. My plan is to start working on this during the 3.12 cycle and see how far I can get.

I'm not entirely satisfied with my results this GSoC, I really wanted to get more done. I think part of it can be attributed to me underestimating the problem but there's also other stuff.
I've realized that working from my bedroom is a good way to not get things done. I've always had some problems with stress and procrastination and working alone in a space where I also spend my spare time has been a recipe for disaster (or at least for not getting stuff done). I've known this during the whole GSoC but I never found another place to work at².
During mid to end August I got up to pretty good speed but then some sad personal stuff happened followed by a family tragedy³ and then I realized I wouldn't be able to finish in time.
It's been a rough end of summer, but that's just how it goes sometimes I guess.

At this point I want to state how grateful I am to have been able to participate in this years Summer of Code. It's been a dream for a long while to be part of this community and people have welcomed me with open arms. Being able to go to GUADEC and meet amazing people like Andrea, Zeeshan (my awesome mentor!), Allan, Jon, Meg, Paolo, Sindhu, Bastien and many more in person was just wonderful. Extremely inspiring.
Being able to focus for a summer on finally learning how the GNOME stack fit together and understanding how important parts like GObject, GTK+, GTKBuilder and Clutter fits together has been very rewarding.

Finally I want to put out some thanks:
  • Zeeshan — it's been a pleasure working with you!
  • Andreas — for being a good friend and a good source for design talk
  • Fabiana — for the good design chats at the first hackfest and for being an all around nice person :)
  • Kalev — for being an inspiration to all GSoC students (that's a guy that Gets Things Done™)
  • Paolo — for all the GTK+ help in the beginning stages
Also here's a little demo of the current state of things:
As always the code is in the wip/routing branch until I finish it up enough to put up on Bugzilla (Real Soon Now™)

Until next time!
--
1: this isn't implemented in GraphHopper yet so I had to test with some random data
2: Andreas very kindly offered me to work at his place but that was late during the project
3: feel free to ask me on IRC if you're interested, I don't want to expose everything on this blog though.

2013-09-14

Last sprint

I'm currently working hard on finishing up my GSoC in time for soft pencils down on Monday. It's coming along nicely but I still anticipate some pretty long hacking sessions this weekend. :)

Since my last post I've been working on getting the sidebar up to shape. A video says more than some-arbitrary-number-of-words so here's a demo:


Todo-list for Monday

  • Hook up the transportation mode buttons to actually change mode and make new requests to GraphHopper.
  • Make the label text inside the marker bubbles wrap
  • Fill in the To- and From entries
  • Make the To- and From entries work like the search bar. 
  • Figure out why the map view lags when a route is loaded

If you want to test the current state of the routing branch (using JHBuild) do the following:

$ cd /path/to/jhbuild_checkouts/
$ cd gnome-maps
$ git checkout wip/routing
$ jhbuild make
$ jhbuild run gnome-maps

2013-09-03

Moving to GraphHopper

After GUADEC I decided, in conjunction with my mentor Zeeshan, that Maps should move from OSRM to GraphHopper for fastest route calculations. The main reason for this, among others, is that the public instance of OSRM doesn't support biking or pedestrian transportation profiles¹. Read more about this in my previous blog post.

So the last weeks I've been working on re-implementing the routing in Maps to use GraphHopper instead, but also to accomodate for lessons learned during this time. I'm happy to say that the new code is turning out pretty good and that I because of this actually have a demo to show you.


This shows me searching for a route from somewhere close to New York to Baltimore. Notice how the route changes when I change in which way I want the trip to go.

Next up is resurrecting and finishing the sidebar code I worked on before GUADEC, polish up the markers and post patches to Bugzilla. After that I'll work on testing the code for corner cases and polish the UI even more. Later this fall (after GSoC) I plan on working on adding GTFS support to GraphHopper so that we can get proper public transportation support with wide coverage.

--
1: OSRM actually has support for this, the public instance is just not set up for it.