RandomSequence

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, November 19, 2012

Roomba navigation algorithm

Posted on 12:52 PM by Unknown
I have been a long time user of the Roomba vacuum robot, starting from version 1 till now. It has made a big difference to my life, and I enthusiastically recommend it to all my friends.

One thing that stands Roomba apart from other vacuum robot is its navigation algorithm. There is no high-level mapping involved. Instead it uses localized decision making, much like how insects forage for food:

Our robot computes its algorithm 67 times every second, constantly stitching together information about its environment and recomputing its path. When it starts you’ll notice a spiral pattern, it’ll spiral out over a larger and larger area until it hits an object. When it finds an object, it will follow along the edge of that object for a period of time, and then it will start cris-crossing, trying to figure out the largest distance it can go without hitting another object, and that’s helping it figure out how large the space is, but if it goes for too long a period of time without hitting a wall, it’s going to start spiraling again, because it figures it’s in a wide open space, and it’s constantly calculating and figuring that out. It’s similar with the dirt sensors underneath, when one of those sensors gets tripped it changes its behaviors to cover that area. It will then go off in search of another dirty area in a straight path. The way that these different patterns pile on to each other as they go, we know that that is the most effective way to cover a room. The patterns that we chose and how the algorithm was originally developed was based off of behavior-based algorithms born out of MIT studying animals and how they go about searching areas for food. When you look at how ants and bees go out and they search areas, these kinds of coverage and figuring all of that out comes from that research. It’s not exact, obviously, I’m not saying we’re honeybees, but it’s that understanding of how to search out an area in nature that is the basis behind how our adaptive technology is developed.
The algorithm is actually quite effective and robust in the real world. For a short while, I used to house two cats in a room, and you can imagine how dusty that was. Roomba never failed to clean up the room for me after I left it to its devices. It was squeaky clean after each session, and all I had to do after that was to give the wooden floor a quick mop.

Don't take my word for it. Check out this video providing a time-lapsed coverage test of various vacuum robots, including The Roomba 5 series.


However, I never fail to notice, both online and off, how Roomba's navigation algorithm invokes all kinds of negative feeling in users. Comments typically are of the types:

... It is just going in random directions
... Personally I will not vacuum like that
... Why does it go over the same area twice?
... It is not very efficient, it takes too long 

I have seen people just standing there and supervising/criticizing their robot's every move! This is crazy! Do you stand there and supervise your washing machine? I mean, you just dump your clothes in, set a wash cycle, and come back in 45 mins or whatever. What's so difficult about that? Instead you have people just hanging around and second guessing every move the robot makes. Absurd!

I can understand maybe a robot vacuum cleaner is something new to a lot of people, it hasn't become quite as mundane as a washing machine. Or maybe a localized or bottom up algorithm is just harder to understand/accept compared to a top-down algorithm. Rodney Brooks, the co-founder of iRobot, the company that makes Roomba, is a pioneer in the field of bottom-up robotics. He famously created robotic insects that do not have a central "brain", but instead make localized decisions based on the feedback from various sensors (much like the Roomba). In the physical world, that approach turns out to be extremely robust and resilient.

AFAIK iRobot has never organized any campaign to dispel such negativity. I guess maybe it is just too difficult and technical to make people understand that a bottom-up approach is superior to a top-down (mapping) approach. I hope I can make a small difference by blogging about this here. Roomba's navigation algorithm in the real world is robust. You can move furniture around while the robot is running and not have to worry that it won't come back again. You can let it bump into your foot if you are doing stuff in the same room while it is running, but you can be assured that will not have a large impact on what it is doing.

You don't want a robot to vacuum like you do. Otherwise, cars will have legs, and washing machines will have arms. Just clear the room, set the robot down, let it run, grab a cuppa and come back an hour later. The room will be clean. Trust me.
Read More
Posted in hardware, roomba | No comments

Friday, November 16, 2012

How to make your OpenBox awesome

Posted on 7:41 PM by Unknown
As a long-time Linux geek, I've discovered that there are nice aspects of GNOME/KDE, and then there's all the horrifying bits.  After almost 20 years of desktop Linux use, I've concluded that "lighter is better."  I.e. there's no real benefit to having all the bells and whistles turned on.  That's what lead me to OpenBox.

