My hobby robotics project - JCP1

General robotics related discussions.

Moderator: chris

My hobby robotics project - JCP1

Postby johncl » Mon Feb 12, 2007 1:43 pm

Hi, I just wanted to share a webpage I am working on where I am describing my robotics project based on an Epia Via C7 Mini-itx board and featuring a number of Robot Electronics components.

http://photo.lonningdal.net/robot/

The whole thing was just assembled and is now running autonomously. Besides an aluminium exterior shell, the next hardware upgrade will be to make the compass work and I will most probably add some more sensors (SRF02 will be adequate I think). The I2C devices have been very easy to interface and basically worked on first try.

The only thing I miss besides this is a board with a GPIO14 and some simple pin headers so that you can very easily add bumber switches, temperature, humidity and other digital/analog sensors. Unless Robot Electronics is currently working on one i will most probably make my own some day.
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby johncl » Tue Mar 06, 2007 11:29 am

As a small update - I have moved the pages to:

http://robot.lonningdal.net

Still havent got the compass to work unfortunately. And I will definitely need some more ultrasonic range sensors so it doesnt back into things so easily.

I also probably need some buttons to enable and disable some features on the robot as well as a number of status leds would be very nice. For the leds I have the option to use the GPIO14 (which would also interface a light sensor, a temperature sensor and a humidity sensor), but its a shame to use one pin for each led so maybe I need a chip inbetween so that I can e.g. use 3 lines to address 7 leds? I think Robot Electronics should consider a nice preassembled kit with this! :)

Hmm when I look closer on the GPIO14 it seems to have a pretty nice number of pins there. I could configure 3 of them to be Analog (using PCFG = 0100) which would leave me with 10 digital pins for leds and switches. This might be just enough actually.
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby Roumen » Fri Feb 22, 2008 1:19 am

Hi John, so what happened to your robot? I had a look at your web site and the robot looks really cool, especially the things he can do. Did you manage to get it to fetch a beer in the end? (I am asking seriously)
Roumen
 
Posts: 23
Joined: Wed Jan 30, 2008 2:22 am
Location: Cambridge

Postby johncl » Fri Feb 22, 2008 10:34 am

Hi, well I havent worked much on the robot since last summer, he is unfortunately just sitting there on my table. :(

I got a bit of a problem with CPU overload when I added my context grammar code to the speech recognition. It seems the VIA processor just isnt up to it when to has to do speec recognition and the webcamera stream. The webcamera problems are quite simple, the camera pumps way more frames than I need so my code spends a lot of time just ignoring pictures as I only need 1-2 frames per second. I have not been able to adjust the webcamera stream framerate in any way through JMF (Java Media Framework) yet. If I can solve this I can free a lot of CPU load.

I also need to fix some bugs in my context switching and need to add semaphores so that I can better control when the robot should be listening and when not to (It frequently picks up its own voice which can cause some problems).

Other than that, the robot works pretty good, except that it cant do much. I never got the compass to work (only in 3 directions, the last one only gets messed up values) so it doesnt really have any idea about where it is in its internal map. Basing it just on wheel rotation wont work either since it frequently get stuck on carpet edges (the motor-kit I bought here doesnt have big enough wheels with high enough friction), and will then spin a bit before backing up and trying a different direction. This spinning will mess up any internal coords calculated based on wheel rotation, so the compass is necessary for correction. And I probably have to make some recognizable markers around it so it can e.g. triangulate as well. One solution might be to add some colored cards in the room up on the walls so that the camera can see these and calculate some approximate distances to figure out where it is in the room. My goal was for the robot to map out the rooms itself so that it made a rough 2d memory map of its surroundings based on ultrasonic pings while it explores the room.

I also need more sensors, which I might order soon since a colleague is also about to build a robot similar to mine, but is more focused on camera streaming and remote control (I like autonomous robots though). I am not quite sure if I should get the cheap ones here or the more expensive ones since I am not sure what precision I need for the sensors on the sides and back of the robot.

Also, the robot has had a bit of a rough time since the plexiglass plates are a bit fragile and my wife accidentaly stepped on the bottom layer and broke that which I then had to glue again. I really want some ABS plastic, preferably precut according to my design, since my hand-sawing is not exactly beautiful or precise. Also, hand-bending aluminium plates is hard to get precise, especially since the base-layers are not very precise either. You can safely say this is not my area of expertise.... I am mainly a software and hardware integration guy. Some with mechanical and structural skills would have done wonders on my robot. Hopefully I will make a JCP2 some day too. :)

