JCP1 - A Java based DIY automaton!

HomeProgress BlogHardware and SoftwareWhat can it do?Random Ideas

Introduction

I have long been a fan of science fiction movies and anything futuristic. The idea of a robot as an assistant for human beings has been around for quite some time, and any science fiction story with respect for itself naturally has robots in it. Unfortunately, Hollywood has a tendency to portrait the robot as something evil that will take over the world. Fortunately, the Asian countries seems to have a more down to earth view of robots and their potential. Hondas ASMIO robot seems to be the closest we have gotten a good humanoid robot.

Humanoid robots are very difficult to create, and it requires a full team of researchers to overcome the problem of balance and stability. All hobby based 2-legged humanoid robots are simply based on the robot having large feet so that the balance comes automatically. These are often simple small servo based robots and far too limited compared to what I want to achieve with my robot. This basically ruled out the whole idea of having a 2-legged robot and either deciding on a wheelbased one or a 4-legged version. Creating a 4-legged robot would have been possible, but would have required some powerful motors and most probably a wide base for the robot to have some height. It would also probably scare the kids! :)

So I did some research and came over this brilliant project: Open Automaton Project. Dafydd Walters has more or less described exactly what I was going to try with my robot project. Its based on low cost components that anyone can get, hopefully at a total price lower than $1000. One of the main ideas is for the robot to be self-powered and run a full featured motherboard to make it simpler to develop software for as well as interfacing components like cheap webcameras. The technology to do this is all here now, its just a matter of assemblying it and developing the software to interface it all. There is also a wealth of software APIs both free and for purchase that will enhance the features of a wheel based robot like these. The only thing I didnt like about OAP was that it was Linux based. Although I fully understand that Linux is free and all I am not comfortable in that OS and the range of software for it is more limited. As an example, I would not get a good enough speech recognition with it since nothing comparable to MS SAPI 5.1 is available to Linux. Other than that, my choice of programming language will be Java, which should run well on Linux also. Some of the other APIs are also fully available for Linux too.

JCP1 was born

Well, at least on paper. I did some drawings and played around with 3dstudio max and came up with something I liked, a design for a base. The design for the head was not started as I wanted to know which parts I could get to achieve a good design first. I also started some software work, trying to make a Java program that was speech enabled. With that I mean, full speech recognition and text to speech output. I achieved this by buying CloudGarden Java Speech API implementation that bridged Microsoft SAPI compliant software to Java. Amazingly it worked better than I had expected and had a simple agent running on my computer that I could give simple commands to, although I could also dictate to it and e.g. make web searches for me. I made a simple module where I could ask it "show me a picture of a house" and it would connect to altavista and do an image search on "house" and show the image in a window. This was enough proof for me to know I would be able to communicate with the robot. The API also has grammars which would enhance recognition rates quite a lot since it limits the vocabularly dynamically. It also provided me the ability to switch contexts by enabling and disabling grammars which is very useful for a robot. I wanted the robot to have some understanding of context, so once you have started a certain module it would know that your commands was most probably related to this. It would go out of context after some minutes in idle state. This formed the basis for a natural way of interaction with the robot.

Next was knowing what to do with the webcameras. I installed Java Media Framework and managed to capture images from my webcamera with ease. I could do some simple image processing to get information out of it. I did a simple test where I held a colored card in front of the camera and asked the robot "what color do you see". It would then sample the image (centre) and analyze the color (quanitisise) to say the color. It was really fun although a simple application. I was happy with that for now, a bit unsure what to use the camera for. I later did some more research and found some papers on object detection based on Haar features which was very effective for face recognition. But it wasnt until much later that I realised this was implemented in Intels OpenCV project. At this stage I tested OpenCV out and see that it has a nice array of useable vision algorithms that a robot could benefit greatly from. The only problem is creating a Java Native (JNI) bridge to it.

Design - version 1

Google Sketchup is a really nice application indeed! I used this to create the whole design for the robot with precise measurements. It really is a brilliant design tool. And its totally free too! What more can you ask? :) - Well, I wanted the design to have some flexibility with what I choose to add to it at a later stage, so I have tried to make room for some interesting features for the future.

The image to the left shows the first design with 4 layers including the top (which will be covered). The main idea with this design was to have enough levels to add features to the robot at a later stage. The more layers the easier to attach something since you can use both the top and the bottom of each layer. I also wanted the robot to have an arc behind it so that it would look nicer when I add the 0.5mm think aluminium sheets to cover it. The original rendering I made way back shows this and I think it looks great. I also had to create a sub-layer at the bottom to have the wheels a bit higher since there is no way I can mount the Devantech motors without either having 2cm clearance or 8cm when I really wanted around 4cm which is the height of my caster wheel as well. The advantage of this solution is that I can adjust it if I want bigger wheels or some height adjustment. The extra layer is also a great place to put the motor controller. The lower layer also shows a grey box behind the battery which is the charger. I will only have this here if I can make the robot plug the charger cord into a normal wall socket sometime in the future.

