I told my AI robots to race and this happened...

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
these two robots are using lighters and are doing a boards running machine learning algorithm and in this video I want to make them race in the last video I built this robot with the idea of making it drive autonomously in the racetrack built out of cardboard after a lot of troubles manual driving to collect all the necessary data for training and developing a few machine learning models I was positively surprised with the results the robot was driving really accurately even at high speed but how about making even cooler and building another robot this robot will be built just like the first one with RP parts so there was a lot of free printing assembly and free screws involved but it was all super easy and most importantly you can find all the parts for this robot and other robots for free at open robotic platform.com I already have a second lighter for this robot pre previously I used a lighter from freei robotics it was called Delta 2i it's not a very popular model and I don't think it's available anymore but this time I'm going to use airp ligher which is probably the most popular lighter among hubit right now but there is a problem I have no idea how to use it with the Arduino I even had problems to connect it to the Arduino of course you can easily find the pin out in documentation the documentation is not really that easy to find but if you dig up it you can find it on the internet but then the connector is super small and you cannot really fit any cables into the connector I don't have any kind of connectors cables that would work with that so I decided to do something that I really don't like to do and that is cut off the connector and just solder the cables breadboard cables so I can easily connect it to the ardu I do not recommend doing that and modifying the original part because then it's hard to put it all together and use it in other projects but sometimes that's what you have to do and overthinking it trying to find online the perfect connector waiting for shipping it it to you it all takes a lot of time so sometimes just doing the easiest way possible is the best way you can do it I found two Arduino libraries for air pider and since the documentation wasn't really detailed I had to get one of them working the first one wasn't working at all it wasn't even close and the second one seemed to work but not always and that became a huge problem that I tried to solve for like 3 days the lighter was especially not working when I connected it to the rest of the robot like the motors and everything so an obvious idea is that there is some kind of interference and noise that is disturbing the lighter so I tried a lot of different ways to connect it and in the end after 3 days it turns out that when you connect the airp ligher directly to the 5vt pin on the Arduino it helps and it finally works because previously it was connected to the breadboard and then from the breadboard to the 5V pin so connecting directly to the Arduino solved everything remember about that if you are going to use air pider in your Arduino projects you may face some problems with the noise custom PCB would probably solve all the problems related to noise in this project and that could be a perfect transition to a sponsor of this video but it's not because this video is not sponsored I'm really picky when it comes to choosing sponsors for my videos and that's why most of them are not sponsored and of course making this project requires all some money a lot of time and a lot of effort if you would like to support what I'm doing here you can do that on my patreon you can check out my industry store you can use super thanks here on YouTube or you can just comment like and consider subscribing if you like my content all the links are in the description thank you very much as I mentioned I spent three days on just getting the airp lighter to work and I was really close to giving up but I didn't and fortunately we can move on to the next step once the second ligher started to work I noticed that the data is a lot more clear there is less noise than with the first ligher and because the library is available it will most likely be a lot easier for beginners to start with this ligher but because I developed my own way of working with the first ligher from free ey robotics I actually kind of preferred but I might be emotionally attached because I spent a lot of time like weeks to get this lighter to work with the Arduino so yes airp lighter might be easier to use but I kind of personally prefer the lighter from freei robotics that is not available anymore so we will kind of have to go with RP lier I think these one should work having the other lighter working I assembled the second robot and uph holded the classifier from the previous video I just modified part of the Arena code where it communicated with the lighter but everything else was pretty much exactly the same and it worked it's so late that the only thing I'm thinking about right now is going to sleep but I wouldn't be able to sleep without testing if both robots will work at the same time [Applause] that's it for today and I feel much better after getting some sleep so yesterday I tried to run both robots at the same time and it was Ms they were all over the place it was basically like a twins Simulator take a look at this the play button is finally here in its place really cool thanks a lot for subscribing and if you didn't yet consider that down below having both robots running and like being able to stay in the racetrack with the same program was super cool but they were not able to race at all that's how smart they are the One problems I haven't noticed in the beginning I haven't thought about was that it's really hard to take care of two robots at the same time and especially the fast one we'll have to see how that goes and if I will be able to handle all that myself because it's not easy they were running at pretty much the same speed so it was almost impossible for them to catch up and overtake and even when they did they had no idea how to detect and avoid the other robot and this problem the problem of detection and avoiding the robot was the biggest problem I faced when working on this video I was pretty curious if the two lters won't interfere with each other and it seems not to be a problem after the test in the racetrack uh but the problem is that they cannot really see each other because just this tiny portion of the lader is what each other lader can see the laders were at the same same level and there was no any kind of surface on the robots to detect the other one I fixed that with a piece of paper and some RP [Music] connectors that was pretty easy but training the classifier to avoid the other robot wasn't that easy to teach these two robots to race we have to actually race them manually one of them will be controlled by the algorithm developed in the previous video and the other will be controlled by m a professional goar driver the plan was so simple just let one of the robots autonomously slowly drive through through the racetrack while manually controlling the other faster robot collect all the data train the classifier and it will all work perfectly there's a lot of problems with this plan firstly the overtaking is like such a rare event that you do it every two or three laps and it looks like noise in the data to the classifier it is not able to train on that it just looks at the walls so even though I tried really hard and mat helped me a lot I knew after looking at the visualization that it's not going to work having given more drive at the same time in the race track wasn't realistic so it was time to simplify and I had an idea on how to turn this very Dynamic problem into a partially static problem that should be much easier to solve we buil some tubes out of paper and place them in the RAC trck that way it's kind of easy to navigate in the racet trck only one robot is moving and not two at once and we can collect more data on actually avoiding the obstacles we collected the data trained the classifier uploaded to the Arduino and started testing and it didn't work as it should it really doesn't work again unfortunately I know why we have just five of this into race track so the actual data that this thing is in front of Dr when you manually drive it is probably like 5 to 10% maybe even lower than that it's not enough to properly select the data and train the classifier what is the solution we need more of that and I already have more of that after filling the entire racet track with paper tubes it was more about avoiding the obstacles rather than just staying in the racetrack manually driving it was a challenge but was also the last piece of hope that I will make it work I was constantly changing the placement of paper tubes in the RAC track and as well as the shape of the RAC trck to make the data more variant train classifier wasn't working sometimes it was able to avoid the obstacles but generally it wasn't aware of the walls so I thought it's time to create the mega data set with all the data sets that I collected in this and previous video it was over 60 megab of data in plain text file that was the last hope for me if the mega set wouldn't work I had no other plan on how to tackle this problem other than creating a computer simulation that could simulate multiple robots at once but that sounds like a lot of programming so I wasn't really eager to do that fortunately it worked and the robot was able to both stay in the racetrack and avoid the obstacles the accuracy of the classifier was 59% so rather low but that was in the beginning I was able to increase it to almost 70% by increasing the number of selected Dimensions from 30 to 80 and at this stage it was time for a serious test I wanted to see both robots race in the racetrack and one of them overtaking the other I didn't want it to be just a lucky move but rather an intelligent adaptation to a constantly changing environment the [Music] and it worked I'm really happy and it is incredibly satisfying to see your project working after spending so much time and effort on it of course they are not perfect sometimes they still do crash into each other or into the wall but that's totally fine but that wasn't enough for me I wanted to see them race in a bigger and more complicated race track with some additional obstacles built out of paper tube that is going to be a real [Music] test and after plenty of time data and train classifiers I achieved my goal and made the robot's race sometimes watching these overtake Maneuvers is super satisfying and there's still plenty of things to test with this kind of robots so I'm open to your ideas in the [Music] comments [Music] I [Music] all
Info
Channel: Nikodem Bartnik
Views: 34,885
Rating: undefined out of 5
Keywords: arduino uno, uno r4, machine learning, lidar, robot, open robotic platform, rplidar, autonomous
Id: KJIKexczPrU
Channel Id: undefined
Length: 13min 8sec (788 seconds)
Published: Thu Oct 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.