Sprint 12


Common:

After weeks of corona trouble and 4 out of 5 group members having to quarantine for a week, we were finally able to meet in person. We discussed the progress of our project and what each group member is currently dealing with. There is 3 weeks til the deadline, and after not being able to properly meet and discuss we are behind schedule, so we must work urgently  during this last stretch in order to have something to show for. What we are focusing on now, is to finish up what we are doing individually and testing those parts as soon as possible so that we can come together and integrate it.

Maskin (Simen):

Last week I got to print a servo converted part out to see whether the measurements held up in real life, and found there were some adjustments needed, so I changed that and printed the rest of the parts as well, and when testing if they fit, they fit well with both the servo and the stepper. In addition some adjustments were made for general improvement of the design.

I also laser cut some parts to allow us to set up the camera and flashlight for getting the cards read into the system. When testing with the card shuffler under, we found it to be working, but crude, and warranted some changes.

So I made a new design we aim to connect to the shuffler directly, and cut those parts out.

The new roof with a sleek design, hitmarkers and holes for both camera screws and the light. Still designing the spring held deck part of the arm.

Elektro(Sondre):

Last week I bought a card shuffler machine online but unfortunately the shipping was quite slow and I received it this week. While waiting for the shuffler I looked some more into the circuitry I wanted to incorporate between the shuffler motors and it’s power supply so that I could control it’s speed and make it run in intervals. My original idea is shown in the figure down below.

The circuit shown in the figure is meant more to show my idea and isn’t necessarily how it would look like. The idea was to use a transistor between the motors power source and ground, and to connect an Arduino on the transistors gate. The Arduino would send out a pulse wave that would ‘open and close’ the transistor in order to make the motor start and stop. 

The idea seemed possible to carry out, but I wasn’t sure where to start, so I talked with Dag to get some pointers, but I got a reality check instead. Controlling the intervals of the motors the way I had in mind would probably be a lot harder than I anticipated, and that I instead should use a standard motor driver shield with the Arduino. After reading up on the motor driver, I can confirm that it seems much simpler to control the motor this way, since the motor driver allows me to not only just turn the motor on and off, but determine it’s speed as well utilizing PWM signals. I then got my hands on a L298N motor driver, which is pictured below.

This motor driver can run two motors simultaneously which is perfect for this application.

Data(Danial):

This week I have had a slight relapse of the development of the code. My computer decided not to work with ViritualBox after updating the software on my computer. Since there is a security feature or lock inside the software, I had to Enable it so that I could download ViritualBox again. And create a new virtual Linux machine that I could use for ROS. Since I had to make a new virtual machine, this also meant that the machine “forgot” the port that has been used before, and therefore had to make sure that this was done correctly.

All progress that had been made was uploaded in a GIT so that the code is always taken care of. I have cloned the Git for Ubuntu and downloaded it. When I had to modify the code and start ROS, the ports would not be recognized by the computer. I have tried to find out which port is in use when I connect the Arduino, but without success. I have managed to get the computer to recognize when the port is in use, but I can not run ROS on this port.

In the pictures below you can see the error messages I get when I try to run ROS, I have also manually tried to find out which port is in use, but without success. In the picture you also see that the subscriber and publisher are working.


Data(Azim)
My tasks during this period have been all coding. I’ve worked on the algorithm which will allow a player to “count cards”. There are different variations to this algorithm, but the one I will use is known as the high-low scheme. It requires the player to add 1 when a low (2-6) card is dealt and subtract 1 when a high-value card is dealt (AJQK10). The idea is to repeat this counting process and increase the size of the bet when the count is high and reduce it when it is low.

Snippet of code

This was fairly simple, and there was tons of material online, but what i need to do moving forward is to incorporate this with the video stream of the camera identifying each card, so that the algorithm can update and the program can make suggestions in real time. Furthermore, i’m also working on

Data (Bjørnar)

To make our image recognition more accurate I have looked into image augmentation. Even though we just take one picture of each card in the card shuffling machine i can augment them in many different ways to get a much larger dataset. This should make the detection more reliable without us having to take hundreds of pictures of the cards. 

I will use a script to augment the images in many different ways. Below is an example of how the augmentation will make the images look. By blurring and covering some of the playing cards virtually we can simulate how it may look if the camera is out of focus or a small item covers some of the card during actual use.





Leave a Reply