Tuesday, January 28, 2014

20% Time

Google's interest in robots is not a secret anymore. I can see Google getting out of our computers and cell phones and being embodied, moving around in our apartments, and offices. It's still a little hard to tell what Google is up to just by looking at the companies they bought, including Nest. So the other day I was thinking to myself, if I worked at Google as a roboticist, given the right resources, what would I do in my 20% time?

I thought of two possible, somewhat feasible and most importantly, insanely fun (at least fun to think about) projects: 

a) trash-maps.google.com, and
b) where did it go-bot.

trash.maps.google.com


This project would actually deal with a very important real life problem, especially in urban areas: cleaning the streets, and recycling what's swept. I'm thinking this as a swarm robotics project, where little semi-autonomous guys will roll by the curbs and on the sidewalks and one-by-one identify the soda cans, cigarette buds, coffee cups, etc. while keeping a catalog of what sort of trash is collected where in the world. And then, you go on trash.maps.google.com and see what streets are the cleanest and where people are, let's say, more relaxed and less worried about the environment. 

What do you do with the trash that you collect? See Wall-E if you haven't.

Potential Issues with trash.maps.google.com


1. What better than having your street squeeky-clean at all times? On the flip side, this piece of technology, might cause people to say "oh, the robots will clean it anyway" and start dumping more and more things on the street. 

Solution: Explaining people that the purpose of this by framing it in a way that won't make littering attractive.

2. Another issue might be people stealing, attacking, kicking, abusing and doing all sorts of weird things to these little trash-map-bots. Who'll cover the cost of that? Not me.

Solution: Robot insurance. Robot repair shops. Vandalism is already illegal, so I don't know if making it illegal to steal or vandalize the robots will make any difference.

Where Did It Go-Bot


This project would make people who loose things often very happy! Only if they don't care about being spied on all day long. Have you ever wanted to Google your closet, apartment, or office drawer? Well, with where did it go-bot, now you can! 

I'm thinking of this robot as a little piece of shiny furniture-like spherical robot, in different finishing and colors, roaming around looking at your stuff, labeling what's where, saving it to your google-drive, crawling through the things you own (not physically, although that might sometimes be necessary) and asking your questions when it gets "confused": is the location of this object important for you? Should I keep track of your new set of apartment keys? 

Potential Issues with Where Did It Go-Bot


1. Well, as much as I like the idea, it's still creepy. Some thing, knows where my stuff is all the time. I mean, that can be really useful if I'm looking where the other pair of my gloves is, but what if I'm actually hiding something and this little sneaky robot found it somehow? Creepy. Privacy is a huge issue. 

Solution: Disabling / enabling tracking of certain objects or certain groups of objects may prevent this issue. You could say, don't track my t-shirts so the robot ignores all t-shirts. Filtering out could be done as "forget immediately / ignore" or "forget after the object becomes 100% invisible". This much of detail shouldn't be left to the user though... 

2. If, sorry, I actually meant to say when, this system gets hacked, some random people will know the exact location of all users' belongings. Or will they? You can, say, who cares about Mr. X's socks location? But you never know. What if Mr. X has a very expensive collection of cigars and wine that are rarely found... That would be valuable if stolen and sold... Privacy is a huge issue.

Solution: There really is no guaranteed solution against hacking. If it's man-made, and it's online, there's a chance that it will get hacked. Encrypting the heck out of every component may eliminate some kinds of attacks, but it certainly isn't enough.

I may give this 20% time robotics ideas another thought.

I hope you had fun reading!

Bener Suay

Tuesday, October 22, 2013

Getting MarioAI Python Agent Run on Ubuntu 12.04

A screenshot of DemoForwardJumpingAgent.py
It took me a couple hours trying to get this running, mostly because of the lack of documentation. I thought I should share it, so when other people Google it they don't loose time struggling:

1. Download MarioAI.zip from:

http://code.google.com/p/marioai/downloads/list