On a sidenote, Asus has come out with a very nice small computer, the Asus eee. For anyone thinking about a similar robot project, get one of these computers! You get everything in one cheap package there. I must admit I have thought about perhaps getting one and make a JCP2 design with an integrated screen on its chest (taken from the Asus eee). I could then have 2 processors running in the robot and split the image recognition part from the voice recognition part to solve those issues.

Well, some day I will get the spirit back and start working on it again. :D
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby Roumen » Sun Mar 02, 2008 12:43 am

I had an unsatisfactory experience with the VIA processors myself too. It barely managed 15 fps with a single web cam working at full speed (1GHz) and doing absolutely nothing else. I even tried running it with a heavily stripped down Windows Embedded, but got the same result (which only proves that Windows actually doesn't consume so much resources :))
I controlled the camera directly through DirectX, so I could change the frame rate, however setting slower frame rates tends to increase the exposure time and that brings awful motion blur if the robot is moving.

By the way, I haven't tried the OpenCV library, but I feel a bit suspicious about it. From my brief academic experience with image processing I still remember it was one thing to get the algorithms work on a limited test set of pictures and completely different in the real world. What is your experience, does the OpenCV work well in real world conditions?

Speaking about navigation by markers, Evolution Robotics have come up with a navigation system based on infrared markers and WowWee are releasing a robot with it this autumn.
http://www.evolution.com/products/northstar/
http://www.robotsrule.com/html/rovio.php
Roumen
 
Posts: 23
Joined: Wed Jan 30, 2008 2:22 am
Location: Cambridge

Postby johncl » Mon Mar 03, 2008 9:59 am

Ah, I didnt think that lowering the fps would increase exposure times. Seems these web cameras arent implemented very well for robotics use at all. I wish there was a better camera around really since it seems kinda silly to process a stream when I only need 2-3 pictures a second for the robot to work adequate. Its not exactly going to catch a ball mid-air or something. :)

My Via platform is almost good enough, but I will definitely look for a replacement here. Its too bad there isnt any good embedded boards with Intels ULV processors, the ones that are being used in UMPC's these days. They would give me aproximatly double the horsepower and quite possible use less power than current Via CPU's. There is a new processor coming out these days from Intel too, one that uses 2 watts. That might be a brilliant robotics processor, especially if someone can come up with a very low power comsumption board. I am hoping the future Asus eee will have this so I can rip one apart and make JCP2 from it. :)

Open CV is a very nice API for all kinds of vision code, but I have only used the face recognition with the supplied haar cascade definition and in my opinion it works very well. Sure there will be some false positives but with a little extra code you can reduce these to an absolute minimum (f.eks. hsv color space check on center to see if there is skin colour, as well as taking time and subsequent identified positives into consideration). It works at least good enough for the robot to follow my face and will frequently spot my eldest daughter when she plops her face in front of it and greet her hello. :)

Edit: The main reason for me wanting to use Via and these small form factor boards is of course the footprint. Many choose to use a laptop but these are just too big in my opinion, with the exception of the small Asus eee, which is a great option for these kinds of robotics projects - performing approximately like the Via CN13000 according to benchmarks I have seen. The other factor is of course battery power. There is no fun in having a robot that lasts for 1 hour before it has to recharge. The solution could be Lithium batteries but these are both expensive and requires you to be careful with how much you draw from them. My robot consist of two main power drainers, the computer and the motors. The computer is fairly constant, but the motors can draw very high amps when they stall or it has to to push/pull something. The only safe alternative here for me was a heavy SLA battery then, which I chose to power all of it. I wish there was a good option here though, because if I could spend the same amount of weight on a Li-Ion battery I think the robot could probably run for a whole day beteween recharges. SLA batteries are of course very cheap and are built for topping up frequently which is fine if your robot docks itself whenever it isnt used.
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby Roumen » Wed Mar 12, 2008 9:47 pm

