Sprint 13


Felles:

During this final week we are working to get the robot arm up and running. We’ve encountered a problem with a lack of servo motors required for the arm to be fully functional. The servos we needed were “TowerPro MG968” and unfortunately they weren’t available at campus. Luckily, we got a recommendation to visit a shop in Drammen called “Hobbymannen”, and we were able to purchase some servos there. Furthermore, the hardware we require for the project to be fully operational is not available, so we have to make some changes.

Maskin (Simen):

After some setbacks with the servos needed, we had to make do with what we could get our hands on. As of right now, the arm is mostly functional. The parts are at the moment a mix between stiff and heavy, although a bit too heavy for the servos we had to make use of, but with the time left, optimization will not be significant enough in time for the presentation.

An example of optimization being initialized by the use of Topology studies in Solidworks.

In hindsight I should not have relied on the school’s servos, and instead ordered my own.

When attempting to print the remaining parts for the video, I could not get it from the school, so I had to pull some strings and got help from classmates, so the parts were finished right before the recording of the video.

Elektro (Sondre): 

During these final days before everything has to be ready, I have been connecting everything for the card shuffler machine. In the picture below we can see the original wiring of the DC motors inside the card shuffler. 

Almost every wire inside the machine is connected to the battery power supply and feedback between the motors, so I got rid of all of them and simply connected 2 wires to each motor and fed the wires into the DC motor driver after some soldering. After everything was connected and ready to go I put everything back together and wrote a quick and easy script for the Arduino to test it, and the result can be seen down below. 

Right now the shuffling isn’t too accurate and sometimes shuffles two cards at a time, but hopefully with some tweaking the shuffler is more accurate. One of the problems with the machine is that the wheels that spin the card out to the camera detection chamber aren’t symmetrical at all, so that it sometimes spins out one card, and other times two cards. If there is enough time then I’ll see if I can ‘straighten’ the wheels a bit. 

Utilizing the same DC motor driver as the card shuffler, I connected a small but powerful DC motor to a new driver. This motor is the one that will push out the cards from the robotic arm when it is dealing out cards to the players.

Moving on to another subject, we sadly didn’t incorporate the use of SPI with our system. The reason is that since we are using ROS with an Arduino to control the motors, the communication between the Arduino and Raspberry Pi would be too complex with the use of ROS if we decided to communicate between the devices utilizing SPI. From an electrical engineers point of view I wish we had the time to use SPI as our means of communication between devices because I think that there would be more work split between the members of our group such that we could cooperate more than we have done.

Data (Danial):

When the group first chose an arm to hand out cards, I thought it was completely impossible, but we took the challenge. During the whole process, we have been good at distributing tasks and have come a long way on our project. I think we have all learned different things that we can take further in our education. Now I see that we have come a long way and have a project that is almost completed. We made several of the components that our system consisted of and adapted them. Now that we have finished this process, we have learned a lot. I have had the pleasure of getting to know more about the code world and not least ROS. ROS is an ingenious system that is used by countless developers on a daily basis. There are constantly new upgrades that allow the system to maintain efficiency and increase functionality. I have learned how to use this system and how to set it up, as I have done this twice since my computer would not cooperate with the World Cup. VM can be a challenge to run on a Mac as different accesses are required, this I experienced both when I had to connect to an arduino and when I had to update the PC. This past week I have not done much more with the code, I have only waited to get the arm so I could add the correct values ​​given which way we wanted to move the arm in. My main task was then delayed since the arm was not finished within the time.

Azim:

As mentioned we haven’t been able to integrate the different subsystems mainly because the different parts we were missing, were purchased, printed and received the required hardware just this wednesday, the day before the deadline. Unfortunately, that meant we actually deploy object detection.

Despite of this, me and Bjørnar wanted to revisit the requirements we had set for our part of the project. For the first requirement: “The system should identify the suit and rank of the card”. I started working on learning about TensorFlow and object detection in week 2 because I had no previous experience with it. Me and Bjørnar both really wanted to have this in our project by any means necessary, but as we progressed through the project and even up to this sprint, we realized that no matter how much we modified the model in terms of taking pictures, labeling them, using a different model to run on, the performance would leave a lot to be desired, both in terms of speed and reliability. That’s why i started to work on the openCV script in parallel to Bjørnar who kind of took over the TensorFlow responsibility, so that whatever happened we would have some sort of way to identify the suit and rank of the cards as the requirement suggests.

The second requirement was that “the system should use the identified card to recommend decisions to the player”.  This, on the other hand, was not that difficult, as it consisted of coding the blackjack game and integrating it with openCV script for the card detection which we couldn’t test in the final operational mode, but the script itself works successfully, and does as the requirement suggests which is recommending decisions to help the player during the blackjack game.

Data (Bjørnar):

The pictures below are a quick summary of my last ditch effort in trying to improve our custom machine learning model. My last effort included taking over 100 pictures and by augmenting them, turning them into around 700 pictures. After researching online, it was suggested that maybe the disappointing performance of the model was due to a low amount of pictures for the model to learn from, so by doing this, I hoped it would improve the performance.

When we ran this model, it didn’t perform better than the previous iteration of our custom model, surprisingly. Since we didn’t have more time to modify the model, we put the machine learning efforts aside because I also had other tasks to finish. Furthermore, to finalize i continued to work on the code for the blackjack script as well as the app.

Link to the code for our project is published at: https://github.com/BjoBor/RobotBlackjack?fbclid=IwAR3NoYgehbE1EvSxhn9OlfNrypGPPEu7rv1J4jsqqRxbRwolQ5dlQQGvAuc



Leave a Reply