Following a Giant Line
In a contest I'm planning to compete in next year, the robot must follow a along a blacktop path. I attached a picture of part of the path below. Does anyone know of a good way to follow this path? I thought of something like a CMUcam or an AVRcam, but I wasn't sure if the contrast would be high enough. Anyone had experience with something like this?
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Good luck!
-Phil
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
http://en.wikipedia.org/wiki/Differential_GPS
Ken Gracey
Parallax, Inc.
Yesterday the guys from RoboRealm came to Parallax. Their free software (runs on a PC, is that allowed in your competition) can identify the extent and location of the black path with no problem and send serial messages of your choice. You'd need an RF transmitter/receiver (our Embedded Blue devices) between the robot and PC, and to stay within range of the PC the whole time.
Take a look at what they offer, if your contest allows a remote PC.
Ken Gracey
Parallax, Inc.
http://www.ecsel.psu.edu/~avanzato/robots/contests/outdoor/contest05.htm
Thanks,
Craig
Better Yet, I'll just put a laptop on the robot, it's already 100+ pounds, 20 more won't hurt.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Post Edited (crgwbr) : 4/10/2007 6:40:58 PM GMT
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
We played around with your two images a bit and here is what we were able to come up with in terms of finding the route. Note that we used the floor finder module for both images with the same configuration.
The biggest problem will be dealing with shadows. You can see that if a shadow occupies the lower part of the image then it will be counted as part of the road (due to how the floor finder module works). But in the other image you can clearly see the shadow being eliminated from the detected route .. that's something we will have to work on eliminating. It is a form of the "fill highlight" option that we have in the floor finder module .. but instead is a "fill lowlight" type function. We'll see what we can do.
STeven.
http://www.roborealm.com/
From the functions I've used o far, RoboRealm has proved to be really great software. Could you post the list of objects you were using? For example, was it just the floor finder object, or did it have the normalize object too.
Thanks Again,
Craig
Post Edit: I just tried the floor finder, with a normalize and Raise to the power of 2 before it, then a Center of Gravity after it. It works great.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Post Edited (crgwbr) : 4/11/2007 7:22:04 PM GMT
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
I processed the two images with the program, and I then filled the area containing the 128's with yellow. The results are shown below. Note that the shadows do not have much effect on locating the path using this method.
I would also use an ultrasonic range finder to determine if the path ahead is clear. You could also shine a laser in front of the robot and mount a camera a few feet to the side looking at the line on the path. If the line appears straight then there are no bumps or valleys in front of the robot. If the line deviates up and down then there are bumps ahead. If the line is broken in places then the bumps and valleys are large enough to hide part of the line.
You won't be able to use the imaging technique for the off-road portion of the contest. A combination of using GPS, ultasonic rangefinder and the laser technique will probably work OK.
The image processing code that I used is attached below. Good luck on your project.
Dave Hein
I don't understand C, so your code is Greek to me. Anyway, will the program do the processing in real time? Also, once it finds the yellow path, is there anyway to find the center?
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Dave Hein
You could do a center of mass calculation to locate the center of the path. Or you could compute the midpoint between the left and right edges.
Dave
Craig,
I modified my program to draw red lines on the sides and middle of the path. The pictures are attached below. Of course, all you really need is a single value that tells the robot how far to turn to the right or left. You would only need to process a few lines of the image that are looking a few feet ahead of the robot. An average value computed over 10 or 20 lines is probably sufficient. In theory you could get by with a single scan line, but this would give you a noisy result.
This technique should be able to run in real time if you process only a few lines per frame, and you capture a few frames per second.
Dave
Once again, I can't read C, so I really don't understand your code. I'm amazed though, it seems to work very well for such a short program. Because of the fact I don't understand C, I'll probable stick with RoboRealm.
Once Again Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
By the way, I used PaintShop Pro to convert from JPG to BMP and back to JPG.· I also used PaintShop Pro to do the fill with yellow.· My program reads and writes BMP images.· It's easier than decoding and encoding JPG images, which I have done in the past.· My goal was to write a quick and dirty program to demonstrate the algorithm.
Dave
·
The code Dave has written is pretty straightforward, and written in such a way that it is quite similar to PBASIC. The only thing of any complexity·are his formulas, but thats math, not C. What about his code do you find "Greek"?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 4/18/2007 5:00:42 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Do you have any more images from the course? We'd like to work up a tutorial surrounding all the great stuff that has been discussed here and offer more insight into what the problems you will have with this task. The color saturation, YCrCb processing techniques are very simple and will work great as long as the path remains black/grey. We can post the configuration for all the techniques discussed in this forum which will allow everyone to experiment more interactively with those algorithms. Note that for this kind of a contest you will need many more example images. Specifically look for areas along the course where the road color/intensity changes (i.e. like between old and new road), areas with gravel or dirt, areas of sharp turns, areas with pot holes or broken asphalt, areas with any colored markings like arrows or signs on the road, areas with obstacles like a black trash can, etc. Also take a couple images from non-road surfaces.
When we did a field trip a couple years ago for research for the first Darpa Grand Challenge contest we spent a day out in the California dessert and took about 300 photos. After selection of the 'hard' images we ended up with about 5 images. Unfortunately, we are *still* working on those images from time to time even today ... so yes, this can be a hard problem but perhaps we can share what we've learned so far.
Dave,
We were also a little confused by your technique until you mentioned that you used PSP to fill in the 128 grey area with yellow. You made a manual tweak to the image that should probably be automated. I assume you simply used the flood fill by clicking in the lower center of the image within PSP? The floor area to the left of the orange cones is also 128 and by was not highlighted due to the selection of the larger/center area for the flood fill. Automating this selection would require some simplistic blob processing where either the larger blob or the one more in the image center is selected. It wasn't clear from your code that this action is needed so we thought we'd try to suggest how this could be done. This is just our guess ... perhaps you can explain more about your procedure.
Thanks,
STeven.
www.roborealm.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
Thanks for all the help,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Microsoft: "You've got questions. We've got dancing paper clips."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.