Hi John, speaking about processing platforms, I got a Dell XPS 1210 laptop for my robot and so far it's been doing very well. It's relatively small size (a 12" screen size), sports a Core Duo 2 at 2GHz and with the basic battery pack lasts about 3 hours under heavy load. There is also the possibility for buying an extended battery pack which should allow it to operate up to 5 hours, but I haven't found the need to do so. And of course has got an inbuilt wireless, which I find very useful. Unfortunately Dell has discontinued it, so I bought mine from Ebay.
Roumen
 
Posts: 23
Joined: Wed Jan 30, 2008 2:22 am
Location: Cambridge

Postby johncl » Wed Mar 12, 2008 10:09 pm

Yes I have looked around for other options since the Via is a bit too slow. But the main problem is size. I need it to fit within the robot, so it really cant be bigger than 17x27 cm. And so far, all the ultra portables in the 10" screen segment have been very expensive (>$1500). My only option seems to be UMPC like the Samsung Q1P (which I have btw) and the Sony Vaio ux180p (or ux280p) which both are below $1000 today. The Vaio UX should provide me with around 4 times the CPU power than the Via Epia board, and draw much less power. It also has a nice small touch screen I could have used on the front of the robot.

But I guess if someone releases a small PC in the Asus eee form factor but with a nice dual core at a low price (around $700) I am ready for a change.
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby johncl » Sat Mar 15, 2008 11:32 pm

I've done some more research on possible laptops that can be used as a suitable robot brain for OAP sized robots (30x30 cm), and although you could fit some of the 12" ultraportables, they will limit the design of your robot (it would be very squarish).

Generally only UMPCs with 7" screens or less will fit inside the robot like a Mini-ITX board (17x17cm). But there seems to be one that could be an excellent choice: The Fujitsu LifeBook P7230 with a 10.6" display. The cool thing is that you can get it with a U2500 processor, which is a 1.2 GHz Core Duo 9 watt processor! This will perform at 8178 Dhrystone and 6009 Whetstone, which is very decent for a 9 watt processor. Thats 5 times faster than my Via Epia CN13000, and double the speed of the U1500 which can be found in e.g. the Sony Vaio UX series. But the ultraportable will set you back $1200 which is quite a bit for a robot brain, especially since you probably wont use the screen/keyboard unless you gut it and present the screen... perhaps rotated would be cool with a 10.6" monitor. :)

Anyway, I will try to run my Samsung Q1P UMPC which has a 1 Ghz Pentium M processor now as the robots brain now to see if there is enough processing power to handle it all. Chances are I will distribute all vision processing to a stationary PC as well. I just hope I get enough CPU speed for it to have smooth speech recognition, speech output and handle a webstream during daylight. Yes, daylight... :) - Since daylight gives the webcam enough light to send more pictures in the stream, my code has to process more as well, sending the CPU usage to 100%. During evenings when in low light conditions, the robot worked so much better! :)
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby johncl » Sun Mar 16, 2008 12:17 am

Hmm, I see that many of these 12" ultraportables dont use the whole area for the motherboard. For example the Dell D420 12" which also comes with a U2500 has this motherboard:

Image

So it seems you could take it apart and make it "smaller". I wonder how many devices need to connected to boot these laptops? Will it fail if you dont connect the screen you think?

If so this would be a very nice option since you can get many of these 12" U2500 based computers for around $5-600 today used.
johncl
 
Posts: 41
Joined: Sat Jan 27, 2007 2:16 pm

Postby Roumen » Sun Mar 16, 2008 6:56 pm

Hi John, for booting the laptop motherboard I think you can get away with just connecting the hard drive. If you are trying to really reduce the size and power consumption you could even use a flash drive instead of a standard disk drive. These could be found with IDE interface and a size of 4Gb would cost probably about $30-$40. If you use a flash dirve however, you will have to configure Windows not to use virtual memory, because otherwise the flash memory will very soon use up all its write cycles.

I've never considered stripping my laptop off all the unnecessary plastics, size has not been an issue for me, although generally speaking the smaller the better. I am more concerned with the available processing power, which is important for running the stereo vision algorithms, when/if I manage to finish it. Besides, I quite like the laptop the way it is, it quite nicely doubles up as a DVD player for the boring air flights. So, I don't think I will experiment in that direction :)

About your problem with the daylight and the camera, if you've already switched to Roborealm, they have a very nice module which controls all properties of the camera through DirectX. btw when I was building my platform I looked for this for quite some time in the Microsoft specs about DirectX and never managed to find it. It's certainly very useful, gives you control over stuff like frame rate, exposure, gain, saturation, etc.

btw when I was experimenting with my laser scanner last year I had the same problem with the day light. Because I could not control the exposure time it worked best only at certain lighting conditions, which luckily happened to be the lamp in my bedroom :)

Do you know of any good 2 axis accelerometers? I am building a new stereo camera head for my robot and am thinking of adding a means for the robot to know which is up and which down :) Hmmm, I should probably just ask Gerry to make one.
Roumen
 
Posts: 23
Joined: Wed Jan 30, 2008 2:22 am
Location: Cambridge


Return to General Robotics

Who is online

Users browsing this forum: No registered users and 0 guests