2. In your MarioAI directory open

src/amico/python/PyJava/Makefile.Linux

3. Edit the file to make it look like the following (I highlighted the changes I made)
CC = g++
MKDIR = mkdir

SRCDIR = src
BUILDDIR = build
CFLAGS = -shared -Wl,-soname,libAmiCoPyJava.so.1 -fPIC
INCLUDES = -I/usr/include/python2.7 -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux
LFLAGS = -L/usr/lib/jvm/default-java/jre/lib -L/usr/lib/jvm/default-java/jre/lib/i386/server
LIBS = -lpthread -lz -lutil
MAIN = $(BUILDDIR)/libAmiCoPyJava.so

all: $(MAIN)

$(MAIN):
    ${MKDIR} -p $(BUILDDIR)
    $(CC) $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -o $(MAIN) $(SRCDIR)/PythonCallsJava.cc -ljvm

.PHONY: clean

clean:
    rm -f $(MAIN)

# DO NOT DELETE THIS LINE
4. Now open a terminal in this directory (PyJava), and run make

5. This will generate libAmiCoPyJava.so under the PyJava/build directory

6. Copy libAmiCoPyJava.so into your_mario_ai_directory/bin/AmicoBuild/PyJava directory.

7. Open a terminal in this directory and add the jvm path in your LD_LIBRARY_PATH with the following command:

export LD_LIBRARY_PATH=/usr/lib/jvm/default-java/jre/lib/i386:/usr/lib/jvm/default-java/jre/lib/i386/client:$LD_LIBRARY_PATH

You can make this automatic if you add the line above at the end of you .bashrc file.

8. Now try

python DemoForwardJumpingAgent.py

9. That's it. You should see a small window popping-up with our little friend Mario jumping and running in it



Monday, September 5, 2011

Google TV - Logitech Revue with Honeycomb 3.1 Beta

Yes, finally Google decided to do something about GTV. Honeycomb is much faster and responsive compared to whatever the previous OS was installed by default on the Revue.

Installation of Honeycomb was very bumpy though. There's a lot of websites telling you what to do step by step so I'm not going to copy from them. However there are a few things I'll add.

1) Don't forget to rename the zip file as update.zip when you copy it to your flash memory.

2) You may get stuck in the installation step (10 of 11) where you choose the model of your TV with the "Network Problem!" (or something similar). Don't give up. I kept getting the error on and on for 3 days and finally somehow it worked on the fourth day.

3) If the Revue can't connect to your Wi-Fi, use a cable. It works. Or you can give it a static IP over your access point, that works too. For some reason, DHCP + Wi-Fi didn't work for me.

There isn't a lot of different apps you can install and enjoy currently (most of them say they're not compatible with GTV) but having access to the app market means it's very likely that we'll be able to use Firefox and play games in the future.

If you're a sidereel fan like me and you don't want to use the weird and very limited sidereel app-like interface, then just type in the address bar:

www.sidereel.com/your_favorite_show's_name

and it will take you the usual PC version of your favorite show's page.

Tuesday, August 23, 2011

Postgre SQL Database Restore Error

If you ran into this problem, you will probably know what I'm talking about. I will keep it short. Note that I am using postgresql 8.4 on Ubuntu 11.04.

I was trying to restore a database from a backup file using pgadmin3 and I kept getting:

pg_restore: archiver (db) connection to database ""some_database"" failed: FATAL: database ""some_database"" does not exist
pg_restore: *** aborted because of error

This is apparently because of a very simple error in the way pgadmin3 is handling restore database command.

It turns out that pgadmin3 is using the following command to restore a database from the backup file:

/usr/bin/pg_restore --port 5432 --username my_user_name --dbname \"some_database\" --verbose "/home/user/some_backup.backup"

However the quotation marks around some_database is confusing for postgresql. I don't understand why it is adding them by itself.

Instead the right command should have been:

/usr/bin/pg_restore --port 5432 --username my_user_name --dbname some_database --verbose "/home/user/some_backup.backup"

So I manually ran the command above in bash and it worked.

It's funny because pgadmin3 was supposed to make things simpler.

Friday, June 3, 2011

NVidia 540M Optimus on Dell XPS L 502 X

1. Install Ubuntu (Natty) 11.04 64-bit

2. Install kernel 2.6.39 see http://www.addictivetips.com/ubuntu-linux-tips/how-to-update-ubuntu-11-04-kernel-to-2-6-39-0/

3. reboot

4. Go to https://github.com/MrMEEE/bumblebee and click on Downloads, save the tar.gz somewhere

5. extract and cd in the bumblebee folder

6. sudo ./install.sh

7. reboot

8. use bumblebee-enablecard or bumblebee-disable to turn on/off NVidia

9. use
optirun64 program_name
to run your program using NVidia

Thursday, March 31, 2011

Google TV - Logitech Revue

I want to start by saying that I like Google, and most of its services. But sometimes I wonder what the heck they are thinking. For instance, Google Wave what was that? Buzz, super useless. Face it people of Google, even if you want more market share, Facebook and Twitter will prevail. Why don't you instead focus on other wonderful things you already made, such as Gmail, Android, Chrome, Docs... And you could also spend some time to make Google TV work maybe?

I'll start from the setup. It takes ridiculously long to set the Logitech Revue up and to download the updates as a TV. I want to watch internet TV ok? I don't want to do Next, next, next, yes, next, restart, next, next, yes, forever just to start things get going.

Say you finished turning it on. Then you think you can watch whatever you want? Not so fast. Hulu doesn't work. Yes. It doesn't. Wouldn't it be the first thing you would do to go to Hulu and watch a TV show that you like? It's been almost 2 months now since I have this device and they still pop up a message saying "We're working hard to make Hulu available for you". No Hulu, you're not working hard, stop lying.

Say you still don't give up after tons of frustration and you're decided to watch a TV show / movie. Your only free option seems to be the trial subscription of the NetFlix.

Is that supposed to mean that Google TV is invented to suck up all your money by making you subscribe to websites? Seemingly yes. If you push it a little bit, you can find pirate websites that upload TV shows for free, or to mega video. Fortunately Chrome does not play "the big brother" to filter them, yet.

Another frustrating thing is that, currently you can't install new apps. The only way to do it is to hack your Google TV.

Isn't there anything good about it? Hmm... You can watch youtube.

So far I only talked about the Google side. On the Logitech side, the keyboard feels a little too fragile, but it looks nice. Does it work nice? Mostly. You have to use two fingers to slide the page vertically, but why can't you do the same to slide horizontally? Who knows... You have to use the weird arrows to go left / right.

Maybe they thought that people won't need horizontal sliding, but we do. It's because I have to fracking zoom in for the webpages. My TV is only 32" and as it is the webpages look super tiny.

The hardware of the computer inside seems to be much cheaper than what they charge people too. Even a simple webpage with a few blinking ads slows down the browsing experience, and by browsing I mean sliding the page up and down.

The bottom line is, there are tons of things to improve, and I have no idea how this product as it is got out of the Google's labs. Because I would hardly accept it as a prototype.

Suggestions:

1. Switch to Firefox for god sake. Chrome is just painfully slow and the plugins keep crashing.

2. Use a faster processor, or more rams maybe, current hardware can barely handle web pages with ads. Or make this device $300 cheaper than what it costs.

3. Let people install things, Android and Android market rules.

4. Do not require a Google account to use the device. It feels horrible to know that someone is collecting your data. Make it an option.

5. Let Sidereel open its usual webpage instead of "Pay me I only care about your money and data" page.

6. Convince Hulu to let people see the TV shows.

7. Give people the option to see Google TV optimized (app like) interface for a web page or the regular desktop interface.

