Has anyone actually had success with the GoPiGo, Ultrasonic Sensor, and Python to program the device to complete a maze by turning and moving toward the largest distance?
and the second question
It would be cool to have the GoPiGo stream everything from the camera while running, say, a maze completion program-- running 2 or more scripts in parallel.
Do you have any notes on how to run browser streaming + any other script at the same time?
thx
Maze solving robot. Way Cool
They r talking about adding this to the local robot comps where I am as it is a great challenge.
First your idea for the maze solving robot may need some thining. How do you propose to get the robot to head in the direction of largest distance as a single US sensor will only tell distance single direction, you will either need an array of US sensors to tell distance in multi directions or have the US pan from side to side.
Google algorithm for maze solving and start with the easist then slowly go through the different possiblites.
BTW in the big maze compos they use AI and the robot teaches it’s self to solve the maze
1 Like
Cool project, but with an Ultrasonic sensor… Maybe. I did make a robot that could autonomously drive around a course with two sensors (BrickPi3), but it didn’t work that well. Being able to detect corners could be hard, in addition to not crashing.
Hi @fernanci123, @Shane.gingell, @graykevinb,
I’ve been working on a very basic robot algorithm that avoids surrounding obstacle and chooses the best path. It uses our new Dexter Industries Distance Sensor.
At the moment there’s a PR
waiting on the main repo.
Here’s the code I’ve developed for it.
The algorithm is really basic, but it proves the point that with a distance sensor and a servo you can make the robot orientate around. Again, this isn’t a maze solver, is just an obstacle avoidance robot - nothing more.
If I were to start developing an algorithm for solving the maze, I’d definitely go the AI
route.
You could do it mathematically, but the effort required to finish it is a lot higher than with AI
- not to mention the use cases you might forget if you do something mathematically.
Running multiple scripts at the same time with the GoPiGo3
is a breeze.
Also, we’re already working on a browser streaming
project for the GoPiGo3
.
So, you’ll be able to start the browser streaming
service and let the other scripts run concurrently on the GoPiGo3
.
Thank you!
1 Like
As they where talking about adding Maze to the local comp I started to research it (haven’t yet built a maze robot).
Introducing Maze into the local comp was about setting a base for students to grow into AI in uni
The AI method is what is used by the experts but AI takes a bit to learn how to use it. Not too many people in the world that can design AI well.
The easiest method of all that students usually start with is the random method, where you follow a corridor and at every intersection you just choose a random one to take and eventually you will by chance find your way out.
The second method that is better and also easy to program is the follow one wall method i.e always turn same direction at every intersection . I am sure we have all played computer games where we have solved mazes using this method. The only problem is if the goal is in an island you will never find it.
There is another method where you try to hold the direction i.e if you turn left then you add -90 to your direction counter and if you turn right then you add +90 to your direction and at any intersection you will see if you need to turn left or right depending upon where the counter is at, this method allows you to cross islands.
There is a couple of other algorithms that r more efficient but I can’t remember exactly how they work but google will explain