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.

2013-08-15

GUADEC '13

Got back from a sunny and very hot Brno this last Thursday. It was my first GUADEC ever and apart from the heat (which I just couldn't take for so many days in a row) it was absolutely amazing.
I watched a lot of interesting talks (and I'm still catching up on the talks I missed via Superlectures). In particular I found the OwnCloud talk by Jan-Christoph, the Hi-DPI talk by Alexander Larsson and the Sandboxed applications for GNOME talk by Lennart Poettering extra interesting. Of course Zeeshans talk on GeoClue and Maps was very nice too. :)

I also attended the Maps & geolocation BoF. We talked a lot on how to do search, present POI's and more, but more important to me is that we decided that we wanted to give GraphHopper a try instead of OSRM for routing. This decision was made since GraphHopper has a stated goal to support GTFS import as well as OpenStreetmap (making me not having to implement public transportation support in Maps as plugins but rather as normal requests to GH), its demo server supports biking and pedestrian in addition to car and the system requirements for running is a little less ridiculous than OSRM. I've sent a mail to the GraphHopper list to start a discussion on how I can help there but apparently the main developer is on vacation so I'll have to patiently wait for a little bit.

Other than that GUADEC was of course also a very social event and it was very nice to be able to talk in person to all the people I usually interact with on IRC or Google+. 


2013-07-18

GSoC progress

It's been three weeks since I last blogged about my GSoC project on implementing trip planning in Maps. That's way too long and unfortunately I don't have any demo-able progress to show. So what have I been up to this time?
I spent the remaining two days of week 26 trying to style the zoom controls that I mentioned in my last post according to mock ups. My thought was that I could just group two GTK+ buttons in a container, put that inside a ClutterGTK actor, add it to the map and then it would be easy peasy to just throw in some custom style classes in gnome-maps.css to make the buttons look like they should. Well the first part was easy, the styling however felt next to impossible and I eventually decided to post-pone it until I could find someone to ask for help on how to do this. Later on new zoom control patches were added to Bugzilla by Jonas¹ that just rendered the buttons using PNGs extracted from the mock ups. It pays off to be pragmatic, something I could learn from.
The following week was spent in bed with fever, coughs and Final Fantasy III on my Nexus 7.
The last 1,5 week I have been working on fixing a bug in Maps where we wouldn't pan to new user locations as they are retrieved from GeoClue. During the debugging process I tried to also do some cleanups as I had trouble understanding the code that dealt with the user location tracking. I pondered more than once over doing some rather massive changes to the code base but in the end decided to think some more about this when I'm in less of a hurry to finish what I promised would be done for midterm evaluation.
Next Thursday I will be going to Berlin to hang out with my girlfriend and some friends and then continue to GUADEC on the 31st. By then I need to be done with some working OSRM routing patches. Fortunately it is mostly hooking up some GUI left.

--
1: Jonas is an old friend of mine who recently decided to start contributing to GNOME by browsing through Bugzilla and fixing random bugs here and there. This makes me glad. :)

2013-06-27

My summer

Hi Planet Gnome!

My Google Summer of Code project got accepted (yay!) and I just got syndicated on Planet GNOME so here's an introductory blog post about me, Maps, my project (trip planning in Maps) and my current progress.

About me

I'm a computer technology student and hacker based in Gothenburg with a passion for maps, open data and free software. I've been a GNOME lurker for many years and it feels really good to finally take the jump and start contributing. I've also worked on maps in a web development setting as my day job for the last two years.

Some history

I actually started working on Maps way back in march after a really inspiring chat in the hallways at FOSDEM with some core GNOME people. I quickly got overwhelmed by everything I had to learn just to bootstrap the project though (jhbuild, autoconf, gir and gjs comes to mind) and I almost gave up. Fortunately Zeeshan (my gsoc mentor) also was interested in working on Maps and started implementing the basics of a map client. With the help of Zeeshan and Paolo (who also joined us on IRC) I started learning more and more how to work in a gnome project and soon produced my first patches.
At around this time I realized I could apply for this seasons GSoC since I would be unemployed this summer, still had some courses left on my Computer Engineering degree and also wanted to work full time on GNOME for a while. Zeeshan said he wanted to mentor me and here I am!

My project

My project is about implementing trip planning in Maps (the whole proposal can be read here). Specifically I aim to implement fastest route searching for going by foot, bike, car and public transportation. The first three cases will depend on the awesome OSRM project and the last one will most likely be implemented via city-, region- and country specific plugins.

Progress

My hope was to be able to use all of the community bonding period on hacking since I got kind of a head start this spring. Unfortunately I'm easily distracted and a long list of various small tasks (gsoc- and non-gsoc related) took a lot of energy and focus in late May - early June. Good news is that I'm now gaining speed and has been doing code cleanups and working on implementing the sidebar and zoom control designs provided by Andreas and Fabiana for the last couple of weeks. 
You can follow my work in the wip/osrm-routing and wip/zoom-control branches for now. 

Final note

Please come say hi to us on #gnome-maps on irc.gnome.org or subscribe to our mailing list (very low traffic). Also, if you're coming to GUADEC this year and want to have a chat about Maps or anything in general please just say hi, I'm quite friendly. :)