I guess that's all I have to say for now. Maybe you already noticed but I'm so not satisfied with the Logitech Revue. I hope I'm not alone and the developers will make it worth buying someday.

Sunday, January 2, 2011

Honda U3-X

This is so cool. I'm a big fan of Honda's robotics products. Although this U3-X is not new, I don't know if people actually started using it.

From personal experience I know that Japanese car companies and producers are very strict about ergonomy at factories / production lines. I can almost see people working at factories using this to slide at the same speed with the product they work on, while mounting things and tightening the screws etc.

Oh, I almost forgot! ハッピーニューイヤー to everyone!

Wednesday, December 8, 2010

Open Natural Interface



I've been working on upper body skeletal tracking with Microsoft Kinect using OpenCV since 5 days now... See the picture. I implemented the algorithm presented in this paper. To let people who are interested in it know, it's not perfect.

It lacks consistency, requires a new computer to be responsive, and can't recognize the arms when they are in front of the body.

Still, hats off to HP people, because what they published is still way better than people who fake skeleton tracking by only doing a simple distance transform and adaptive thresholding, claiming that they do skeleton tracking.

Would you like to know what is perfect?

I just received an email saying that PrimeSense (basically the company that made Microsoft Kinect) already decided to release the alpha version of OpenNI.

I will try it out tomorrow with the Kinect and see how it goes.

I feel defeated and frustrated but very happy at the same time. OpenNI will finally make the interaction work as it should.

Download OpenNI here and PrimeSense Sensor very first version here. See the perfect real full body skeleton tracking with OpenNI here.

Sunday, November 28, 2010

iRobot Roomba 550

This robot is doing a great job cleaning the apartment. The place where I'm living is only 700 square feet; 1 bedroom, 1 living room. It's making the cleaning of the apartment way easier.

My roomba is "swiffing" and vacuuming the apartment for me. I think I'll just have to use the wet sweepers manually until I get an iRobot scooba.

There was a lot of electronics and thus cables on the floor in the apartment and the only thing I had to do was, to fix the extension cables to the walls so that the roomba doesn't get tangled. That's it...

Thursday, November 11, 2010

Wacom Bamboo Pen on Ubuntu 10.04 Lucid Lynx

I just bought a Wacom Bamboo (Pen only, Model CTL-460) and it's working pretty good on Ubuntu 10.04 (Lucid Lynx). I followed 3 simple steps, plugged my tablet in and restarted my computer and that's it.

  1. sudo add-apt-repository ppa:doctormo/wacom-plus
  2. sudo apt-get update
  3. sudo apt-get install wacom-dkms

Special thanks to:

http://frankgroeneveld.nl/2010/04/11/get-wacom-bamboo-fun-pen-working-in-ubuntu-lucid/

I like how it feels like writing on a real paper.

I'm using Xournal to take notes on PDFs and CellWriter for handwriting character recognition, in case you would like to know...

Tuesday, November 9, 2010

Star Tech DVI to VGA Adapter

Model: DVIVGAFM

Link: http://www.newegg.com/Product/Product.aspx?Item=N82E16882203020

Pros: This works exactly as advertised. If the other reviewers would have read a bit about DVI and VGA before they purchased this product then they would not have bought it, and tried to use it for something it was not.
I used this to attach a VGA signal to a DVI-I port on a Polycom Video Conference system because it would NOT accept a Digital signal. If this is the type of application you are looking at then you will be ok.

Cons: This is not a VGA to DVI-D converter. 95-100% of the LCD's out there are DVI-D (D Meaning Digital) so taking a VGA(Analog) Signal and trying to put it into a Digital display will not work. Sorry for the bad news.

Other Thoughts: There are 3 DVI formats. DVI-A(Analog only), DVI-I(Analog & Digital), and DVI-D. You can run a VGA output into a DVI-A device or a DVI-I device as long as it's expecting an analog signal. You cannot run a VGA signal into a Digital display.