Apr 1 2009

Change your desktop wallpaper

I got bored of my desktop wallpaper a few days ago, and wanted something different for a change. Here’s what I did:

My Desktop Wallpaper

My Desktop Wallpaper

If you like what you see ;) keep on reading.

The above is generated using Xplanet. However, to get everything to work perfectly you need to tweak a few things. If you wanna duplicate this, here’s what you need to do:

  • download and install xplanet from http://xplanet.sourceforge.net or use apt-get install xplanet on Debian/Ubuntu systems;
  • get the script from http://xplanet.sourceforge.net/FAQ.php#gnome2 (or use my modified copy here) if you have Gnome like I do. There’s also a KDE version available there if you still use _that_ (rolleyes). My changes account for a different projection type and some other small changes. Use their instructions to add it to your list of startup programs (Gnome2 menu -> System -> Preferences -> Sessions);
  • get the script from http://xplanet.sourceforge.net/Extras/download_clouds.py (or use my modified copy here). My changes account for higher quality cloud maps (4096 instead of 2048);
  • create a directory called .xplanet in your home directory;
  • go to the NASA Blue Marble collection and download the monthly pictures from January - December and save them into $HOME/.xplanet/world/ (or change my modifications from the gnome2 script). You have two options there: 1) download the simpler maps showing only the topography of the continents (page 2 and 3) with the oceans in a single color; or 2) download the maps which show both the topography of the continents together with the bathymetry of the oceans. My choice was 2). Downsample and rename the maps as you wish to best fit your screen. I saved my copies as world.topo.bathy.2004{01-12}.1050.jpg. You need to save yours under the same name or change the gnome2 script;
  • from the same page, download the BMNG Raw Topography picture and the BMNG Raw Bathymetry picture. You need to edit the second one to make it binary (black and white) with all continents black and all oceans (or other water spots) white. This can be easily done if you open it up in GIMP, do a select color on the continents, then invert selection, and cut. Save them under $HOME/.xplanet/bump.jpg and $HOME/.xplanet/specular.jpg respectively;
  • get a night shot Earth scene from flatplanet (my favorite is night-electric.jpg) and save it under $HOME/.xplanet/night.jpg
  • finally download my configuration script from here and place it into $HOME/.xplanet/config.

Let’s revise. You now should have the following files in your $HOME/.xplanet/ directory: bump.jpg, config, night.jpg, and specular.jpg. You should also have a subdirectory $HOME/.xplanet/world/, containing 12 files: from world.topo.bathy.200401.1050.jpg to world.topo.bathy.200412.1050.jpg. Now, you need to do one more thing, and you’re done: cloud maps. By default, the xplanet-download_clouds.py will download a high quality (4096) cloud map which you can use. However, I didn’t like the default too much because the clouds towards the poles are just mirrored from the data below them, due to the fact that there is no satellite data for the clouds around the poles. This mirroring artifact looked too weird for me, so I decided to crop the map instead (and then resize it). This results in a minor stretching artifact, but in my opinion it definitely provides a better visual aspect.

Final thoughts. The xplanet-gnome2.sh script will start Xplanet whenever you start your Gnome2 session, and will use all the images together with the current system time above to generate a new screenshot every 2 minutes for your desktop. I consider this an _extremely minor_ penalty performance. If you don’t want your changes that often on the desktop, simply change the sleep time in the script to something else.

The cloud maps are a bit trickier if you want to use _real satellite_ data. The Xplanet folks recommend using the xplanet-download_clouds.py script every 3 hours, because that’s the frequency they generate the new cloud maps with. So, together with my cropping/resizing changes, I made the following script (let’s call it xplanet_clouds.sh — note: my xplanet scripts are in $HOME/bin):

#!/bin/bash
$HOME/bin/xplanet-download_clouds.py /tmp/clouds_4096.jpg
/usr/bin/convert -crop 4096×1700+0+174 /tmp/clouds_4096.jpg /tmp/clouds_custom.jpg
/usr/bin/convert -resize 1680 /tmp/clouds_custom.jpg $HOME/.xplanet/clouds.jpg
rm -f /tmp/clouds_4096.jpg /tmp/clouds_custom.jpg

and then used crontab -e to add the following entry:

0 */3 * * *  path-to-your-xplanet_clouds.sh-script

Have fun.


Mar 17 2009

ESP game

If you have no clue what the ESP game is, and are in the mood for a nice talk from Luis von Ahn, click here. He talks about the Internet, labeling images, etc. This particular talk is from 2006.


Mar 16 2009

Fresh out of Japan: HRP-4C

http://www.dailymail.co.uk/sciencetech/article-1162402/A-cyber-sensation-Worlds-robotic-model-star-fashion-show.html

I’ll let you be the judge of it.


Mar 14 2009

Door detection and opening

The first steps towards the PR2 robot autonomously detecting and opening doors have been taken! :)

WG Demo #2

You can also try here if the above link doesn’t take you directly there.


Mar 2 2009

Firefox multiple tabs rows

If you need more than one row of tabs in Firefox and are tired of scrolling left/right in your list, check out Tab Mix Plus. To add more than one row, go to “Tools->Tab Mix Plus Options->Display->Tab Bar->When tabs don’t fit width:” and set to Multi-row.


