I am writing this blog post because I wanted to ask an open question that could be discussed in detail. I am open to suggestions and criticism. I have posted this on several forums and took valuable suggestions in building the system. I am stuck at a stage where I am totally clueless in solving the problem.


I used the following video as my inspiration:



I have built my own system shown in the figure below:

Now I am using OpenCV on a linux machine. I am using stepper motors and my stepper motor controller board is the egg bot board:



It can control two steppers at a time. Now I have taken the image processing to a stage where I have extracted the track data as shown in the figure below:


I have painted the labyrinth maze ball green in color and I have extracted the ball coordinates as shown in the figure:


How do I make the ball follow the line and make it go home? A gentleman asked me to take the Kalman filter method in OpenCV. I found it to be a valuable. Should I make the ball go in an round fashion as shown in the example for the starters?


I am totally clueless about making it follow at least a straight line. Now, I am finding it very difficult to operate my stepper. If I have to operate the stepper, the commands I have to issue is time duration of rotation and the number of steps. Now varying both these parameters just varies the angle of tilt every time. My ball keeps rolling back and forth if I implement a PID algorithm without any purpose :( I was suggested to use servo motors a long time back. I was always a big fan of the stepper.


Do you think I should use servos so that I could tilt the maze for a known angle instead of a stepper motor? I am confused because my maze would suggest roll the ball haywire even for small tilt of a maze. I was told OpenCv's Kalman filter can actually take the servo commands between 0 and 255 and provide a signal output that could be used directly operate the servos.


I am ready to switch to servos if that is really an advantage. I am looking forward to the group member's opinion on the algorithm to start with and the usage of servos.


I am planning to stick a cardboard on top of my maze and make it follow a line using the kalman algorithm from opencv and operate my motors effectively.



Views: 1296

Comment by eric gregori on July 29, 2011 at 10:42pm

I started doing a simular project thinking it would be easy.  It's definitely not a easy problem to solve.

I used servo motors.  I think that will simplify part of the problem.  Where I ran into a brick wall was compensating for momentum.  One thing I did that simplified the problem was using a lighter ball ( less momentum ) but I still never got it to work correctly.


Comment by Sai Yamanoor on July 29, 2011 at 11:50pm

So i am pasting a link below:




How would he have solved it?  I am also considering servos as it make my problem easier

Comment by eric gregori on July 30, 2011 at 12:29am

It looks like a plastic ball.  A hollow plastic ball would have very little mass resulting in less momentum, making it easier to control.  Even a solid plastic ball would be easier then the standard metal ball bearing that normally comes with those mazes.

When the video shows the screen, you can see his algorithm is predicting a ball path.  That prediction can be made by knowing the current speed of the ball, the mass of the ball, the friction between he ball and the surface, and the angle of the surface.  All those variables are know, so it appears his algorithm uses those parameters to predict the path of the ball.  You can use vision to determine speed based on displacement between consecutive frames. That also gives direction, thus a current vector for the ball.  


You need to be a member of buildsmartrobots to add comments!


© 2015   Created by eric gregori.

Badges  |  Report an Issue  |  Terms of Service