First attempt at floodfill based Micromouse (Arduino nano) (Link to code in Description)

Sdílet
Vložit
  • čas přidán 1. 09. 2023
  • First attempt at Micromouse (Arduino nano)
    github.com/Pranjal-R-Agrawal/...
    The wall alignment is pretty bad because I was playing around a bit with how aggressive the wall following is and how long it takes to align itself with a front wall and set the values a bit too low.
  • Věda a technologie

Komentáře • 48

  • @111.ashwin
    @111.ashwin Před 9 měsíci +3

    Superb work!

  • @01aragog78
    @01aragog78 Před 5 měsíci +1

    love your work 👍👍

  • @MicroMouse
    @MicroMouse Před 2 měsíci

    Very nice

  • @amaanmeer8014
    @amaanmeer8014 Před 2 měsíci

    Amazing work! Is it possible to get the schematic diagram?

  • @hirushasasanka4220
    @hirushasasanka4220 Před 14 dny

    what is the main ino file need to upload , and what is the motor you used can you tell the model (encoder) , thank you great work brother

  • @0xatul
    @0xatul Před 9 měsíci +3

    Hey great work!
    I know little about micromouse's but that's pretty amazing to watch.
    Few questions, why did the mouse stop once it reached the centre and why did you had to restart from the beginning at 0:52 ? Is is how the flood fill algorithm works?

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před 9 měsíci +1

      The bot stopped at the centre because I have set it as the target. I haven’t programmed the bot to return to the start point so it stopped once it reached the target.
      The bot constantly updates its map of the maze as it explores. Hence, each subsequent run is better than the previous until the maze is completely mapped out. Hence, I restart it from the start point so that it can explore more and find better oaths (as it did!)
      You can learn more about floodfill and other maze solving algorithms here - www.123seminarsonly.com/Seminar-Reports/038/59360985-Maze-Solving-Algorithms.pdf, marsuniversity.github.io/ece387/FloodFill.pdf

    • @0xatul
      @0xatul Před 9 měsíci

      @@pranjalagrawalrobotics that's helps thanks

  • @icybreath1
    @icybreath1 Před 2 měsíci

    How did you make the maze? I want to try making the maze at home to test a micromouse

  • @peopledjester7907
    @peopledjester7907 Před měsícem

    A question, did you design the PCB board you used for the project yourself? And if so, could you provide it to me?

  • @suricool99
    @suricool99 Před měsícem +1

    Nice work. I saw your code and could see that you are adjusting the bot alignment with left and right ir sensors only with a threshold and not any pid . Any specific reason for this?

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před měsícem +1

      The bot does use PID for wall following (pid is used on both the ir sensor reading and the encoder reading)
      Threshold is only used for detecting walls after the bot has reached the centre of a block and wants to scan its surrounding walls.

    • @suricool99
      @suricool99 Před měsícem +1

      @@pranjalagrawalrobotics in your code i could see that you are calculating error based on encoder count difference and computing the pid value from that. And then computing wall error as difference between left and right ir sensors. Wall error +/- pid error+/- constant speed is the final output. Wall error is not from pid , it's computed directly. I was curious to know why no pid for ir sensor and only for encoder count

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před měsícem

      @@suricool99 just checked, and yeah, you’re right, I misremembered.
      Basically, what happened was that we started working on the bot around a week before the competition. In fact, we were still working on it on the day of the competition. We simply ran out of time and weren’t able to tune the PID for the sensors and so we computed it directly.

    • @suricool99
      @suricool99 Před měsícem

      @@pranjalagrawalrobotics we are also in a similar situation. We have got the constant speed part and wall follower part to work independently. We are stuck at a place where we are struggling to combine both speed/position based control along with wall follower pid control . Do you have any suggestions? How can we do this. ?

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před měsícem +1

      @@suricool99 I can’t be sure, since I never got around to implementing pid for the ir sensors and combining it with the encoders, but maybe you could try computing the pid value from the ir sensors and encoders independently and then combine them in a ratio you tune.
      Like, instead of directly adding/subtracting either the encoder pid value or the ir sensor pid value, you could compute smth like (0.7*ir_pid + 0.3*encoder_pid) and add/subtract that from the speed.
      I would assume that giving a higher weightage to ir sensors would work slightly better since they can actually sense and avoid the walls whereas if you start off slightly off angle, the encoders would be fighting to drive you closer to the walls.

  • @TheWell-beingWay186
    @TheWell-beingWay186 Před 5 měsíci

    Do you use a distance sensor or an obstacle avoidance sensor?

  • @luisduvantorradomora4131
    @luisduvantorradomora4131 Před měsícem

    proporcionas el código pero no el diagrama, como podría servir sin eso

  • @sergiopachecodiaz72
    @sergiopachecodiaz72 Před 2 měsíci

    What component do i need?

  • @charlysoledad3180
    @charlysoledad3180 Před 7 měsíci +1

    its necessary use 5 IR sensors, or can i use 4 or less?

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před 7 měsíci

      I think atleast 3 are needed. One for each of the side walls and one for sesing the front wall. Wall following will be pretty tough though woth so few sensors. With 4, you could place two directly perpendicular to the side walls and two slightly angled. Although, this setup may have difficulty identifying the front wall in time. 5 really is convenient.

  • @rexcode9366
    @rexcode9366 Před 4 měsíci

    How did you set the goal (how does bot know the goal position in the maze)?

    • @cowboygamer6980
      @cowboygamer6980 Před měsícem

      In coding he just follows the right wall

    • @rexcode9366
      @rexcode9366 Před měsícem

      @@cowboygamer6980 I know it's wall follow algorithm, but I want to know how does it determine the goal position?

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před měsícem

      @@cowboygamer6980nah, this uses the floodfill algorithm, not the wall following algorithm. That’s why it takes two completely different paths in the two runs.

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před měsícem

      @@rexcode9366it knows it’s starting position and that the goal is as the centre. It doesn’t know the wall layout.

    • @rexcode9366
      @rexcode9366 Před měsícem

      @@pranjalagrawalrobotics yeah, I saw your GitHub repo. Can you make a tutorial on it, explaing in detail

  • @kinhkong69z62
    @kinhkong69z62 Před 6 měsíci

    which motor you using ? in your github code the file .h meaning for ?

  • @01aragog78
    @01aragog78 Před 5 měsíci

    so its arduino nano , can it work on arduino uno or how do i change it to work on arduino uno

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před 5 měsíci

      The code should work as is, though you should check how much ram the uno has. If it is less than the nano then you may have to modify the code a bit.

    • @01aragog78
      @01aragog78 Před 5 měsíci

      @@pranjalagrawalrobotics and how to make it learn the make and fix the finish point to find the smallest path

    • @01aragog78
      @01aragog78 Před 5 měsíci

      @@pranjalagrawalrobotics hey bro i checked your coed and tried to verify it but its showing an error that the encoder is missing. how do i solve it.

  • @m4s0314
    @m4s0314 Před 7 měsíci +1

    how did u can simulator in mms

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před 7 měsíci +2

      I used this simulator - github.com/mackorone/mms
      They have provided code to connect the simulator to an arduino. In the arduino code, you can simply make calls to the provided simulator API instead of the motor driver and similarly make calls to the API instead of reading data from the sensors,

    • @m4s0314
      @m4s0314 Před 7 měsíci +1

      @@pranjalagrawalrobotics can i have your eg code in mms , thanks for replied

    • @komilelmurodov3401
      @komilelmurodov3401 Před 7 měsíci +1

      Code

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před 5 měsíci

      @@m4s0314 drive.google.com/drive/folders/1xG0jK4TJxe-gcxNtGWqhTgi0iRqMKp3k?usp=share_link
      The code modified to work with the simulator is older though

    • @pranjalagrawalrobotics
      @pranjalagrawalrobotics  Před 5 měsíci

      @@komilelmurodov3401 drive.google.com/drive/folders/1xG0jK4TJxe-gcxNtGWqhTgi0iRqMKp3k?usp=share_link

  • @ramshirbhate1319
    @ramshirbhate1319 Před 8 měsíci

    Code plzz