{"id":5976,"date":"2022-10-16T17:34:07","date_gmt":"2022-10-16T16:34:07","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=5976"},"modified":"2022-11-29T08:17:42","modified_gmt":"2022-11-29T07:17:42","slug":"group-2-week-8","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=5976","title":{"rendered":"Group 2 &#8211; Week 8"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mechanical Engineering<\/h2>\n\n\n\n<p>Last week was the fall break, and I only worked a few hours on the design of the robot arm. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>For this week (week 8) I have been working on the design of the robotic arm and the design of the turn table. As I have mentioned before, I ended up doing some changes on the initial design of the arm. But the concept is based on the same idea, that the arm will have the &#8220;same&#8221; function as a <em>human<\/em> arm. I am still waiting on the arms for the servomotors.<\/p>\n\n\n\n<p>The turn table will give the player the possibility to choose if they want to play black or white pieces. The turn table will be motorized with a stepper motor and based on what my group members want, the idea is that one can operate the table with a single button or toggle switch, which will make the table turn 180 degrees. How the steppermotor will be operated is not finalized. <\/p>\n\n\n\n<p>Workhours this week: 7. <\/p>\n\n\n\n<p>Liv Marte Olsen &#8211; Mechanical engineering.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>Jeg har n\u00e5 modifisert koden til sjakkalgoritmen slik at den sender sjakk-koordinatene for trekkene til maskinspilleren fra python til arduino for \u00e5 sette servomotoren i en bestem grad i arduino. Importerte serial library, satte opp en port (COM7), og overf\u00f8rer deretter koordinatene gjennom COM port. I python sjakkalgoritmen: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"415\" height=\"25\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/image-70.png\" alt=\"\" class=\"wp-image-7201\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/image-70.png 415w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/image-70-300x18.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"348\" height=\"75\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/image-71.png\" alt=\"\" class=\"wp-image-7202\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/image-71.png 348w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/image-71-300x65.png 300w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><\/figure>\n\n\n\n<p>render funksjonen som blir kalt her er fra selve sjakkalgoritmen, men jeg fant ut at det er denne funksjonen som returnerer koordinatene som &#8220;maskinspilleren&#8221; har utf\u00f8rt. Det er disse koordinatene jeg m\u00e5 sende til arduino s\u00e5nn at armen kan utf\u00f8re trekkene fysisk.<\/p>\n\n\n\n<p>Jobber n\u00e5 med \u00e5 gj\u00f8re klar koden i arduino som skal styre armen ved \u00e5 sette opp strukturen og lage funksjoner for hver koordinat. Hver koordinat m\u00e5 leses slik at en bestemt funksjon kj\u00f8rer. Hver funksjon m\u00e5 ogs\u00e5 vite n\u00e5r den skal plukke eller slippe brikken for \u00e5 vite n\u00e5r den skal sl\u00e5 p\u00e5 eller av magneten. P\u00e5 den f\u00f8rste koordinaten (2 f\u00f8rste characters) som kommer inn skal det plukkes fra, den andre p\u00e5f\u00f8lgende koordinaten (2 siste characters) skal det slippes p\u00e5. Bruker charAt() funksjonen for \u00e5 lese av hver koordinat og se om den skal plukke fra eller slippe p\u00e5 koordinaten. Skriver ferdig koden n\u00e5r armen er klar. Da m\u00e5 de bestemte servomotor gradene for hver koordinat settes inn i sin tilsvarende funksjon. Har ogs\u00e5 en plan om \u00e5 lage en funksjon som fjerner en brikke fra plassen sin hvis den siste koordinaten (der det skal slippes en brikke) allerede er opptatt. Da m\u00e5 jeg ha en &#8220;fjern-funksjon&#8221; som fjerner brikken som allerede er p\u00e5 plassen der en ny brikke skal flyttes til. Alts\u00e5 n\u00e5r en brikke sl\u00e5r ut en annen brikke, slik at den ikke legger en brikke opp\u00e5 en annen brikke. (5 timer)<\/p>\n\n\n\n<p>Kevin Johansen &#8211; Computer engineer<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>Denne uken har jeg hatt eksamener(konte) s\u00e5 har ikke brukt noe s\u00e6rlig tid p\u00e5 faget, bortsett fra \u00e5 m\u00f8te opp og snakke med gruppen.   <\/p>\n\n\n\n<p>Hossein Sadeghi, Computer science. <\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Computer Vision<\/h2>\n\n\n\n<p>I didn&#8217;t complete any work last week since I had two exams that I needed to pass in order to begin my bachelor&nbsp;project the next semester.<\/p>\n\n\n\n<p>I did visit Zoran at his workplace to pick up a&nbsp;Raspberry Pi 3B+, which I will test soon. I can&#8217;t yet continue working on the new one because Joakim still has the SD card and power supply from the Raspberry Pi 4 I previously had.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"has-tertiary-background-color has-background\"><strong>I had Covid this week, which is why I was unable to attend class.<\/strong><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Chess pieces<\/h5>\n\n\n\n<p>I&#8217;ve decided to paint every chess piece so they stand out more to the camera. White symbols will be assigned to the black&nbsp;pieces, and black symbols to the white&nbsp;pieces. As a result, the computer vision model will be significantly more accurate because the symbols will stand out in a bigger range of&nbsp;lighting.<\/p>\n\n\n\n<p>The white pieces wouldn&#8217;t be distinguishable if it were too light, and the same would apply to the black ones in the dark. For them to be opaque, I ultimately had to paint the black pieces three times and the white pieces twice. I spent approximately 2.5 hours on this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"502\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/paint-1024x502.jpg\" alt=\"\" class=\"wp-image-6761\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/paint-1024x502.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/paint-300x147.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/paint-768x376.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/paint-1536x753.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/paint-2048x1004.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h5 class=\"wp-block-heading\">images for dataset<\/h5>\n\n\n\n<p>The chess pieces were prepared at this point, allowing me to begin capturing photos for the dataset. I took about 300+ pictures in a variety of setups. Liv Marte and I determined that the camera should be positioned about 50 cm from the board, and it will also be this height at the end, to get the images as close to the finished configuration as possible. It will be less likely to predict incorrectly if the photos are as similar to what it will ultimately encounter.<\/p>\n\n\n\n<p>To enable it to handle a greater range of lighting conditions, the camera is also positioned directly above and photographs are taken in various lighting conditions. About 2 hours was used on this segment.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-1024x1024.jpg\" alt=\"\" class=\"wp-image-6763\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-1024x1024.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-300x300.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-150x150.jpg 150w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-768x768.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-1536x1536.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/2-1-2048x2048.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-1024x1024.jpg\" alt=\"\" class=\"wp-image-6764\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-1024x1024.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-300x300.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-150x150.jpg 150w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-768x768.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-1536x1536.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/3-2048x2048.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"418\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/6-1024x418.jpg\" alt=\"\" class=\"wp-image-6790\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/6-1024x418.jpg 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/6-300x123.jpg 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/6-768x314.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/6.jpg 1131w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h5 class=\"wp-block-heading\">Starting the annotation process<\/h5>\n\n\n\n<p>I downloaded the completed images to my computer and immediately started planning&nbsp;all the classes I would require for the model to be able to recognize. I also watched a YouTube video on how to annotate images the best way possible, which included making sure to obtain the entire item, and continue&nbsp;to annotate over any overlaps between classes.&nbsp;<\/p>\n\n\n\n<p>I&#8217;ve discovered that it&#8217;s really simple to change classes and remove classes in the end, so it&#8217;s best to create more than you think you&#8217;ll need just in case. Keeping this in mind, I choose the following 14 classes:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>board<\/li><li>whitePawn<\/li><li>blackPawn<\/li><li>whiteBishop<\/li><li>whiteKnight<\/li><li>whiteRook<\/li><li>blackKnight<\/li><li>blackBishop<\/li><li>blackKing<\/li><li>blackQueen<\/li><li>blackRook<\/li><li>whiteKing<\/li><li>whiteQueen<\/li><li>flipped<\/li><\/ol>\n\n\n\n<p>After starting to annotate the images, it took me around 4 hours overall, including the earlier preparation and research, to go through 75 of the images with fever pieces.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/4.jpg\" alt=\"\" class=\"wp-image-6766\" width=\"330\" height=\"347\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/4.jpg 436w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/4-285x300.jpg 285w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/5.jpg\" alt=\"\" class=\"wp-image-6767\" width=\"258\" height=\"346\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/5.jpg 261w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2022\/11\/5-224x300.jpg 224w\" sizes=\"auto, (max-width: 258px) 100vw, 258px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><strong><em>Hours on the project this week: 8,5<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>Marte Marheim, Computer Science<\/em><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n","protected":false},"excerpt":{"rendered":"<p>Mechanical Engineering Last week was the fall break, and I only worked a few hours on the design of the robot arm. For this week (week 8) I have been working on the design of the robotic arm and the design of the turn table. As I have mentioned before, I ended up doing some [&hellip;]<\/p>\n","protected":false},"author":88,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[95,93,1],"tags":[87,89],"class_list":["post-5976","post","type-post","status-publish","format-standard","hentry","category-chess-mates","category-smart-systems-2022","category-uncategorized","tag-chess-mates","tag-smarte-systemer-2022"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/users\/88"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5976"}],"version-history":[{"count":23,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5976\/revisions"}],"predecessor-version":[{"id":7204,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/5976\/revisions\/7204"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}