Shop OBEX P1 Docs P2 Docs Learn Events
Color Line Following Boe-Bot Senior design project...IMPORTANT! — Parallax Forums

Color Line Following Boe-Bot Senior design project...IMPORTANT!

amuszemeamuszeme Posts: 13
edited 2006-04-26 01:23 in BASIC Stamp
Help!!!!· I have been trying to use the TAOS TCS230 color sensor to program the boe-bot to follow colored lines...I've not been successful and have been unsuccessful finding any assistance on line.cry.gif· Can anyone help.· PLLLLEEEEEEEEEEEEEASEconfused.gif

Post Edited (amuszeme) : 4/23/2006 9:33:09 PM GMT

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-04-23 21:33
    Hmm. Perhaps you need a white-light source? This is kind of un-usual, I haven't heard of using the Taos for this.
  • amuszemeamuszeme Posts: 13
    edited 2006-04-23 21:39
    Well there are LEDs on the sensor itself. This sensor is offered at Parallax and on the product page, it says that it can be used in the application of line (edge) following robots.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-04-23 21:49
    OK, then probably the 'object' the TAOS is 'looking' at needs to be a certain size. How wide are your lines, anyway?
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2006-04-23 22:37
    Amuszeme,

    Have you taken the time to run the TCS230 Color Match.exe program to see if the sensor is providing RGB values (and a color match) for what you're observing? That's a start - isolate this into small pieces and build on the basics.

    Ken Gracey
    Parallax, Inc.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-23 22:52
    amuszeme -

    Do you indeed have varied colored lines that you wish to follow separately (differentiated)? If not, there are far better and much less costly solutions than the Taos Color Line Sensor Evaluation Kit, which is what I presume you're speaking about (Parallax Product #30054).

    Although it appears to be presently backordered, the QTI Line Follower AppKit for the Boe-Bot, is a far better bargain, with a total of 4 sensors and all the associated mounting and wiring accessories for only $28.00 US. This presumes colored lines are NOT involved, merely some dark color (usually black) lines on a light or white background color.

    If you DO need color, I will post another reply to your question, with additional questions for troubleshooting the problem.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->

    Post Edited (Bruce Bates) : 4/23/2006 11:06:23 PM GMT
  • amuszemeamuszeme Posts: 13
    edited 2006-04-23 23:11
    I have run the color match.exe program and it is reading the colors just fine. I can't seem to get the servos to work in conjunction with the sensor....I am a novice with basic, but I thought I understood it enough to write this program. I do need color lines. I am trying to have it follow a red line which is a lead line to a cluster of other colors. I want to program it to follow the red line until it reaches the next color specified by the program.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-23 23:57
    Amuszerne --

    How wide are the colored lines you're using?

    What did you use to make the colored lines (paint, tape, magic marker, etc)?

    What is the background color behind the colored lines?

    How close to the lines is the sensor mounted, and is it mounted inboard or outboard of the BOE-Bot's metal chassis?

    Are you using the source lighting supplied on the Eval Board, or something else?

    How many Eval Boards or sensors are you using?

    An attached·copy of your program would be helpful, if you like us to look through it to make any suggestions or recommendations.

    Regards,

    Bruce Bates


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • amuszemeamuszeme Posts: 13
    edited 2006-04-24 00:18
    My line is an inch wide. I used latex paint. The background color is white. The top of the sensor is mounted a little more than an inch off the board, therefore the led's for the senor is about 1/2 inch from the line itself. It is mounted outboard. I have been using the source lighting on the Eval Board. I only have one sensor per bot, I have two bots. I am having trouble getting online from my laptop which is where the code currently is and I didnt' bring my thumb drive with me. I will try to attach it tonight when I return home.
  • amuszemeamuszeme Posts: 13
    edited 2006-04-24 01:33
    Oh and by the way, the lines are not straight lines...the are mimicking a small map. So I need the bot to follow the lines in curves too.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-24 17:16
    Perhaps the bot is moving too fast for your ability to pick up the color and if it's on the line?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • amuszemeamuszeme Posts: 13
    edited 2006-04-25 04:31
    Attached·is a copy of my program in the state it is now.....I have deleted, replaced and switched alot since the first time I posted and it may be incomplete.· Again, I am a NOVICE...so I may be completely off from the beginning of this program.· The servos on the bot are moving and the color sensor is processing colors, but they are not moving in conjucntion with one another.·

    Amy
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-04-25 09:52
    Amy -

    At the possible risk of sounding uncharitable,·even my changed version of the present·program (attached) is at best rudimentary in its present form, and·it's a long way from·the way it was,·to the point where one might be able to legitimately suspect that the TAOS sensors aren't detecting the colored lines. I have shortened the name of the program a bit, and added a phoney .TXT postfix-file_type, which you can feel free to change back, and made a few minor changes, but changes which should change the reaction of the program (for better or worse). I didn't run it throught the IDE to check for errors, so I may have added syntactical errors by accident. My apologies if I did.

    Only you know how you intended the IF/THEN structures in the program to operate, but I doubted they were correct as they stood, thus I changed them. The information you were displaying to aid you in debugging was BOGUS, thus you were probably coming to incorrect conclusions as to what was actually happening with the TAOS sensors. I changed those DEBUG statements. This was a pure syntactical mis-placement, so·I would suggest a better study of the PBASIC Manual or PBASIC Help File to insure that the commands you are entering are structured correctly.

    It wasn't clear to me what should be happening if GREEN was being detected, nor what should be happening if NO COLOR was being detected. What's with that?

    Although you seem to have a PING))) Sensor onboard, it would appear that you're not presently using it, or if you are, it's not being used correctly. If it's purposely not being used, that's fine, but disable the PING))) commands for now, so that they don't interfere with the active code. This can be simply done by adding a single quote (" ' ") to the beginning of any line or lines you want ignored. This causes them to be viewed as a comment by the IDE/Editor.

    Just out of sheer curiosity, did you use gloss, semi-gloss, of flat latex paint on your "map"? I'm not sure whether that will make a difference in the end, but you might want to develop a couple of small test panels, if possible, just to check that angle. Here are some possible shortcuts, rather than having to purchase more paint of each type. Just remember these are _permanent_ changes below:

    Covering flat or semi-gloss with some clear, glossy,·nail polish·should simulate gloss paint, and give the same effect for test panel purposes.

    Using very fine sandpaper should change gloss to semi-gloss, or possibly even to flat, on a small test panel.

    Buffing semi-gloss with Pledge (or any other spray-on furniture polish) should allow you to simulate gloss from a semi-gloss surface.

    Give it another shot, and let us know the results. Once you get this baby back on track, it will grow by leaps and bounds, take my word for it! First we crawl, and then we walk :-)

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • rscconradrscconrad Posts: 6
    edited 2006-04-25 17:29
    From years of industrial color seperating with interference filters you do indeed want flat white.· The flatter the better.
  • amuszemeamuszeme Posts: 13
    edited 2006-04-25 22:44
    Thanks Bruce...I do have a Ping))) attached, but as I stated in my previous post...I deleted some of the code to try to correct the error with the color sensor and servos since that was the most important part to me at the moment. In its present state, I intended just to see if I could get it to detect the difference between the red and another color and see if the servo would act in conjunction with the change. EX...I want it to follow a red line (lead line) to the 'map' and then according to the program, take correct route according to the color. Since the white is the background color, if the the sensor sees white, the bot should then turn to the right or left until it detects the color that it is supposed to be following (seeing). I have used simi-gloss latex for the background white...I will attempt to use your sandpaper suggestion.

    The Ping))) sensor is intended to avoid collision with another bot following another route within 5 inches. Thanks again for helping the helpless [noparse]:)[/noparse] I will let you know how it goes.
  • amuszemeamuszeme Posts: 13
    edited 2006-04-26 01:23
    Oh and I forgot to mention that the TAOS is having no problem distinguishing the colors....in the debug terminal, it clearly gives the value for each color range. To be honest, I have used snippets of other codes found on the internet to piece together my code...the information on the debugging statements in the code were not mine...I guess they were misleading me. I will update soon.

    Amy
Sign In or Register to comment.