geansai gorm

Archive for the 'robotic gardening' Category

For years, I’ve had a (mad?) plan to build a robot to handle gardening for me. And so far, I haven’t built it.

This is not because it is impossible or stupid. Far from it - when you consider the task step by step, it’s reasonable, and could even be very important.

  • build a robot which is completely wireless.
  • the robot must be able to geo-locate and find its way to its charge-point when it needs it.
  • teach the robot to “see” rubbish such as twigs and leaves.
  • teach the robot to pick up rubbish and place it in a designated rubbish area. At this point, we have something which can be developed and sold, although maybe just as a curiosity.
  • teach it to see grass and to judge whether the grass is too long or not.
  • teach it to cut the grass, one blade at a time, and compost the blades. My plan here is that the robot is very small (20cm cubed?), making it difficult to cut a lot of grass at a time, thus making it easier to cut one blade at a time. Even so, cutting one blade at a time allows every piece of compostable material to be composted, thus making the garden neater than if it was cut by “brute force”.
  • teach it to recognise weeds and destroy them or cut them as close as possible to the root. your average lawnmower can’t do that!

These are reasonable goals, and at the end, you have a small robot (or a few small robots) which can manage a medium-sized garden unattended better than you could do yourself. Now that’s a product that would sell.

So what’s so difficult? Why have I not built it? I think the problem is that I was aiming for perfection - I wanted to go straight to the end product so was buying only the components that would fit in the 20cm cubed machine.

Unfortunately, I just don’t have the money for that. For example, the “brain” needed for the robot would need to be something like the Robostix, which would set me back over €300 euro which I just don’t seem to have lying around.

So, I’d dream and pine and do nothing about it.

The solution, which I have somehow failed to see for years, is to build something less than perfect, which does the job, and develop that into something that people can see actually does work. When that happens, someone will hand me the money to develop the proper thing, in the hope that they’ll make a tidy sum in return.

So, I’ve decided to resurrect some old laptops from the attic, in the hope that I can make them chew the grass for me. I’m going to stuck wheels on them and give them knives and other blades to play with. I’ve dug out my Latitude C610 and Travelmate 2420.

One thing discovered so far - laptops don’t like it when you leave them alone in a damp attic eave for years on end. The Latitude’s hard-drive literally squealed a few times when I booted it, and it would only boot once. Every time after that, the hard-drive threw up errors like it was being killed (I will also mention that the HD’s file-system is ReiserFS, making it more ironic…).

The other worked fine though - it has a few lines on the screen, but nothing more serious (the Latitude has no screen at all).

Tomorrow I hope to build the base of the robot for the TravelMate laptop. I’m going to try build two robots, one for each laptop. If I actually do it (notoriously lazy as I am) I’ll post photos.

Anyway - here comes world-domination step 1.

yes. another resolutions page. I’ll call them plans, though, as “resolutions” sounds a bit certain. in my experience, nothing is certain, even promises.

so, my plans:

  • lose a half-stone. when I married Herself, I was 12 stone. this was probably partly caused by the anti-depressants I was on at the time. since then, it took me a few months to manage to cut down to 11 stone. my ideal weight is more like 10 stone, but I’m finding it incredibly difficult to do that - I just seem to be stuck at 11. so, this year’s plan is to get down to 10.5.
  • build the new robot - I want a very small form-factor machine (gumstix or linutop). it should have caterpillar tracks, a robotic arm, and a cutting tool. my current bot is about 9′x14′. the new one should be at most 6′x6′. the software is not yet complete, but at least this will get the hardware out of the way
  • get my finances back under control. for the last few years, I’ve had negative values in almost all of my bank accounts. about time I managed to fix that. I have one account under control by basically denying myself access to it and setting up a standing order into it. the same plan should work with everything else. the plan is to on average raise the total value of each account by a set value every month. this value (none of your damned business ;-) ) should be measured on a specific day each month.
  • build a collapsible mini-ramp. I can’t make it to the local skate-park very often, so the plan is to build something that I can wheel out to the garden when I feel like some exercise. it should be big enough that I can use my bike on it as well as my skateboard.

notice that none of these are vague. it’s been shown that when a resolution is vague, it usually does not happen. an exact plan, though, gives solid goals that can be reached.

Last week, I wrote a neural network that could balance a stick. That was a simple problem which really only takes a single neuron to figure out.

This week, I promised to write a net which could learn to recognise letters.

demo

For this, I enhanced the network a bit. I added a more sensible weight-correction algorithm, and separated the code (ANN code).

I was considering whether hidden inputs were required at all for this task. I didn’t think so - in my opinion, recognising the letter ‘I’ for example, should depend on some information such as “does it look like a J, and not like an M?” - in other words, recognising a letter depends on how confident you are about whether other values are right or wrong.

The network I chose to implement is, I think, called a “simple recurrent network” with stochastic elements. This means that every neuron reads from every other neuron and not itself, and corrections are not exact - there is a small element of randomness or “noise” in there.

The popular choice for this kind of test is a feed-forward network, which is trained through back-propagation. That network requires hidden units, and each output (is it N, it it Q) is totally ignorant of the other outputs, which I think is a detriment.

My network variant has just finished a training run after 44 training cycles. That is proof that the simple recurrent network can learn to recognise simple letters without relying on hidden units.

Another interesting thing about the method I used is how the training works. Instead of throwing a huge list of tests at the network, I have 26 tests, but only a set number of them are run in each cycle depending on how many were gotten right up until then. For example, a training cycle with 13 tests will only be allowed if the network previously successfully passed 12 tests.

There are still a few small details I’d want to be sure about before pronouncing this test an absolute success, but I’m very happy with it.

Next week, I hope to have this demo re-written in Java, and a new demo recognising flowers in full-colour pictures (stretching myself, maybe…).

As always, this has the end goal of being inserted in a tiny robot which will then do my gardening for me. Not a mad idea, I think you’re beginning to see - just a lot of work.

update As I thought, there were some points which were not quiet perfect. There was a part of the algorithm which would artifically boost the success of the net. With those deficiencies corrected, it takes over 500 cycles to get to 6 correct letters. I think this can be improved… (moments later - now only takes 150+ to reach 6 letters)

I don't have a geansai gorm, but if I did, I might sometimes wear it.

geansai gorm