Studio 3

Friday, April 28, 2006

Week 8

Testing of the RCX code.

Now that the full set of lego mindstorm(so gonna get one for myself on christmas) is finally in place, and we have every component in it.
We can get down to work, since I"m not very good at designing and drafting out ideas, I decided to concentrate on the coding need for the cambot to run.

Now we've zero it down to a few things in which the cambot has to be able to do while moving around.
1. Follow a standard path
2. Not go too close to the person
3. Be able to either aviod/move around objects which it bumps into

Instead of going straight into the RCX coding or VB coding, I've decided to document my "code to be" as a flow chart, which can be submitted in a documentation later on in the development process.
Since the RCX code can support up to 9 sensor watch stacks at a time and listen to 9 different inputs, this makes my job a little easier.
Stack 1 on start program, on output A nd C(which sets the wheels to run)

Stack 2:(this stack contorls the cambot to follow the path or in this case a light source)
if light is on then
on output A and C
else if light is off
off output A and C

Stack 3 and 4:(these will be the touch sensors which cause the cambot to move around objects 3 is the right sensor and 4 is the left)
if sensor is true then
off output A and C
on reverse A and C
off output A(by only having one wheel move, will cause the cambot to turn)
move A at normal speed
move C at high speed (causing cambot to turn back to its original direction)
wait for 1 second (waiting here causes the code to wait, but the cambot will carry on moving)
(the 1 second wait here is for the cambot to fully turn before continuing on its path)
set speed of C to normal speed (this will cause the cambot to move straight again)

The code has yet to be tested, as this is only the planning stage, certain features must still be added, and considerations like what if it bangs into a wall, there will be no point in move it then, can it be turned off...etc
What happens if there is more than 1 cambot moving around?

so there is still quite a lot of thing to build on from here.

Saturday, April 22, 2006

Mid Sem Break a.k.a MMDS project week

We finally managed to get our hands on a lego mindsotrm set, only thing is that its not a complete set, as it has cables, axles and certain key pieces missing and it didn't come with the software, however it was enough for us to get some work done at least.

We tried playing with the lego block and looking at the building diagrams which come with the mindstorm as well, we tried building a few ideas, looking around testing it out to see if it works well on different flooring.
Small thick wheels works well on most flooring, but don't have much grip.
Bigger wheels work better than small wheels, but will have difficulty when moving on carpet flooring(as most homes and the crit has carpet flooring).
Caterpiller tracks is slightly slow, however these tracks works best and can even climb up from normal floor onto a floor mat or carpet.
We've not test the caterpiller track fully yet, however just like tank tracks, it might be able to roll over small objects as well.
Moving slower will just mean we have to increase the delay times of "move" commands in the programs allowing it to have more time to manuver around.

With the lmitation of touch sensors (should have 2, we only had 1) we could only try out the single bumper system.
From what we have discovered, the sensors are not as sensitive as we thought, which means the single bumper system might not be good after all, as it will be using only 1 sensor for both left and right. However if we had 2 sensors we could have something like bumpers for even the sides of the cambot. So we'll have to have more building with that.

Thankfully the light sensor was in the set and working, we tested it out and yes just the same its not very sensitive, thus we would need to have a real test in the crit space in order to know how to accurately set the sensitivity of the light senor via the software.

And just in time to save us, Magen managed to get her brother's mindstorm set, which is the full set, minus the software....so right now we have 3 RCX modules for the mindstorm, one complete set, one not so complete set and yes, zero copy of the software.

Wednesday, April 12, 2006

Week 7 - Mindstorm

After have around 2 weeks of delay with and trying to get the lego mindstorm. I got tired of waiting and got one of my housemates to actually bring the RCX module(programming brick) and user guides and stuff.

Ok finally looking at the mindstorm sutff, we have a rough idea of what we're going to build, basically a robot with follows a light source and moves around objects when it knocks into things. Now here is the tricky part.