Feb 20 2009

Replanning/Perception demo

During my Willow Garage internship, Ioan and I worked on a few things with the PR2 mobile robot. Here’s one of them. :) You can also try here if the above link doesn’t take you directly there.

WG Demo #1


Feb 20 2009

Laser disassemblies

If you were ever wondering how a spinning 2D laser sensor unit looks like from the inside, Travis Deyle has a few of them linked on his Hizook portal web site.


Feb 20 2009

How To Write Unmaintainable Code

A very good friend recommended me this today: http://freeworld.thc.org/root/phun/unmaintain.html =) Hilarious!


Feb 18 2009

Modern Boost warnings

From the book of life, the universe and pretty much everything else, here’s what Boost warnings look like these days…


/usr/include/boost/spirit/home/classic/core/non_terminal/subrule.hpp:262: instantiated from âtypename boost::spirit::parser_result, ScannerT>::type boost::spirit::subrule::parse_main(const ScannerT&) const [with ScannerT = boost::spirit::subrules_scanner, std::allocator > >, boost::spirit::nil_t>, boost::spirit::scanner_policies >, boost::spirit::subrule_list<0, boost::spirit::sequence, boost::spirit::eol_parser> > >, boost::spirit::functor_parser >, boost::spirit::action, phoenix::actor
>, phoenix::actor
>, phoenix::nil_t, phoenix::nil_t> > > >, boost::spirit::alternative, boost::spirit::kleene_star >, boost::spirit::functor_parser >, boost::spirit::optional<4, boost::spirit::parser_context >, cpp::SetSpecialToken>, phoenix::actor
>, phoenix::actor
>, phoenix::nil_t, phoenix::nil_t> > > > >, boost::spirit::action<2, boost::spirit::parser_context >, cpp::SetSpecialToken> >, boost::spirit::action<3, boost::spirit::parser_context >, cpp::SetSpecialToken> >, boost::spirit::action >, boost::spirit::action >, boost::spirit::action >, boost::spirit::action >, boost::spirit::action >, boost::spirit::action >, cpp::SetOperatorToken> > >, boost::spirit::action
<0, phoenix::closure > >,phoenix::actor
>, phoenix::nil_t, phoenix::nil_t> > > >, boost::spirit::parser_context >, boost::spirit::subrule_list<4, boost::spirit::sequence, boost::spirit::subrule<1, boost::spirit::parser_context > >, boost::spirit::parser_context >, boost::spirit::subrule_list<3, boost::spirit::sequence, boost::spirit::kleene_star > > >, boost::spirit::strlit >, boost::spirit::parser_context >, boost::spirit::subrule_list<2, boost::spirit::sequence, boost::spirit::subrule<1, boost::spirit::parser_context > >, boost::spirit::parser_context >, boost::spirit::subrule_list<1, boost::spirit::kleene_star, boost::spirit::eol_parser>, boost::spirit::difference > >, boost::spirit::parser_context >, boost::spirit::nil_t> > > > > >, boost::spirit::subrule_list<0, boost::spirit::action<1, boost::spirit::parser_context >, boost::spirit::subrule<2, boost::spirit::parser_context > >, boost::spirit::subrule<3, boost::spirit::parser_context > >,boost::spirit::subrule<4, boost::spirit::parser_context > >, phoenix::actor
<0, phoenix::closure, std::allocator >, phoenix::nil_t, phoenix::nil_t> > >, phoenix::actor
, std::allocator > >, phoenix::actor
<0> >, phoenix::actor
<1> >, phoenix::nil_t, phoenix::nil_t> >, phoenix::nil_t, phoenix::nil_t> > >, boost::spirit::parser_context >, boost::spirit::subrule_list<5, boost::spirit::optional, boost::spirit::chlit > > >, boost::spirit::parser_context >, boost::spirit::subrule_list<4, cpp::private_stuff::CHARACTER_LITERAL, boost::spirit::parser_context >, boost::spirit::subrule_list<3, boost::spirit::contiguous, boost::spirit::subrule<5, boost::spirit::parser_context > > >, boost::spirit::parser_context >, boost::spirit::subrule_list<2, boost::spirit::contiguous, boost::spirit::positive > >, boost::spirit::subrule<5, boost::spirit::parser_context > > >, boost::spirit::parser_context >, boost::spirit::subrule_list<1, boost::spirit::contiguous, boost::spirit::inhibit_case > >, boost::spirit::positive >, boost::spirit::subrule<5, boost::spirit::parser_context > > >, boost::spirit::parser_context >, boost::spirit::nil_t> > > > > > >, int ID = 0, ContextT = boost::spirit::parser_context]â


Jan 7 2009

Atlas/Lapack issue

Just a quick note if you run into an error like the one below…

$ ./bla
./bla: symbol lookup error: /usr/lib/sse2/atlas/liblapack.so.3gf: undefined symbol: _gfortran_pow_r8_i4
# dpkg -l | grep atlas | awk {’print $2′} | xargs apt-get remove –purge -y

$ ./bla
Hello world!