Go Down

Topic: Micromouse w/o encoders URGENT please (Read 617 times) previous topic - next topic

alex35748954

Hi!
I'm now making a project of micromouse
However, there's a problem with it: I can't use encoders
But I really hope that I can memorize the maze to reduce the time for the following turns (I use floodfill on it)
Is there any way to know how far the micromouse go?
If not, then is there any algorithm that can find the shortest path for the maze efficiently?

Thanks.

vinceherman


alex35748954

Why can you not use encoders?
Because that's the task our teacher gave
Our teacher gave our class a contest and I really hope that I can get good grade on it
So, I came here to ask

Thanks.

vinceherman

#3
Aug 14, 2018, 07:07 pm Last Edit: Aug 14, 2018, 07:14 pm by vinceherman Reason: Edited to number the list of questions.
Awesome.  

1. Can you post the details of the assignment?  It will help if we have a good understanding of your requirements.  All details are relevant and should be listed.  The specs on mouse and the maze specifically, but give the entire assignment.

2. Are you given a set of hardware or is it up to you to determine what to use?

3. When was the assignment given? 

4. When is it due? 

5. What is your arduino coding experience?

Most forum members will not do your homework for you, but are more than happy to help you do it.  So you will be writing the code.  We will help you with questions you have along the way.


alex35748954

Awesome.  

1. Can you post the details of the assignment?  It will help if we have a good understanding of your requirements.  All details are relevant and should be listed.  The specs on mouse and the maze specifically, but give the entire assignment.

2. Are you given a set of hardware or is it up to you to determine what to use?

3. When was the assignment given?  

4. When is it due?  

5. What is your arduino coding experience?

Most forum members will not do your homework for you, but are more than happy to help you do it.  So you will be writing the code.  We will help you with questions you have along the way.

1. The assignment is just like the contest of micromouse. But the start and end cells are at (0,0) and (4,4) respectively.
2. The hardware is listed below:
    I. Arduino Uno
    II. TT motor x2
    III. L298N (for TT motors)
    IV. ultrasonic module x3 (for front, left, and right)
3,4: It was given almost two weeks ago, and will end in three days...
5. I'm good at C++ (I've joined some big contests in our country)

Thank you very much for answering my question!

vinceherman

#5
Aug 14, 2018, 08:07 pm Last Edit: Aug 14, 2018, 08:09 pm by vinceherman
1. The assignment is just like the contest of micromouse. But the start and end cells are at (0,0) and (4,4) respectively.
Go find a link to the rules.  Don't make us guess what the goal is.  Each one of us who searches might come up with a different page.


Quote
2. The hardware is listed below:
    I. Arduino Uno
    II. TT motor x2
    III. L298N (for TT motors)
    IV. ultrasonic module x3 (for front, left, and right)
I think it will be a challenge just to make the mouse travel without getting stuck.
2 drive motor steering rarely goes straight.
Quote
3,4: It was given almost two weeks ago, and will end in three days...
This hurts.  You might be turning in a project that does not complete the task.
To salvage what can be saved from this, you are going to have to be aggressive with your completion.

Quote
5. I'm good at C++ (I've joined some big contests in our country)
Good. 

Now how to approach this:

1. make a mockup of the course.  You will need to test your mouse in various scenarios.
1a. a section of straight
1b. a section with a 90 degree bend
1c. a section with a T to the left
1d. a extion with a T to the right (or just run 1c from the other side)
Do you see what I am getting at?  You need to be able to test your work.

2. connect the motors to your driver, the driver to the arduino and the battery to the driver.  Load up the code for the driver and make the motors go forward, backward and in opposite directions.

3. connect the sensors and load the tutorial code for them.  Make sure you can get pings back that determine if there is a wall next to you or an opening.

4. come back here and describe your progress.

Edit: Oh, can you take some pics of your hardware and post that too?

alex35748954

1. OK, the rule of the micromouse is quite simple: build a self-running robot and solve the maze, for each maze, you have three times to attempt. The goal is to solve the maze as fast as possible.

2. I forgot to type this in: guiding wheel x1
(though this doesn't help much)

3,4: To salvage this, I've stay up almost all night for this (It's now 3:30 in the morning here)


For the approach part:
The section of straight line is OK, but for the turning process, it's not quite accurate as I want. (I'm still working on this part)
And what I'm looking for is how to know how far it goes if I don't use any encoder. Because as it started to run, the voltage might drop, and I'm afraid that if I hard code the PWM value for every action, it might get inaccurate at last.