Building
Well, the idea is not only just a robot that follows a path, cause that would be just re-using technology and we really want to develop something new. So while looking through the lego building guide, we saw several design which we could combine and the functions as well, proberly a robot with a light sensor in the front, and some touch sensors at the side for bumpers to detect it knocking into object.
We also saw that the wheels can be customised to have tracks like the original design to adapte for different flooring (e.g. carpet, concret, wooden..etc)

Programming
This would be the tricky part and I do forsee this being most of my part. Now lego does have pree written programs that allows the robot to move forward, reverse when it knocks into something, and another program that makes it either follow light or move away from light or even to follow a set path.
Here is the problem, they don't have an integrated program that does all the above function together, and unfortuantely thats what we need, a program that allow it to follow path or light and if there is something blocking it, it would know how to aviod it. This would be more real in a sense and it make it more useful, rather than having something that is dumb enough not to move around objects as it would serve the webcam must puspose if the view is being blocked.
So, how are we going to go about doing this, the answer, mindstorms has an additional "plug-in" to its software, which allows you to re-write the program functions using Visual Basics (WOW).
Well, the worse case would be to ask for help on the lego mindstorm forums as well, but yah
I guess I'll try things out on my own first, and if that the worse case, the forums would be my next life line.

So far thats as much as we can do with out the full set of lego, I just hope it comes in this week so I can work on it during the holidays.

Tuesday, April 04, 2006

Week 6 - Sudden Idea

Ok, I've just got this sudden idea and I know myself too well that if I don't blog or weite down I'll forget it the minute I get home.

Just finished my skills session, and there was this device called the "close sensor", basically it detects the distance, how far objects are away from it and all, basically speaks fo itself.

The "close sensor"(being linked up with the EZIO device) will return a value to director between 1 to 256, 1 being very close and 256 being the maximum distance. Thus the rough coding just poped up in my head. If we could connect this EZIO device to something like a small car and have its on/off switch connected/controlled by the EZIO, the code would look something like this

on exitframe me

close sensor declared as "a/n 1"

-- "0" being on and "1" being off
car control declared as "a/n 2"

if ( "a/n 1" > 229) then
"a/n 2" = 0
--setting "a/n 2" to 0 switching the car on to start moving
else if ("a/n 1" < 230) then
"a/n 2" = 1
-- setting "a/n 2" to 1 switching it off and thus stopping it
end if

end

This would be a rough coding to make the car follow you in a straight line and to stop at a certain distance, how this distance is highly dependent on the sensitivity of the "close sensor".
There is a limit to this though, in fact the question would be "What if I walked round a corner?", is there any other method of coding this, or a sensor that detects non-linear movement?

Saturday, April 01, 2006

week 5

Looks like we've found a way to get something to following you around.

Lego Mindstorm, it some sort of a motion sensing device that can be fixed up to actually track and follow the movement of a person around an area. Thanks to Megan who though of this great idea, half out problems have been solved, now its just a matter of implementing it and making it work.
We also talking about having some sort of an elevation device to that the cambot can be rised and that people will not be like stuck to talking to it looking down, which basically makes the person on the other end controlling the cambot feel rather small.
We've made arrangements with Petra Wyeld to loan out the deivice and play around with it over the weekend. Sadly all the sets were fully used up at St. Lucia and we'll have to wait till tuesday to actually get our hands on it.

Since there are 2 groups doing the Cambot project which we've selected, we've decided to slipt it up and have something like the other group do the head part with the webcam and we'll do the leg part with making the robot follow you around, and hopefully at the end of the project we could combine both projects together and have something that is 90% close to the completed product.

This is just some info, which the other group might want to know as I did do some research on it only to discover that we will not be doing this part of the project. Yes I looked into the area of having a wireless webcam, I was thinking Director here as its a lot easier to code than Java and I've been working with it for the past 2 years.
Director has this TWIAN Xtra that allows you to interface with scanners and digital cameras, a webcam IS considered a digital camera, thus it is possble to have this working. Haven't really played with the code since I discovered that we'll be doing the motion tracking part. Well, the wireless part could be just having a really small laptop running WIFI in the cambot running this Director software with the webcam, that would pretty much solve the problem, however yah it a matter of making it small and trying not to be running it with a computer.