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.