The layer above have the mini-itx board, and the one above that has the disk, compass and servo controller. The compass will most probably be moved about to find a spot with the least electromagnetic disturbance. Essentially as far away from motors and servos as possible. The robots head is just a quick mockup as I still have to figure out which parts to get for the tilt/shift and how to attach it all in a frame so I can cover it up with aluminium as well.

For attaching the aluminium sheets I think I will actually use velcro! Yes some metal brackets at each layer with the velcro and similarly placed velcro on the sheets. This will make it easy for me to asseble and disassemble the shell. The weight of these sheets is really minimal so it should stick securely.

Design - version 2

I have later done a redesign of the robot where I have removed one layer and added another sublayer similar to the one where the motor controller sits. There was really no need for this many layers in the first implementation and the prototype so far seem to hold together nicely. I have also ditched the idea of arcs at the backside of the robot simply because I do not have the tools to do it. If I create a JCP2 I will most probably use a plastic cutter company to give me some nice precut ABS sheets according to specs. JCP1 is my DIY prototyping droid so I have to lower my expectations quite a bit about how it will look in the end. Still I'd like to have a high standard as my goal and learn what when wrong and how to improve it. It makes it all the more fun when JCP2 will be started! :)

The new layer structure makes more sense also since it moves the mini-itx board a bit higher and it provides me with an angle front at the top which is a very nice place to put a nice small touch screen (Lilliput) which I might explore someday. It would be cool if the robot could show some information, movies and pictures on the screen as well. A touch screen would solve a lot of input problems also - where I would otherwise have to add lots of obscure buttons around the robot. Chances are that I will use Remote Desktop a lot in the beginning unless that eats up all the CPU on the mini-itx system.

The first layer is 4cm from the floor. And the height of the base totals 44cm (so 40cm for the layers, which is the height of the aluminium sheets I will use as "skin". The head part will most probably have a small neck and a head enough size to mount two servos, one webcamera and a small speaker inside it. The original sketch has two cameras, but I will limit JCP1 to a single monoscopic camera. There is enough challenges in getting one to work so I wont bother with two until I feel I am ready for that. So the head will probably look a bit funny, which I dont mind at all since I'd rather have people laugh than be scared of it! :) The neck will ensure that the head can be tilted enough forward and backward so that it can see its "feet" and looking up at peoples faces. If it can see the area on the floor in front of it I will be able at a later stage to maniupulate a gripper that can grab objects on the floor. For that to work I need the head to have a clear view of the gripper and area of the object. Since the arm will most probably be mounted on the middle on the side of the robot it should extend some 30-40 cm stretched out, which means it can only grab items on the floor that is a few centimeters from the front of the robot.

Will post some images of the new design here soon...

Hardware and Software

I have made some simple tables with a list of the hardware and software to be used on the robot.

- Link to page about Hardware and Software

Random Ideas

I have made a page where I plan to list some random ideas that spring to mind and how they can be implemented. I generally feel that a lot of people who do robotics projects are overly focused on the hardware and dont really see the challenges that is found in software. The idea is that the robot has to feel autonomous in that it can move around by itself in some intelligent fashion, have its own goals and have interesting dialogues with people around it. Basically it has to react to the environment in a way that it isnt just a remote controlled device. After browsing the many robotics projects out there I feel many projects stop at that. Maybe its because it wasnt until now you have the required processing power to pack a lot of intelligence into the robot at a cheap price. With distributed computing this becomes even more an important step for robotics, and enables it to seemingly have endless processing power. As an example, the OpenCV object detection code can on my desktop computer (a Pentium 530 - 3 GHz) find faces in a 320x240 picture in approximately 30 ms. So essentially it can recognize faces at a rate of about 30 fps which is really amazing. The Haar detection scheme can detect many types of objects if you just train it up with different sets of images and create a cascade for each object you need to recognize. Of course there will be many false recognitions but this can be somewhat remedied. The idea is that if you have a network of computers they can each run the same image through their cascades and your robot will seemingly have an amazing recognition ability with many objects being recognized.

Well enough for now, here is the link to the page on random ideas.

- Link to page about random ideas

What can it do?

Here is a link to a page with specifications of the robot and a list of things it can do so far...

- Link to page about specs and what it can do


All text and images are Copyright John Christian Lønningdal - January 2007

View My Portfolio