PDA

View Full Version : Line tracking with object avoidance ( in the middle of the line ) using Boe bot



Mengz_Zai
11-27-2009, 11:51 PM
Hi everyone,

I am a beginner using boe bot hope to get your help.

I have Ping, CMUcam1 and Boebot

I would like to check if it is possible to use both Ping and CMUcam1 onto Boe bot to do the tracking? or I should use Ping and IR to to the line tracking?

Also how can i configure so that boe bot will return to the line after avoiding the project.? using Basic stamp

I have tried searching the forum but i cannot find any example on this.

attached is the picture of what i required to do.



Lastly is it possible to configure the boe bot to navigate autonomously??

Thank you for your help

SRLM
11-28-2009, 02:28 AM
I have been working on a side project to get the stingray (aka giant boe-bot) to follow a line and it is surprisingly difficult. Much more difficult than I had anticipated. Of course, a very slow and jerky line following algorithm isn't that hard but if you try to get some speed then it becomes much more difficult.

I don't know about the use of the CMU cam, so I won't comment on that. I'll make the assumption that whatever method you implement that you end up with a variable that holds the line information.

Most of the programming will depend on the object. Is it a regular object that is a standard size and shape? If it is then you can just do dead reckoning and work your way around the object by guessing. If it isn't then you'll need to keep track of where the object is and maintain a constant distance from it until you get back to the line. In either case it involves going in a circle (or other shape) around the object once the boe bot is some specified distance from it.

And yes, the boe bot can navigate autonomously. Obviously though this is a much more difficult problem then remotely operated.

Mengz_Zai
12-10-2009, 02:22 AM
Thanks for the reply.

I will try to use the Ping Sonar Sensor for object detection, and Ir transmitter and receiver to do the line tracking. I do not need the speed 1st, just a slow bot which can go thru' the obstacle and line follow is enough.

The code will be illustrate like this


Ir will sense and follow the line

If Ping detect an object ahead, It will find the next best route ( left or right)

If goes right, and ping detect a object it will still object avoidance

If goes right, and ping did not detect a object, it will move left till Ir detect a line and it will regain line tracking


It goes the same to the left.


If ping did not detect an object it will continue with line tracking.


How about it?

Also In what way can I store the distance traveled information.

Lastly, once this is successful, I will be implementing the PS2 controller system.

But I do have one question, Because I will be using a ps2 controller extension and cut the wire in order to retrieve the wire in it. is there any other method to tap the wire out other then getting the extension or an adapter?

Thank you.

Post Edited (Mengz_Zai) : 12/9/2009 6:40:20 PM GMT

Phil Pilgrim (PhiPi)
12-10-2009, 03:01 AM
Take a look at this thread: http://forums.parallax.com/showthread.php?p=859832

-Phil

SRLM
12-10-2009, 04:24 AM
1. For your algorithm I would suggest expanding it so that at most per line is one clearly defined step. Instead of "It will find the next best route" say instead "It looks at the left route, and if it is good it goes that way. Otherwise it looks at the right route, and if it is good it goes that way. Otherwise it initiates self-destruct." Or something like that... Also, a graphical representation can be much clearer. You may want to make a state diagram or a flow chart.

2. You can store information in a number of ways. The easiest is to store it in EEPROM, but that has the challenge of getting it out. You could store it on removable media (SD card or USB stick), but that requires more code up front. More information on what you want to do with it would help.

3. I'm pretty sure that you can't use a PS2 keyboard or mouse with the BS2. You'd have to use some electronics in between, like a Propeller. If you mean Play Station 2 controller than that may or may not be a different story. I would search around the forum for posts that use it. IIRC there was something in the completed projects forum about that. Anyway, you can access the wires in one of three ways: use the appropriate socket (like the ones on the console box) and solder that in, solder directly to the pins on the tail end of the controller, or cut the wires and solder to those. If you choose one of the last two you might want to solder solid wires in (like the jumpers that come with the BOE bot) so that you can plug and unplug it from the breadboard.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Powered by enthusiasm

Mengz_Zai
12-23-2009, 02:55 AM
Hi SRLM thanks for the reply.

I have not completed the algorithm but now I have another issue which is similiar to this but with array code which I am not sure in.

I have started another thread for this problem.

Also for the Playstation 2 controller I have soldier it to a board and got the extension wire from e-bay and hope that he colour coding is the same. Will update again.