Anyone who has run OpenBox is familiar with ~/.config/openbox/autostart.sh... or at least they should be.  In case you aren't, here's the crux of it -- the autostart.sh script runs when OB starts-up, and its the vehicle through which you can start all the bits and pieces of the desktop that you might need.  Here's my autostart.sh:
#
# Openbox config for the ultimate desktop 
# 

#### policykit manager
# allows us to manage networks and other things that require root priv.
(sleep 10 && /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1) &

#### gnome settings daemon 
# allows us to use the gnome tools for things like display and mouse
(gnome-settings-daemon) & 

#### mount encrypted disks and set desktop wallpaper
(/home/cjs/bin/mntenc && nitrogen --set-zoom-fill /home/cjs/mine/pics/backgrounds/current.jpg ) &

#### Enable power management
# we use xfce because the gnome-power-manager went away (as a systray icon anyways)
#(gnome-power-manager) & #this went away in Debian Sid around Dec '11
(xfce4-power-manager) &

#### Thunar Daemon
# handles automounting disks, etc.
(thunar --daemon) &

#### Tint2
# our panel
(tint2) &

#### Screensaver
(xscreensaver -no-splash) &

#### Synapse
# synapse is a key-stroke app-launcher, like Gnome-DO
(synapse -s) &

#### DropBox
# sync files between multiple systems
(sleep 2s && dropbox start) &

## Launch network manager applet
# 2012/01/07 -- this has been getting launched twice, presumably by gnome-settings-daemon?
#(sleep 4s && nm-applet) &

#### volumeicon 
# allows us to control volume from an icon in the system tray
(sleep 3s && volumeicon) &

#### Clipboard manager
# parcellite is a bigger/better utility
(sleep 3s && parcellite) &

## start xsnow!
#(sleep 3s && xsnow -notrees -nokeepsnow -nosanta) &

So, in case all of this is completely Greek to you, I've included comments.  This script works provided you've got tint2, parcellite, xscreensaver, dropbox, volumeicon, and thunar installed, and in your execution path.  This script also assumes that you've got the default GNOME desktop installed for such things as settings and authentication.  The point being is that you can use this even on the default Debian 6 install, and achieve a highly functional desktop without the overhead you'd experience with a full GNOME or KDE desktop.
Read More
Posted in geekery, linux, software | No comments

Tuesday, October 16, 2012

Shipping times from Chinese gadget sites

Posted on 4:00 AM by Unknown
I like buying cheap novelty items from Chinese gadget sites. I have bought hundreds of items from various sites so far, and have had a surprisingly good experience with them overall. Incredibly I have never had an item lost thanks to AusPost.

Most items are as described and satisfactory as long as you have done your research and know what to avoid. In general, I try not to buy gadgets involving flash memory chips and batteries, because most times, you are getting inferior stuff. Lower tech items are generally OK eg. toys, phone/tablet accessories, houseware etc.

The sites I have used so far are DealExtreme, DinoDirect, Lightake and Focalprice. I am eying a few others like TinyDeal and TMart. The only problem with buying from these sites is the long shipping times. I am using this post to keep track of the delivery times of various purchases to Melbourne (Australia):

DinoDirect: Printer Ink Refill
Ordered: 9 Sep
Shipped: 13 Sep
Received: 26 Sep
Time taken:  18 days

DealExtreme: Novelty Candy Dispenser
Ordered: 2 Oct
Shipped 3 Oct
Received: 16 Oct
Time taken: 15 days

DealExtreme: Pocket Illuminated Microscope
Ordered: 1 Oct
Shipped: 3 Oct
Received: 17 Oct
Time taken: 14 days

More to come...
Read More
Posted in gadgets | No comments

Monday, October 15, 2012

Yield comparison on toner cartridges/refills

Posted on 10:52 PM by Unknown
Following my initial encounter with the starter toner cartridge on the Brother Hl-2132 laser printer, I have been experimenting with different toner cartridges/refills and noting the cost/yield with each method.

I bought an OEM high yield toner cartridge for $32 (excludes shipping) that claims a yield of 2600 pages. That only gave me 870 pages of actual output at about 30% coverage. The toner is also a little too light for my liking.

