Project Outcome
The different parts of the project were not able to be integrated due to hardware issues. The number of obstacles and robots had to be reduced to 1 of each due to random readings not allowing for locating more than 3 objects total. The gears in the stepper motor were damaged throughout the project and was not able to do a complete scan by the end of the project.
Scanning Robot
When the stepper motor and the scanning robot were working correctly, it would first output a Cartesian map of the scanned objects. In the example, there are two objects. One slightly above the center and another South East of the center. Filters for the sensor data were implemented to eliminate false readings but also took away some of the data readings. On this example, there should be two semi-circles of 1's for the two objects. The objects should appear as semi-circles because when the robot is scanning it does not scan past the center. If I had to improve this, I would use a microprocessor with more memory. The Arduino Mega had only enough SRAM for two 38x38 matrices of shorts. The larger matrices would give more accuracy in finding the objects and their respective centers.
|
To locate each of the objects the text is taken from the previous picture each of the 1's have 1's added around it for a set radius and after you get a number map like this picture. At this point you take the largest numbers and use that as a center of an object. There is a 4 on the bottom that would be identified as an object and a 3 on the top would be also identified as an object. Just having two objects here takes up a fair amount of area of the Cartesian map. Having four objects would take up most of the map and could intersect. This also contributed to the idea of reducing the number of objects being scanned by the scanning robot. The radius of having numbers added to the 1's of the first Cartesian map because the numbers of this Cartesian map would not intercept enough to get numbers like 3 or 4. Two versions of Arduino code are written to identify which objects are robots and obstacles but I was not able to get to it because of time constraints and hardware failure.
|
By the end of the project sustained damage to its gears whenever something got in the way of the scanning robot of spinning. The video shows the the scanning robot trying to scan a complete circle. It only gets to about 270 degrees and has a rough time moving at the same places it one encountered an obstacle blocking its path before. A lot of time was also taken away from maintaining the scanning robot before it could no longer complete a full circle. A lot of tuning was required to get the ultrasonic sensor to bobble at a certain range of frequencies. If the ultrasonic sensor was bobbing at a bad frequency then the scanning arm would often go backwards and was not able to complete a full circle. Also the adapter used to fasten the scanning robot to the metal frame often broke and had to be re-epoxied multiple times, which took more than a day to harden.
Mouse Robot
There were numerous issues getting the Mouse robots to also work correctly. The first mouse was made of parts from different internet vendors and velcro but one of the encoders was not working so a micromouse from Berkeley's Micromouse decal was used and stripped of its distance sensors. Since the number of robots and obstacles were reduced and since the project was not finished it was fine just having the one salvaged micromouse. I was able to use PIDs and the encoder data to get the mouse robot to go straight and spin around its center at desired speeds. I wrote but was not able to debug Arduino code to have the mouse robot to make circles around a specific location relative to its starting point. The goal of the project was to have the scanning robot tell each of the two mouse robots to make circles around the two obstacles without colliding.
First attempt of Mouse Robot(bad encoder)
Salvaged Micromouse Robot
Mouse Robot Spinning PID
Mouse Robot Going Straight
Code
|
2 Obstacle Scanning Robot Code
|
|
4 obstacle Code Mouse Driver Mouse Helpers |