Society of Robots - Robot Forum

Software => Software => Topic started by: jbean on January 18, 2008, 03:58:00 PM

Title: Beginner with an unconventional maze (see pics included)
Post by: jbean on January 18, 2008, 03:58:00 PM
I'm very excited to be building my first robot for a project at school, but would like a little help.

All of the requirements for the robot are posted here http://www.csupomona.edu/~kranderson1/Research/ME%20499%20syl%20Winter%202008.pdf

I already purchased the parts from parallax and I have read a few of the tutorials about building my first robot.

The trick here is the maze.  it is not "normal" and I haven't been able to find any information or help on something similar.

I attached the pictures.  The start is at the big gap in the wall closest to the camera.  The finish is the big gap towards the back of the maze.  Notice that the outer wall also has smaller holes in it that are not the start or finish.  Also, the walls inside are randomly placed so that there is no "standard" width of the maze.  Any ideas of what kind of logic/sensors can be used to solve a maze like this.

Thanks for any help
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: Admin on January 18, 2008, 04:06:31 PM
Don't worry I have you covered:
http://www.societyofrobots.com/programming_wavefront.shtml

And check out the video at the bottom - my maze moves!

All you need is encoders and a scanning sharp IR:
http://www.societyofrobots.com/sensors_encoder.shtml
http://www.societyofrobots.com/sensors_sharpirrange.shtml
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: jbean on January 18, 2008, 04:23:06 PM
thanks!  I think it will take me a while to read through all the information so I will come back with any follow-up questions later.

Thanks again
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: jbean on January 30, 2008, 11:14:44 AM
So I think I understand the wavefront algorithm, but just a bit confused on the encoder part.  On the encoder link you posted below it mentions that encoders are not good for maze robots because counts can be lost if the wheel spins without the robot moving.

so for the wavefront do I need to preprogram the boundaries of the maze and the start and goal for the robot?  What would that look like?

I already bought the motors (suggested by the professor, simple stepper motor) http://www.portescap.com/catalog/80.pdf   P/N: 42M048C2U-N

Would it be easier to get motors that have encoders on them?

Thanks for any help
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: Admin on January 30, 2008, 12:46:21 PM
Quote
On the encoder link you posted below it mentions that encoders are not good for maze robots because counts can be lost if the wheel spins without the robot moving.
I was referring to the iRobot Create encoders specifically. But for all encoders, what you really need is a method called SLAM. But SLAM is fairly hard and as a beginner you shouldn't bother with it - at least not until you get the wavefront robot working.

Quote
so for the wavefront do I need to preprogram the boundaries of the maze and the start and goal for the robot?  What would that look like?
You can preprogram the walls in, or your robot can add walls in when the sensors detect the walls. It will look just like in my tutorial.

Quote
I already bought the motors (suggested by the professor, simple stepper motor) http://www.portescap.com/catalog/80.pdf   P/N: 42M048C2U-N

Would it be easier to get motors that have encoders on them?
Stepper motors have position feedback - just like a DC motor with an encoder. So you won't need an encoder, but you still need to do the same control in code - each step is a set distance traveled by your robot.
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: jbean on January 30, 2008, 01:16:52 PM
So basically, I preprogram the outer boundaries and tell the robot to go from the start to the goal.  On the way to the goal, the robot stops and scans at every grid spacing and advances foward to the next grid spacing if it doesn't sense a wall or turns if it does sense a wall then scans again?

I heard that it is very involved to control stepper motors as apposed to regular DC motors.  Which is easier for a beginner?  Doe sthe basic stamp II have the capabilities to control 2 h-bridges for 2 motors, along with the sensor input?

Do you think I am taking the best beginner route to accomplishing my goal based on the parts that I have ordered? Or should I change direction now.  I feel like I am very far from grasping the basic concepts for this robot and algorithm although I have read the tutorials a few times.

As always, thanks for your help
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: cooldog on January 30, 2008, 03:20:25 PM
since it's i time challange you should put bump sensors on the robot then change the code so that the robot moves 2 lenghths not one. then as it is going if the bump sensors get trigured it stops and scans
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: jbean on January 30, 2008, 04:27:42 PM
Will this just add complexity and cost to the robot while only having a potential time savings of .5 total time to complete maze?
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: paulstreats on January 30, 2008, 04:32:29 PM
Quote
On the encoder link you posted below it mentions that encoders are not good for maze robots because counts can be lost if the wheel spins without the robot moving.

I think that this is a problem that you are going to have to cope with. If the robot doesnt move overly fast then you reduce the chance of wheel slip error.

Ive been looking at maze solving competition videos and it seems like the fastest robots always suffer from losing their place due to wheel slipping (the people usually keep cleaning the wheels and end up getting touch penalties). A lot of the robots these days manage to complete a maze in under 10 seconds, but then they get the robot to try again and again getting faster each time until the wheel slip error prevents them from completing the maze any more, in reality because of the touch errors and solving time their overall time scores end up being like 30+ seconds even though the robot had a run time of 6 seconds. Personally id be happy with just 1 run of 20 seconds and win
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: jbean on January 30, 2008, 05:07:26 PM
At this point in my adolescent stages of robot design I would be happy with simply finishing the maze!  I'm not worried about the time just the correct algorithm and being able to actually complete the maze.

Reading up on the parralax website it looks like all I need to control the Stepper motors is found here http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/Stepper_Motor_27964.pdf

Anyone have any experience controlling two stepper motors with one basic stamp II.
Title: Re: Beginner with an unconventional maze (see pics included)
Post by: Admin on January 31, 2008, 09:51:31 AM
Just get a stepper motor driver and move on to the next problem ;)

such as this:
http://www.sparkfun.com/commerce/product_info.php?products_id=8368