Then I bought a toner refill set for $47. All-in-all, I got about 600g worth of toner, even an accessory kit to convert the starter cartridge to high-yield cartridge (which I have not tried yet, but it looks easy enough). After viewing a few YouTube tutorials about the process, I set about putting 100g of toner into the empty toner cartridge.

It was surprisingly easy, much easier than filling up ink cartridges. The cap on the OEM cartridge was a snap to pop off and replace, and to my surprise, the cartridge worked flawlessly after I refilled the toner. The printout was very dark and nice, much nicer than the original toner that came with the cartridge!

And even better, the 100g of toner lasted a whopping 1200+ pages! Two subsequent refills gave me roughly the same yield at the same 30% coverage. Dividing the original cost of $47 by 5 refills (conservatively), it's like getting a new toner cartridge for $9 each time!

Update:

I discovered that for about $50, I am able to buy 1kg worth of toner over eBay, shipped from US. This is double the amount of toner for about the same price. So now I am getting a brand new high yield toner cartridge for $5 every time. It's crazy cheap! I am extremely happy with the result.
Read More
Posted in hardware, printer | No comments

Volume normalization of MP3 audio track in AVI video files

Posted on 10:38 PM by Unknown
For AVI video files with MP3 audio tracks, the best way to normalize its volume without recompression involves using FFMpeg and MP3Gain:

> ffmpeg -i input.avi -vn -acodec copy -y audio.mp3
> ffmpeg -i input.avi" -an -vcodec copy -y video.avi

> mp3gain /r audio.mp3
> ffmpeg -i audio.mp3 -i video.avi -acodec copy -vcodec copy -y output.avi


In fact, AACGain in the previous post could substitute for MP3Gain as well.

So the process basically involves extracting the audio and video tracks separately from the original video file, normalizing the audio track using MP3Gain, then muxing the audio (normalized) and video tracks back again.

Since everything is command-line driven, it will be quite straightforward to create a batch/script file that performs all 4 steps in sequence.
Read More
Posted in avi, video | No comments

Volume normalization of audio track in MP4 video files

Posted on 10:30 PM by Unknown
I am currently looking at how to "normalize" the volume of various video files without recompression, and documenting my findings here.

For MP4 video files, an easy solution appears to be AACGain, a command line utility that handles AAC audio. Simply run:

    aacgain /r *.mp4

and all MP4 video files will be normalized. The process is entirely reversible (using the /u command), and involves no recompression at all.
Read More
Posted in mp4, video | No comments

Tuesday, September 11, 2012

Brother HL-2132 - Lousy Yield on the Starter Toner Cartridge and How to Work Around it

Posted on 1:23 AM by Unknown
I bought a Brother HL-2132 mono laser printer from Offceworks recently. Like almost all printers these days, it came with a "starter" toner cartridge that promises 700 pages of print. Well, guess what? The "Replace toner" LED came on after printing only 199 pages! How do I know? More on that later.

A quick search found a number of proposed solutions on the Web, ranging from taping the optical window to resetting the flag gear on the toner cartridge. Well, the starter cartridge I got came with neither of these mechanisms. Seems like Brother has read all these solutions and decided to lock down their starter cartridges even further!

What finally worked for me was to factory reset the printer. This can be done by the following steps:

1. Open the front cover and remove the toner cartridge. Leave the front cover open!

2. Turn the printer off.

3. Press and hold the "Go" button while turning the printer on. All LEDs will light up. Release the "Go" button.

4. Now press the "Go" button twice and pause for a second.

5. Press the "Go" button a further 5 times.

6. If you have done all the above steps correctly, the computer connecting to the printer will detect a new device, try to install a device driver for it and fails, then displays an error window saying that it is unable to install a driver for the printer in "maintenance mode".

7. Now turn off the printer.

8. Re-insert the starter toner cartridge and close the front cover.

9. Turn on the printer.

After the brief startup churn, the printer was ready for printing again, with the toner level restored to 100%!

To check the toner level, right-click on the printer icon and select "Print Preferences":


Then click on the "Support" button on the bottom-left:


 Finally, click "Print Settings":


The printer will print out a single sheet of information detailing interesting tidbits such as the number of pages you have printed, the % of toner left, and the % of drum life left. That was how I got to know that the starter toner cartridge "ran out" at exactly 199 pages!