And...Sorry that I can't take pictures of it. My teammates don't let me do so (Don't know the reason...)

vinceherman

1. OK, the rule of the micromouse is quite simple: build a self-running robot and solve the maze, for each maze, you have three times to attempt. The goal is to solve the maze as fast as possible.
I am worried about your description.  Having unclear goals leads to poor progress.
Earlier you stated
Quote
The assignment is just like the contest of micromouse. But the start and end cells are at (0,0) and (4,4) respectively
Micromouse has different rules that you just stated just now.  Wikipedia has an artical on micromouse where the process is described as having an explore phase and then a race phase.
The explore phase has the mounse finding the center and further searching to determine an optimal route.
The the mouse returns to the start position and races for a timed result.

Is your task
- to find the center in as little time as possible
or is your task
- to map the maze, return to start and then race to the center?


Quote
For the approach part:
The section of straight line is OK, but for the turning process, it's not quite accurate as I want. (I'm still working on this part)
I do not know how you can execute a 90 degree turn accurately.

Quote
And what I'm looking for is how to know how far it goes if I don't use any encoder. Because as it started to run, the voltage might drop, and I'm afraid that if I hard code the PWM value for every action, it might get inaccurate at last.
I agree that this will not be accurate.  And mapping will then be inaccurate.  If your task requires mapping, I cannot see a solution.  I would include a description of this condition in the report you will likely have to include with the project.
But if the mapping is not required, then simple finding the center constitutes success.

By the way, this is why I wanted the complete assignment included.  To remove ambiguity.  The goals are currently ambiguous and unclear.

Quote
And...Sorry that I can't take pictures of it. My teammates don't let me do so (Don't know the reason...)
Is it a requirement of the project that this important information remain secret?  Are your teammates worried about your classmates, who have the same hardware you have, will gain an advantage if you post pictures?
Honestly, you risk large failure by limiting the information that we need to help you.


alex35748954

It seems that I didn't describe the maze clearly.
The maze is 5x5 (cells) big, and our goal is to solve the maze from the lower left corner to the upper right corner.

As for the pictures' part, I hope that you can respect my teammate's decision.
I don't want to argue with my teammates over that, especially when it's running out of time on this project.

Well, if it can't turn left/right 90 degree accurately, I'll try to hard code it. I think maybe that's the best way I can figure out so far.
And if it's impossible for knowing how far it goes without an encoder, I'll just try right(left) hand rule instead.
Thank you for answering my questions!

vinceherman

If you get 3 shots at the maze, consider having the mouse alternate the left hand/right hand rule on each execution.
That way if one results in a faster solution, you will hit it.

alex35748954

#10
Aug 15, 2018, 12:31 am Last Edit: Aug 15, 2018, 12:32 am by alex35748954
If you get 3 shots at the maze, consider having the mouse alternate the left hand/right hand rule on each execution.
That way if one results in a faster solution, you will hit it.
I'm afraid that left/right hand rule might not be the best solution.
Take the below picture for example, both left hand and right hand have to move 20 cells to reach the end, however, flood fill will only move 8 cells.

vinceherman

How will you know you are in a particular cell in order to apply flood fill logic?  You do not have distance measurement.

Either solution requires the ability to identify walls vs opening, and navigate through them.  Concentrate on working out how to do that with the left/right hand rule. 
If you have time, consider trying the flood fill. 
But with the vast majority of your assignment time gone and the deadline looming, don't you think you should concentrate on some success rather than the win?

wildbill

I assume given the hardware you're allowed that you're expected to use the ultrasonics to help navigate. If the maze dimensions are micro mouse standard, you may find the left & right distances too short to measure. Have you done any experiments with them yet?

vinceherman

@alex35748954, good luck on your project.  If you have any last minute questions, please do post them.

I have a request.  Can you take some pics of the contest?  I would love to see your team's mouse, and those of the other teams.
Any pics of the maze or video of the runs would be great to see.

dougp

And if it's impossible for knowing how far it goes without an encoder, I'll just try right(left) hand rule instead.
Thank you for answering my questions!
Since encoders are excluded try an ultrasonic or lidar distance sensor.  If you're at X and the (current) wall is Y mm away and you know the cell size, you can calculate a distance to the next intersection/turning point.

90° turns: Are you allowed to place a reflector on the walls?  If so, you could add four photosensors to orient to the walls.

Just spitballin'.
So two neutrinos went into a bar.  Nothing happened.  They were just passing through.

Go Up