loading
 
Path Finder (Ceiling camera0
Anonymous
8 years
Hello
First of all I would like to thank you for developing this awesome software.

I am making a path finder robot with an overhead ceiling webcam. Obstacles can be of any size or shape. However, robot and target will have some distinct image over them to be easily distinguished. I have successfully extracted robot, target and obstacles' blobs used many modules including the blob filter. The floor is black and the obstacles are white.
But I am lost after that. I cannot reduce the size of the image as you did in Marble Maze tutorial because neither the obstacles are of fixed shape and size nor are they arranged in a grid. Thus, I have to process them in current (640 x 480) size unless you have some other alternative.
However, I was thinking if I could somehow create an imaginary grid over the image and mark a particular cell as an obstacle if any pixel in that cell is white thereby reducing number of computations. Then, reduce the image according to the grid size and then process the images not as pixel by pixel but in a grid as cell by cell where a cell could be a defined number of pixels. Obviously this would approximate the shape of obstacles but I think we can manage a trade off between speed and accuracy.
Also, I tried to follow your Marble Maze scripting but wasn't able to get much of it. I know VBScript. Can you explain what is actually happening inside the code.
I am attaching the source webcam image and the robo file. I am not sure if whatever modules I have used is the best way to extract things.

Thank You in advance.
Regards,
Gaurav Kumar

 

program.robo
Anonymous 8 years
Hello again Steven

I kept on trying and experimenting with different modules and settings. Then I stumbled onto a pdf in which the concept of C-sharp transform was explained. According to it, consider the robot as a point and enlarge the obstacles and walls by half its breadth. That way it will cross out narrow paths and the robot won't collide with the obstacles or walls. Here comes my first problem. When I use Dilate module the obstacles that were circular in shape transformed into rounder corner squares. Isn't there any way by hich the shape or aspect ratio is maintained when enlarging a blob?
Nonetheless, I went ahead and encountered a problem with the algorithm of C-sharp transform. It asked to enlarge walls and obstacles. But not the target. If I don't enlarge the target the path is shown to the target through a narrow path between it and the wall since only wall is enlarged but not the target. If I enlarge the target to satisfy the robot's point approximation then path planning module won't show any path to the target since the COG of target is embedded around black pixels (I have checked the option of plot along non-zero pixels to avoid black pixels). Now I really don't have a good idea to deal with this. Although I have done something. I used Point Location module to locate highest, lowest, leftmost and rightmost points and put these in a variable that is supplied as the waypoint variable. However, it is not necessary that only one of these points will be reachable and the robot will have to circle around the target. I want to turn off the path planning module as soon as any of the waypoints is reached. Then I can programatically guide the robot from its perimeter to the COG. I don't know how to do this (turning off of the module).
I am attaching the robo file, the source image and the final image. The boxes with cross-hair are obstacles.

Thanks in advance for helping.
Regards,
Gaurav Kumar

  

program.robo
Anonymous 8 years
Gaurav,

Thanks for all the explanation and image. It looks like you are on the right track and we will investigate the dilation issue on circles.

Could you attach an image that shows your statement on "If I don't enlarge the target the path is shown to the target through a narrow path between it and the wall since only wall is enlarged but not the target." as I'm a little confused as to why this is an issue. I just want to be sure I understand why this is an issue before suggesting a fix.

Thanks,
STeven.
Anonymous 8 years
Hello
Actually I had my doubts on a very peculiar case where the robot may have to travel between target and wall due to the complexity of an obstacle. But that is very rare and if possible I think the algo should work fine.

Now the only problem that remains is that of dilation. Circles turn into rounded squares and squares turn into distorted hexagons which may lead to collision.

Another glitch is that the path, which the path planning module gave, keeps on changing but only by 1 or 2 pixels. This is due to the flickering of the boundary of obstacles. What is the best method to reduce this type of flickering. Currently I am using the Average module but it doesn't reduce the flickering unless averaged over 10 frames.

I would also like to bring a bug to your concern. In the path planning module, choose robot's location as (4,4) and delete the default value of zero from the waypoints x or y, it keeps on displaying an empty alert box that just won't go away.

Thanks.
Regards,
Gaurav Kumar
Anonymous 8 years
Hello Steven

I have to submit this project in my college. Obviously I can't tell them that I used this wonderful software which does all the time consuming work for me. I can surely submit the robo file but that would be just like 300 lines of code for them, and they would expect something big when the results are big. How can I handle with that? Can you guide me to the libraries that Roborealm is built upon. FAQ says OpenCV and CMVision while the documentation says FreeImage. Also I can submit whole of the OpenCV code. I would like to have only some relevant parts of it. For instance, I am using floor finder and path planning. It would be nice to have the logic behind them along with some code to show. It doesn't matter if I am not using it directly.

Thanks.
Regards,
Gaurav Kumar
Anonymous 8 years
Gaurav,

Unfortunately I think you may have a lot more work on your hands. RoboRealm is NOT based on OpenCV nor CMVision. We have a page that lists all of these alternate packages as we realize that RoboRealm may not be the right solution for everyone.

Unless you can just submit the robofile I would immediately start becoming very familiar with any of the other open source packages like OpenCV or ImageJ that you could submit along with your project. Note that these packages do not include things like the floor finder nor the path planner ... which is normally why these are used in a classroom project as you are forced to write your own to be included with these packages.

Note that the floor finder could be easily replaced with a simple manual threshold which the other packages do include.

What are the project requirements? Are you sure they will not accept RoboRealm as a 3rd party application that can be used in your project?

STeven.
Anonymous 8 years
Thanks for the reply.

Actually the project's requirements are such that only 300 lines of code (robofile) may seem to be less on my part. That's why I was going towards something that I could show and create the impression that a lot has been done on my part although automatic path finding isn't as easy as it looks.
I may be off the topic here but can you tell me the complexity that will be involved if I use OpenCV to accomplish the same results that I can getting now using the attached robofile.

And do tell me about the dilation thing.
Thanks.
Regards,
Gaurav Kumar
program.robo
Anonymous 8 years
Ohh, we're not 100% familiar with OpenCV (obviously we have RoboRealm to focus on) so we would not be much more help with OpenCV other than it will be a lot of work (think weeks) ... unless OpenCV has added in the ability to do path planning that we don't know about.

Maybe you could use the API to have your program send the appropriate commands to RoboRealm .. perhaps the inclusion of the API will help to "bloat" your submission?

The dilation module has been updated to allow for different kernals to be used. If you use the 5 7 11 kernal that will result in a more rounded dilation that will only slightly round square corners but at least keep circles looking like circles. That should help with collision issues ...

STeven.

Anonymous 8 years
Thank you.
Now the dilation works good. And the image border thing eliminates adding an extra rectangle for the walls.
You have been great help all along. Thank you once again.
Anonymous 8 years
Hello
A major unexpected problem has come up. Since dilated obstacles are black if the robot by mistake (or by inertia or by delay in wireless signals or by slow fps) enters the dilated region, it will lose its path. Although it doesn't collide immediately with the obstacles but stays in the darkened area searching for non zero pixels. Is there any solution to this problem? Also is there any way to keep a safe way from the obstacles and even their dilated regions?
Thanks.
Regards,
Gaurav Kumar
Gaurav Kumar from India  [3 posts] 8 years
Hello Steven
I am waiting. Kindly reply.
Regards,
Gaurav Kumar

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index