Update: I managed to get to 329 pages before the print started fading. So that's only about 100 pages more from the starter toner. To be fair, my average coverage per page is probably about 30% rather than the 5% frequently used in industrial figures, so your mileage may vary.

Further update: Yield comparison on toner cartridges/refills

Read More
Posted in hardware, printer | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 110GB+ worth of photos/videos on a microSD memory card #2
    In my previous post, I talked about wanting to write a script to see how far I can squeeze 110GB worth of media (photos and videos). I wrote...
  • Looking for the perfect car MP3 player/FM transmitter
    I have bought quite a number of car MP3 player/FM transmitters from DealExtreme and other similar websites. A car MP3 player/FM transmitter...
  • Freeing up phone storage with Link2SD
    Another more powerful way of freeing up phone storage is with Link2SD . Using this method requires you to have a rooted phone. If you don...
  • Children - The ultimate test in anger management
    Having just spent two full holiday weeks with my kids, it occurred to me this morning that raising young children is the ultimate test in an...
  • Coding the Liturgical Calendar
    For a long time, I've wanted to integrate the Roman Breviary into a couple of projects (nothing public) but have never been able to find...
  • Ubuntu: WebDAV + DAVfs2 + FUSE == Thunar Goodness
    One of the corner-stones of any *nix utility is that it should do a simple job and do it well. Every piece of software that I can think of ...
  • pyScout - threaded port scanner with heuristic protocol identification
    In 2007, while attending a training event in Chicago, NYC, or Washington D.C., (my memory is fuzzy as to which), I began to learn Python.  I...
  • Fast Diet - Hunger Pangs
    When I am doing the Fast Diet , I frequently experience long periods of calm after a brief period of hunger pangs. It is as if the body has ...
  • Brother HL-2132 - Lousy Yield on the Starter Toner Cartridge and How to Work Around it
    I bought a Brother HL-2132 mono laser printer from Offceworks recently. Like almost all printers these days, it came with a "starter...
  • console-kit-daemon
    Periodically, I pop-open `htop` and see a slug of threads for `console-kit-daemon`. I've tried to find what the heck this thing does, a...

Categories

  • a2dp
  • administrata
  • android
  • antivirus
  • avi
  • bluetooth
  • chrome
  • coding
  • culture
  • dos
  • eee
  • faith
  • family
  • fastdiet
  • firefox
  • gadgets
  • geeekry
  • geekery
  • hardware
  • homeschooling
  • howto
  • java
  • laptop
  • life and the universe
  • linguistics
  • link2sd
  • linux
  • migration
  • mp4
  • pdf
  • politics
  • printer
  • roomba
  • security
  • soapbox
  • software
  • transcode
  • travel
  • ubuntu
  • video
  • virtualization
  • webapps
  • windows

Blog Archive

  • ▼  2013 (11)
    • ▼  August (3)
      • 110GB+ worth of photos/videos on a microSD memory ...
      • 110GB+ worth of photos/videos on a microSD memory ...
      • Coding the Liturgical Calendar
    • ►  July (6)
    • ►  June (2)
  • ►  2012 (25)
    • ►  December (2)
    • ►  November (4)
    • ►  October (4)
    • ►  September (1)
    • ►  June (11)
    • ►  May (3)
  • ►  2011 (11)
    • ►  December (1)
    • ►  September (2)
    • ►  August (1)
    • ►  July (3)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (10)
    • ►  December (2)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
    • ►  July (1)
    • ►  May (1)
    • ►  March (1)
    • ►  February (1)
  • ►  2009 (29)
    • ►  December (2)
    • ►  November (2)
    • ►  September (1)
    • ►  August (3)
    • ►  July (2)
    • ►  June (5)
    • ►  May (2)
    • ►  April (2)
    • ►  March (6)
    • ►  February (3)
    • ►  January (1)
  • ►  2008 (57)
    • ►  November (2)
    • ►  October (4)
    • ►  September (1)
    • ►  July (8)
    • ►  June (3)
    • ►  May (8)
    • ►  April (12)
    • ►  March (6)
    • ►  February (8)
    • ►  January (5)
Powered by Blogger.

About Me

Unknown
View my complete profile