{"id":7906,"date":"2023-10-10T00:05:14","date_gmt":"2023-10-09T23:05:14","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=7906"},"modified":"2023-10-10T00:05:14","modified_gmt":"2023-10-09T23:05:14","slug":"turret-syndrome-week-7","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=7906","title":{"rendered":"Turret Syndrome &#8211; Week 7"},"content":{"rendered":"\n<h2 class=\"has-text-align-center wp-block-heading\">Christopher Daffinrud<\/h2>\n\n\n\n<p>This week my main area of work was primarily focused around two tasks. <\/p>\n\n\n\n<p><strong>Turret Rotation Towards Detected Object<\/strong>:<\/p>\n\n\n\n<p>The first task is the connection and calculation between the Stepper Motors used for rotation and the camera used for object detection.  Based on our model for detecting objects we can extract the coordinates for the bottom left corner and the top right corner.<\/p>\n\n\n\n<p>Our web-camera (<a href=\"https:\/\/sandberg.world\/nb-no\/product\/usb-webcam-1080p-hd#!tab=specs\">Sandberg 1080p<\/a>) has an Field of View (FOV) of 80 degrees in 1080p resolution. With that information and other relevant variables from the Stepper Motors and Stepper Controllers we were able to calculate the number of steps needed for rotating towards an object based on pixel-coordinates:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"694\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/stepsize-calculation-1024x694.png\" alt=\"\" class=\"wp-image-7907\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/stepsize-calculation-1024x694.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/stepsize-calculation-300x203.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/stepsize-calculation-768x521.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/stepsize-calculation-1536x1041.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/stepsize-calculation.png 1863w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The Stepper Motor only accepts steps in integer-values so for testing purposes we will try using <strong>6 steps<\/strong> per pixel.<\/p>\n\n\n\n<p>I also created a function in our Motor-class which hopefully for testing will be able to rotate the turret to our detected object or in close enough proximity to be able to adjust some sensitivity-settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"399\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-06-144939.png\" alt=\"\" class=\"wp-image-7909\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-06-144939.png 924w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-06-144939-300x130.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/Screenshot-2023-10-06-144939-768x332.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption class=\"wp-element-caption\">NB: The function is only used for the first frame in which an object is detected. It will then rotate the turret to that object based on pixel-distance between the center of the camera and the object. <\/figcaption><\/figure>\n\n\n\n<p><strong>Turret Simulator In Unity<\/strong><\/p>\n\n\n\n<p>My other focus task this week was to try to create and simulation for our Turret System in Unity with functionalities such as auto-aiming towards red objects and preventing the system to aim or fire when a green object is within sights. Here is a video showing the simulator in action:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_5638.mov\"><\/video><figcaption class=\"wp-element-caption\">Description: The autoaim-toggle is turned on in the beginning of the video. Then the turret rotates towards Red Balloons. The firing mechanism is triggered by the Spacebar. The turret itself does not rotate towards Green Balloons.<\/figcaption><\/figure>\n\n\n\n<p>The code for the Simulator is mainly from four scripts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>BalloonSpawner &#8211; Spawns Red and Green balloon-objects at the desired range and rotation.<\/li>\n\n\n\n<li>TurretRotator &#8211; Rotates the Turret itself between -90 and 90 degrees.<\/li>\n\n\n\n<li>GunElevator &#8211; Rotates and Elevates the gun between the Azimuth of -90 to 90 degrees and the pitch between 0 &#8211; 30 degrees.<\/li>\n\n\n\n<li>GunShooter &#8211; Instanciates a Bullet-object and its velocity and trajectory based on where the Muzzle is pointing towards.<\/li>\n<\/ul>\n\n\n\n<p>There is also implemented an Input System which maps different Keys to different actions when running the simulator. <\/p>\n\n\n\n<p>The Gun-asset and the gear-system itself are only placeholders for hopefully imported CAD-files that represent those parts of our system. <\/p>\n\n\n\n<p><strong>Work for next week:<\/strong><\/p>\n\n\n\n<p>Turret Rotation Towards Object:<\/p>\n\n\n\n<p>A better way of implementing a function that turns the turret towards the object would be a function that gets called for every camera-frame an object is detected in or at least for every few frames instead of the first one. The function above is  mainly for testing purposes that our calculations and presumptions around the motors and controllers are correct and is not a safe way to implement this functionality. <\/p>\n\n\n\n<p>Turret Simulator:<\/p>\n\n\n\n<p>There are several other functionalities I will add to the simulator:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Spawning objects within a reachable altitude for our turret.<\/li>\n\n\n\n<li>Insert the same values as the Stepper Motors we have ourself. Making it easier to visually get a sense of how fast our turret turns based on different frequencies and microstep-adjustments.<\/li>\n\n\n\n<li>Adding CAD-designs for our Gear-system and our Gun. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Hannes Weigel<\/h2>\n\n\n\n<p>The goal for this week was to implement the pitch rotation such that the paintball marker can be elevated, and additionally finish the last pieces of the azimuth drive system.<\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">The Pitch Drive<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"770\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-61-1024x770.png\" alt=\"\" class=\"wp-image-7952\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-61-1024x770.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-61-300x226.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-61-768x578.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-61-1536x1155.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-61.png 1662w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The pitch drive functions via a stepper motor that turns a trapezoidal threaded rod which in turn screws a nut (in gold) upwards or downwards.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-62-1024x560.png\" alt=\"\" class=\"wp-image-7953\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-62-1024x560.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-62-300x164.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-62-768x420.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-62.png 1462w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The nut is bolted to a plate with pinions on each side that allow the assemble 1 rotational dimension of freedom.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"766\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-63-1024x766.png\" alt=\"\" class=\"wp-image-7954\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-63-1024x766.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-63-300x224.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-63-768x575.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-63-1536x1149.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-63.png 1556w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To hold this assembly to the barrel, the barrel is clamped together.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"988\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-64-988x1024.png\" alt=\"\" class=\"wp-image-7955\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-64-988x1024.png 988w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-64-290x300.png 290w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-64-768x796.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-64.png 1392w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/figure>\n\n\n\n<p>The motor is held by a &#8220;cradle&#8221; with pinions on each side that give it 1 rotational dimension of freedom. The pinions slot into the mount that directly bolts on the rotating base plate of the turret system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0454-768x1024.jpg\" alt=\"\" class=\"wp-image-7958\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0454-768x1024.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0454-225x300.jpg 225w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0454-1152x1536.jpg 1152w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0454-1536x2048.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0454-scaled.jpg 1920w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0455-768x1024.jpg\" alt=\"\" class=\"wp-image-7959\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0455-768x1024.jpg 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0455-225x300.jpg 225w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0455-1152x1536.jpg 1152w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0455-1536x2048.jpg 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0455-scaled.jpg 1920w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p>Disregard the barrel clamp being screwed on askew, and the two different kind of  bolts on the nut carrier.<\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">The Azimuth Drive<\/h4>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/IMG_0439.mov\"><\/video><\/figure>\n\n\n\n<p>We have rotation \ud83d\ude0e<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/filtered-C7A3D351-931E-4B24-8234-AE8EBF740A19-2.mp4\"><\/video><\/figure>\n\n\n\n<p>Initially we had problems with all three motors turning at the same time. After relentless troubleshooting, we discovered the problem to be that we used one motor controller for all three motors. Meaning; If one motor lagged behind, it would forcefully be turned by the other motors, and due to the nature of the design, provide a current to the motor controller.<\/p>\n\n\n\n<p>Basically; Two motors turn one motor which produces a current that interferes with the signal.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">Further Work <\/h4>\n\n\n\n<p>As the azimuth and pitch drive mechanism are finished, the complete <em>loco<\/em>motion system is done. The goal for next week is to complete the integration and start testing the whole turret.<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Ole Eirik S.Seljordslia<\/h2>\n\n\n\n<p>This week&#8217;s focus has been on trying a new model architecture. I wanted to try a more lightweight model than efficientdet. EdgeImpulse\u2019s Faster Objects More Objects(FOMO) model seemed like a promising option, some examples were achieving upwards to 60 fps when doing object detection. FOMO is designed to be run on microcontrollers, where computational power is low.&nbsp;<\/p>\n\n\n\n<p>Creating the model and training it was quite straightforward and can be described in the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Transformed metadata to conform to EdgeImpulse\u2019s format<\/li>\n\n\n\n<li>Set model architecture<\/li>\n\n\n\n<li>Set hyperparameters<\/li>\n\n\n\n<li>Train model<\/li>\n<\/ol>\n\n\n\n<p>I started by converting the metadata for the dataset, the following code snippet transforms our datasets metadata from CSV to EdgeImpulse\u2019s JSON format.&nbsp;<\/p>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #202020;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em\"><table><tr><td><pre style=\"margin: 0;line-height: 125%\"> 1\n 2\n 3\n 4\n 5\n 6\n 7\n 8\n 9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33<\/pre><\/td><td><pre style=\"margin: 0;line-height: 125%\"><span style=\"color: #6ab825;font-weight: bold\">import<\/span> <span style=\"color: #447fcf;text-decoration: underline\">pandas<\/span> <span style=\"color: #6ab825;font-weight: bold\">as<\/span> <span style=\"color: #447fcf;text-decoration: underline\">pd<\/span>\n<span style=\"color: #6ab825;font-weight: bold\">import<\/span> <span style=\"color: #447fcf;text-decoration: underline\">ast<\/span>\n<span style=\"color: #6ab825;font-weight: bold\">import<\/span> <span style=\"color: #447fcf;text-decoration: underline\">json<\/span>\n<span style=\"color: #d0d0d0\">df<\/span> <span style=\"color: #d0d0d0\">=<\/span> <span style=\"color: #d0d0d0\">pd.read_csv(<\/span><span style=\"color: #ed9d13\">r&#039;dataset\/balloon-data.csv&#039;<\/span><span style=\"color: #d0d0d0\">)<\/span>\n<span style=\"color: #d0d0d0\">output<\/span> <span style=\"color: #d0d0d0\">=<\/span> <span style=\"color: #d0d0d0\">{<\/span>\n   <span style=\"color: #ed9d13\">&quot;version&quot;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #3677a9\">1<\/span><span style=\"color: #d0d0d0\">,<\/span>\n   <span style=\"color: #ed9d13\">&quot;type&quot;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #ed9d13\">&quot;bounding-box-labels&quot;<\/span><span style=\"color: #d0d0d0\">,<\/span>\n   <span style=\"color: #ed9d13\">&quot;boundingBoxes&quot;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #d0d0d0\">{}<\/span>\n   <span style=\"color: #d0d0d0\">}<\/span>\n<span style=\"color: #d0d0d0\">df[<\/span><span style=\"color: #ed9d13\">&#039;bbox&#039;<\/span><span style=\"color: #d0d0d0\">]<\/span> <span style=\"color: #d0d0d0\">=<\/span> <span style=\"color: #d0d0d0\">df[<\/span><span style=\"color: #ed9d13\">&#039;bbox&#039;<\/span><span style=\"color: #d0d0d0\">].apply(ast.literal_eval)<\/span>\n<span style=\"color: #6ab825;font-weight: bold\">for<\/span> <span style=\"color: #d0d0d0\">index,<\/span> <span style=\"color: #d0d0d0\">row<\/span> <span style=\"color: #6ab825;font-weight: bold\">in<\/span> <span style=\"color: #d0d0d0\">df.iterrows():<\/span>\n   <span style=\"color: #d0d0d0\">bounding<\/span> <span style=\"color: #d0d0d0\">=<\/span> <span style=\"color: #d0d0d0\">[]<\/span>\n   <span style=\"color: #6ab825;font-weight: bold\">for<\/span> <span style=\"color: #d0d0d0\">box<\/span> <span style=\"color: #6ab825;font-weight: bold\">in<\/span> <span style=\"color: #d0d0d0\">row[<\/span><span style=\"color: #ed9d13\">&#039;bbox&#039;<\/span><span style=\"color: #d0d0d0\">]:<\/span>\n       <span style=\"color: #d0d0d0\">bounding.append({<\/span><span style=\"color: #ed9d13\">&#039;label&#039;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #ed9d13\">&#039;balloon&#039;<\/span><span style=\"color: #d0d0d0\">,<\/span>\n                   <span style=\"color: #ed9d13\">&#039;x&#039;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #d0d0d0\">box[<\/span><span style=\"color: #ed9d13\">&#039;xmin&#039;<\/span><span style=\"color: #d0d0d0\">],<\/span>\n                   <span style=\"color: #ed9d13\">&#039;y&#039;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #d0d0d0\">box[<\/span><span style=\"color: #ed9d13\">&#039;ymin&#039;<\/span><span style=\"color: #d0d0d0\">],<\/span>\n                   <span style=\"color: #ed9d13\">&#039;width&#039;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #d0d0d0\">box[<\/span><span style=\"color: #ed9d13\">&#039;xmax&#039;<\/span><span style=\"color: #d0d0d0\">]<\/span> <span style=\"color: #d0d0d0\">-<\/span> <span style=\"color: #d0d0d0\">box[<\/span><span style=\"color: #ed9d13\">&#039;xmin&#039;<\/span><span style=\"color: #d0d0d0\">],<\/span>\n                   <span style=\"color: #ed9d13\">&#039;height&#039;<\/span><span style=\"color: #d0d0d0\">:<\/span> <span style=\"color: #d0d0d0\">box[<\/span><span style=\"color: #ed9d13\">&#039;ymax&#039;<\/span><span style=\"color: #d0d0d0\">]<\/span> <span style=\"color: #d0d0d0\">-<\/span> <span style=\"color: #d0d0d0\">box[<\/span><span style=\"color: #ed9d13\">&#039;ymin&#039;<\/span><span style=\"color: #d0d0d0\">]})<\/span>\n   <span style=\"color: #d0d0d0\">output[<\/span><span style=\"color: #ed9d13\">&#039;boundingBoxes&#039;<\/span><span style=\"color: #d0d0d0\">][f<\/span><span style=\"color: #ed9d13\">&quot;{row[&#039;fname&#039;]}&quot;<\/span><span style=\"color: #d0d0d0\">]<\/span> <span style=\"color: #d0d0d0\">=<\/span>  <span style=\"color: #d0d0d0\">bounding<\/span>\n<span style=\"color: #6ab825;font-weight: bold\">with<\/span> <span style=\"color: #24909d\">open<\/span><span style=\"color: #d0d0d0\">(<\/span><span style=\"color: #ed9d13\">&#039;dataset\/bounding_boxes.labels&#039;<\/span><span style=\"color: #d0d0d0\">,<\/span> <span style=\"color: #ed9d13\">&#039;w&#039;<\/span><span style=\"color: #d0d0d0\">)<\/span> <span style=\"color: #6ab825;font-weight: bold\">as<\/span> <span style=\"color: #d0d0d0\">f:<\/span>\n   <span style=\"color: #d0d0d0\">json.dump(output,<\/span> <span style=\"color: #d0d0d0\">f)<\/span>\n<\/pre><\/td><\/tr><\/table><\/div>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/6Byi9TaiRpm0Ke_ayfVSyz8tHEHc8Ld0j7INueyb3lFJIL89tRgPMGfzD66OLg-ghTVpkuhl9CGxhtN6S2rNQhJBV1cBJ6aDafay9gvd4tKu_m58KgWK_1A_NyE0JmBG-vEz-YMR_9TjGy1XWBDecWQ\" width=\"624\" height=\"151\"><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/_-a7OBXrccHupCUjYEkseaZ6EgDUt_7fUVy-ciHZ4NZJQVVDVjerGZQJ2iCHVbUk9C89rD7duPOSEdSnlM3blVdBeaOsA2rpiovQnGHVbGl4JvFZpUkQk3I1yzpTHj7Z9qKjNUytBCuHeC9HuPYlJxo\" width=\"624\" height=\"39\"><\/p>\n\n\n\n<p>I tried to train the model using different architectures and hyperparameters. Training happens in EdgeImuplse\u2019s cloud solutions, so when I wanted to increase the number of epochs(a full pass of the dataset) and ran the model, it would crash\/timeout because the batch job took too long a time. This was quite frustrating as I would not be able to adjust parameters without paying for a subscription. So I tried creating models using FOMO and MobileNetV2, with limited epoch\u2019s. But this did not yield any promising results, when validating the model\u2019s accuracy; they would score with around 40%. I tried running inference on these models with the raspberry pi. The result was a very quick model that wrongfully identified items as balloons, which is not ideal when we plan on shooting those \u201cballoons\u201d.&nbsp;&nbsp;<\/p>\n\n\n\n<p>We have talked a bit back and forth this week about how we want to achieve movement towards a setpoint with our turret. Since our goal is to identify and shoot stationary balloons, we only really need one update on the location of the balloons. This means that we could in theory only take one picture to locate each balloon, then we could move our turret\u2019s barrel towards the coordinate set by the locations. So I believe that achieving a high FPS is not critical for our operation. Averaging locations a few times per second could increase our precision and hopefully reduce the number of false positives.&nbsp;<\/p>\n\n\n\n<p>We will discuss our solution for movement more next week and hopefully conclude on what requirements should bound the image processing.&nbsp;<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Mats Bergum<\/h2>\n\n\n\n<p>This week, I have mainly focused on designing a battery solution for our system. Last week, I found that all motors for the horizontal rotation can use up to 3 A each. Of course, during testing, the total current draw was not over 2 A with a 24 V voltage supply, so I chose to use this as the rated current. Moreover, the Raspberry Pi is planned to power all control circuits. Thus, I only needed to think about the power consumption of the Raspberry Pi, and according to the datasheet, it uses 5 V with a max current of 3 A. Since we are putting a lot of strain on the microprocessor, I put the rated current to 3 A.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Component<\/strong><\/td><td><strong>Voltages<\/strong><\/td><td><strong>Rated current<\/strong><\/td><\/tr><tr><td>Stepper motor (23HS8430)<\/td><td>24 V<\/td><td>2 A <\/td><\/tr><tr><td>Stepper motor (17HS)<\/td><td>24 V<\/td><td>0.6 A<\/td><\/tr><tr><td>Raspberry Pi<\/td><td>5 V<\/td><td>3 A<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>When I came to Steven with the requirements, he helped me find components that could meet these requirements. We found a 34 V battery made for an earlier Bachler project and a 5-volt regulator (LM323K). The regulator meets some of the requirements. The datasheet, see under, shows that the maximum output current ranged from 3 A to 4.5 A. However, the maximum input voltage was 20 V. This means that it can not be used with the 34 V battery Steven showed me. Moreover, the battery was too big and heavy to be mounted to the rest of the system in a good way.<\/p>\n\n\n\n<div data-wp-interactive=\"core\/file\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!state.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/lm323-n.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of lm323-n.\"><\/object><a id=\"wp-block-file--media-e2a7e9cc-c246-48ef-8ceb-0eeb6e7b5ddf\" href=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/lm323-n.pdf\">lm323-n<\/a><a href=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/lm323-n.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-e2a7e9cc-c246-48ef-8ceb-0eeb6e7b5ddf\">Download<\/a><\/div>\n\n\n\n<p>From earlier testing on the system, I know that all the motors work fine with a supply voltage of 12 V. So I moved over to the idea of using a motorcycle battery because this is something I may have at home. <\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">Simple schematics <\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"504\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-83-1024x504.png\" alt=\"\" class=\"wp-image-7996\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-83-1024x504.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-83-300x148.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-83-768x378.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-83-1536x757.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-83-2048x1009.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Only a simple circuit to show how the regulator is planned to be used.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"618\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-84-1024x618.png\" alt=\"\" class=\"wp-image-7997\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-84-1024x618.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-84-300x181.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-84-768x463.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-84-1536x927.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-84-2048x1236.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Not completed, need to know what fuses are available to use.<\/figcaption><\/figure>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">Next week<\/h4>\n\n\n\n<p>Next week I plan to make the regulator circuit on a sodering board and test it with the rest of the system. I will of course also look for a usable 12 V battery.<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Harald Berzinis<\/h2>\n\n\n\n<p>This week I have been designing the rest of the trigger mechanism, and it is now ready to print!<\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">Initial CAD-design<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"598\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-74-1024x598.png\" alt=\"\" class=\"wp-image-7985\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-74-1024x598.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-74-300x175.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-74-768x448.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-74-1536x897.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-74.png 1757w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"541\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-76-1024x541.png\" alt=\"\" class=\"wp-image-7987\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-76-1024x541.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-76-300x159.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-76-768x406.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-76-1536x812.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-76-2048x1082.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-77-800x1024.png\" alt=\"\" class=\"wp-image-7988\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-77-800x1024.png 800w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-77-234x300.png 234w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-77-768x983.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-77-1200x1536.png 1200w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-77.png 1330w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">Here are some pictures from different angles of the entire contraption.<\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">New Parts<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"1024\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-78-1005x1024.png\" alt=\"\" class=\"wp-image-7989\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-78-1005x1024.png 1005w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-78-294x300.png 294w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-78-768x782.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-78.png 1010w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">Reworked main body to feature the new parts.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"459\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-79.png\" alt=\"\" class=\"wp-image-7990\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-79.png 604w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-79-300x228.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"822\" height=\"448\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-80.png\" alt=\"\" class=\"wp-image-7991\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-80.png 822w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-80-300x164.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-80-768x419.png 768w\" sizes=\"auto, (max-width: 822px) 100vw, 822px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"908\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-81-1024x908.png\" alt=\"\" class=\"wp-image-7992\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-81-1024x908.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-81-300x266.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-81-768x681.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-81.png 1050w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">25 and 10 tooth gears.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"498\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-82.png\" alt=\"\" class=\"wp-image-7993\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-82.png 901w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-82-300x166.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2023\/10\/image-82-768x424.png 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">Holds the 25 tooth spur gear in place.<\/p>\n\n\n\n<p>The parts above are for the new reworked servo mechanism which activates the main bolt. This time I have done a different approach where the bolt stopper is not directly connected to the 25 tooth gear, but rather leveraged in order to remove unwanted stress on the servo motor. This also makes the mechanism way more secure regarding safety, due to the trigger mechanism needing to be loaded twice in two separate locations.<\/p>\n\n\n\n<h4 class=\"has-text-align-center wp-block-heading\">Next Week<\/h4>\n\n\n\n<p>My plan for the next week is to 3D-print this concept, and initially test it with the paintball gun. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Christopher Daffinrud This week my main area of work was primarily focused around two tasks. Turret Rotation Towards Detected Object: The first task is the connection and calculation between the Stepper Motors used for rotation and the camera used for object detection. Based on our model for detecting objects we can extract the coordinates for [&hellip;]<\/p>\n","protected":false},"author":100,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7906","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/7906","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\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7906"}],"version-history":[{"count":10,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/7906\/revisions"}],"predecessor-version":[{"id":7998,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/7906\/revisions\/7998"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}