ATAN(-3/-3) will produce the same result as ATAN(3/3) producing an erroneous angle location of 45 Deg when it should be -135 Deg.
ATAN can only accept a value between -pi/2 and pi/2 thus at -90 Deg and 90 Deg you are getting a #DIV/0! error.
Excel has a function called ATAN2 that will accept a value between -pi and pi (-180 Deg to 180 Deg), but be careful, the X/Y input values are reversed.
ATAN2(X,Y)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I am looking at the graphs and I am not really seeing it. The big spike at around delta theta 149 or so is not a collision. That was the bot hitting the grout with both wheels at the same time. I tried to minimise the time the bot spent being jammed against the obstacle by setting up an exact starting point. That is also the reason why the data of runs 2 and 3 are so similar.
Is the thing I am supposed to see the big dip in delta theta just before delta dist goes up? I'll do some more runs this morning (got a day off, yay!) and plug the data into the Excel sheets with your formulae for the deltas. I will use a different area of the tiles to run the bot on. If the end result is still the same then at least we know it is not due to the alignment of the tiles or grout. We can then devise a way to have the bot detect that kind of event.
On a slightly different note. What would alleviate the kind of servo problems we were having with the logging? A faster Basic Stamp or one of those servo controllers? I can foresee this happening again as more sensors get added to my bot. If the sensors are going to cause more than 40ms delay, I doubt a faster BS module would alleviate it. Do EEPROM writes and reads occur faster on the 2PX? It seems the clock speed is only about 50% faster but the actual instruction/sec rate is 480% faster. I am not sure I can justify the purchase of both to the Treasury Department (read: my wife), so which will give me the most bang for my Euro (we don't have bucks here in Europe).
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
I ran the bot across the tiles in a more diagonal direction and I did notice that with run 2 there is a slight dip in the delta theta for more than 2 readings when there is a collision towards the end. This is somewhat true of Run 1 as well, but I still don't see anything that really jumps out.
With the Delta Force as one of the labels, I couldn't help but think that if Chuck Norris was controlling this bot, the object about to collide with the bot definitely get out of the way.
All foolishness aside, I am really not sure how we could turn this data into a very definitive algorithm that detects the collisions properly, or am I missing something?
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
Regarding your question about a "faster BASIC Stamp", the most effective solution for future projects would be the Propeller Microcontroller. Since the Propeller chip has eight processors, it won't matter if one of the processors has to wait for some relatively slow sensors to return their measurements. With the exception of the Spin Stamp and the Propeller Demo Board, the rest of the Propeller chip products give you access to 32 I/O pins. Here are a few links to consider for robotics projects:
IMPORTANT: The Propeller chip is not for beginners. Before upgrading to a Propeller Chip, you should have a fair amount of experience with BASIC Stamp projects. At the very least, learn the material in What's a Microcontroller and/or Robotics with the Boe-Bot. Also, be ready to learn a new programming language. The Propeller chip is programmed in Spin and optionally assembly language for high speed and time sensitive tasks.
For an educational introduction to the Propeller microcontroller, I would recommend starting with the Propeller Education (PE) Kit. The accompanying PE Kit labs are available for download from the product page. Since more labs get developed and released on a regular basis, there's also a forum thread where you can go get the latest:
There are also some applications on that page you will find useful, especailly the PEKbot. Another advantage to the Propeller Education Kit is that you can get replacement parts as needed. Even if the Propeller chip gets damaged, it costs roughly $13 USD to replace, which is a little less intimidating than potentially having to scrap a $60 or $80 USD module.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 6/26/2007 9:15:58 PM GMT
Aye, the collision is right at the end. I made sure to get the distance just right when the bot was doing the runs. It would run into the object for no more than 0.5s or less.
As for switching to a new language, I don't think that would be too much of a problem. I am familiar (but no expert by any means) with quite a few programming languages, admittedly only one for a robot thus far. Would the PE kit fit on a BoeBot chassis? I think I would need to buy some wire-wrapping tools for the Propeller Proto Board, afaict. I've never worked with that but I am sure it's not as tricky as it looks. It does look a lot more tidy and it's cheap too.
Which would be better to get, the Propeller Rapid Prototyping Module (http://www.parallax.com/detail.asp?product_id=32202) or the Educational Kit, considering I already have a zillion components (resistors, capacitors, 555, 741, etc) from the Boe-Bot, Basic Analog and Digital and almost all the sensors that Parallax sells for the Boe-Bot (minus the QTI).
I am not sure my local reseller carries the proto boards though, by the looks of it. You guys really need to find some more distributors here in the Netherlands and Belgium because only being able to deal with one single reseller is a bit of a pain, not to mention bad for competition. They seem to only be carrying some non-Parallax proto board that costs a few times as much, meh.
I've looked at the spin language a few times and it looks very nice. It looks a lot more complex than the BASIC 2.5 language but with that comes more power. I love that it has functions. GOTO and GOSUB leave a bad taste in my mouth whenever I type them. they might also be the source of that weird twitch under my right eye, but that's going to be hard to prove.
I will check the other resellers in Europe to see which ones have the items I need/want.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
I think I will shelve this project until I can get my hands on a 3D accelerometer. I think that will definately help distinguish between the an impact originating from the wheels hitting the grout and something hitting the bot from the front or side at a higher point.
I'd like to thank everyone who put in all the time to try and solve this, hopefully with a more sophisticated sensor we can solve this [noparse]:)[/noparse]
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
Comments
Careful when using the ATAN function...
ATAN(-3/-3) will produce the same result as ATAN(3/3) producing an erroneous angle location of 45 Deg when it should be -135 Deg.
ATAN can only accept a value between -pi/2 and pi/2 thus at -90 Deg and 90 Deg you are getting a #DIV/0! error.
Excel has a function called ATAN2 that will accept a value between -pi and pi (-180 Deg to 180 Deg), but be careful, the X/Y input values are reversed.
ATAN2(X,Y)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
A picture is worth a thousand words....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I am looking at the graphs and I am not really seeing it. The big spike at around delta theta 149 or so is not a collision. That was the bot hitting the grout with both wheels at the same time. I tried to minimise the time the bot spent being jammed against the obstacle by setting up an exact starting point. That is also the reason why the data of runs 2 and 3 are so similar.
Is the thing I am supposed to see the big dip in delta theta just before delta dist goes up? I'll do some more runs this morning (got a day off, yay!) and plug the data into the Excel sheets with your formulae for the deltas. I will use a different area of the tiles to run the bot on. If the end result is still the same then at least we know it is not due to the alignment of the tiles or grout. We can then devise a way to have the bot detect that kind of event.
On a slightly different note. What would alleviate the kind of servo problems we were having with the logging? A faster Basic Stamp or one of those servo controllers? I can foresee this happening again as more sensors get added to my bot. If the sensors are going to cause more than 40ms delay, I doubt a faster BS module would alleviate it. Do EEPROM writes and reads occur faster on the 2PX? It seems the clock speed is only about 50% faster but the actual instruction/sec rate is 480% faster. I am not sure I can justify the purchase of both to the Treasury Department (read: my wife), so which will give me the most bang for my Euro (we don't have bucks here in Europe).
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
I ran the bot across the tiles in a more diagonal direction and I did notice that with run 2 there is a slight dip in the delta theta for more than 2 readings when there is a collision towards the end. This is somewhat true of Run 1 as well, but I still don't see anything that really jumps out.
With the Delta Force as one of the labels, I couldn't help but think that if Chuck Norris was controlling this bot, the object about to collide with the bot definitely get out of the way.
All foolishness aside, I am really not sure how we could turn this data into a very definitive algorithm that detects the collisions properly, or am I missing something?
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
Regarding your question about a "faster BASIC Stamp", the most effective solution for future projects would be the Propeller Microcontroller. Since the Propeller chip has eight processors, it won't matter if one of the processors has to wait for some relatively slow sensors to return their measurements. With the exception of the Spin Stamp and the Propeller Demo Board, the rest of the Propeller chip products give you access to 32 I/O pins. Here are a few links to consider for robotics projects:
Propeller Education (PE) Kit
http://www.parallax.com/detail.asp?product_id=32305
Spin Stamp
http://www.parallax.com/detail.asp?product_id=SS1-IC
(Note: You will also need the Propeller Clip to download programs to the Spin Stamp)
http://www.parallax.com/detail.asp?product_id=32200
Propstick USB
http://www.parallax.com/detail.asp?product_id=32210
Propeller Proto Board
http://www.parallax.com/detail.asp?product_id=32212
(Note, you will also need a Propeller Plug programming tool to download programs into this board's Propeller Chip.)
http://www.parallax.com/detail.asp?product_id=32201
IMPORTANT: The Propeller chip is not for beginners. Before upgrading to a Propeller Chip, you should have a fair amount of experience with BASIC Stamp projects. At the very least, learn the material in What's a Microcontroller and/or Robotics with the Boe-Bot. Also, be ready to learn a new programming language. The Propeller chip is programmed in Spin and optionally assembly language for high speed and time sensitive tasks.
For an educational introduction to the Propeller microcontroller, I would recommend starting with the Propeller Education (PE) Kit. The accompanying PE Kit labs are available for download from the product page. Since more labs get developed and released on a regular basis, there's also a forum thread where you can go get the latest:
Propeller Education Kit Labs
http://forums.parallax.com/showthread.php?p=617192
There are also some applications on that page you will find useful, especailly the PEKbot. Another advantage to the Propeller Education Kit is that you can get replacement parts as needed. Even if the Propeller chip gets damaged, it costs roughly $13 USD to replace, which is a little less intimidating than potentially having to scrap a $60 or $80 USD module.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 6/26/2007 9:15:58 PM GMT
If the collision isn't at 149, where is it? Is it at 190?
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Aye, the collision is right at the end. I made sure to get the distance just right when the bot was doing the runs. It would run into the object for no more than 0.5s or less.
As for switching to a new language, I don't think that would be too much of a problem. I am familiar (but no expert by any means) with quite a few programming languages, admittedly only one for a robot thus far. Would the PE kit fit on a BoeBot chassis? I think I would need to buy some wire-wrapping tools for the Propeller Proto Board, afaict. I've never worked with that but I am sure it's not as tricky as it looks. It does look a lot more tidy and it's cheap too.
Which would be better to get, the Propeller Rapid Prototyping Module (http://www.parallax.com/detail.asp?product_id=32202) or the Educational Kit, considering I already have a zillion components (resistors, capacitors, 555, 741, etc) from the Boe-Bot, Basic Analog and Digital and almost all the sensors that Parallax sells for the Boe-Bot (minus the QTI).
I am not sure my local reseller carries the proto boards though, by the looks of it. You guys really need to find some more distributors here in the Netherlands and Belgium because only being able to deal with one single reseller is a bit of a pain, not to mention bad for competition. They seem to only be carrying some non-Parallax proto board that costs a few times as much, meh.
I've looked at the spin language a few times and it looks very nice. It looks a lot more complex than the BASIC 2.5 language but with that comes more power. I love that it has functions. GOTO and GOSUB leave a bad taste in my mouth whenever I type them. they might also be the source of that weird twitch under my right eye, but that's going to be hard to prove.
I will check the other resellers in Europe to see which ones have the items I need/want.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
Please send me a PM requesting more info on distributor options and the dimensions of the Propeller Rapid Prototying Module.
The acceleration direction was opposite on the collision and tile crack. This might be useable information for your application.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
I'd like to thank everyone who put in all the time to try and solve this, hopefully with a more sophisticated sensor we can solve this [noparse]:)[/noparse]
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| What the world needs is more geniuses with humility, there are so few of us left.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner