{"id":9553,"date":"2024-10-27T22:56:59","date_gmt":"2024-10-27T21:56:59","guid":{"rendered":"https:\/\/dronesonen.usn.no\/?p=9553"},"modified":"2024-10-28T14:22:14","modified_gmt":"2024-10-28T13:22:14","slug":"toyzrgone-week-8","status":"publish","type":"post","link":"https:\/\/dronesonen.usn.no\/?p=9553","title":{"rendered":"ToyzRgone \u2013 Week 8"},"content":{"rendered":"\n<div class=\"wp-block-columns alignwide 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<p><strong>Welcome back to our 8th ToyzRgone blogpost!<\/strong> <strong>Below, you will find the contributions made by each of our team members either individually or in pairs:<\/strong><br><\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns alignwide 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<h2 class=\"wp-block-heading\"><strong>Philip Dahl<\/strong>  \ud83d\udd0b<\/h2>\n\n\n\n<p><strong>Communication<\/strong><\/p>\n\n\n\n<p>The main goal to start this week off, was to establish communication between Arduino and Raspberry Pi. Since everything stepper related has been run and tested through Arduino up until now, Hamsa and I decided that getting the Pi to control the Arduino directly would save us some trouble.<br>For this we used serial communication, more specifically I2C, by connecting them to each other through serial port. The hopeful attempt quickly turned to cheers as we had established communication for the \u201cArduPi\u201d.&nbsp;<\/p>\n\n\n\n<p><strong>Motors<\/strong><\/p>\n\n\n\n<p>I acquired the 4th and final driver for the stepper motor. The one that was available was a TB6612FNG H-bridge which is a different driver from the A4988, used for the other 3 steppers. This driver is primarily designed for dual DC motor control, but the difference is really just the pins connecting to the Arduino.I found the schematic for connecting the driver to the Arduino and a brief explanation from this page:<\/p>\n\n\n\n<p><a href=\"https:\/\/itp.nyu.edu\/physcomp\/labs\/motors-and-transistors\/lab-controlling-a-stepper-motor-with-an-h-bridge\/\">https:\/\/itp.nyu.edu\/physcomp\/labs\/motors-and-transistors\/lab-controlling-a-stepper-motor-with-an-h-bridge\/<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcYQrOwOCVq4bzxAYooVoiUjq8yoE5O738jjU6gFc0r90xrgPNOg2JE7Y583fvSBQt14PX1G9pco8KSxWgUW2gkaCqzAX5Ee0Xlf9w2DAuYqFccWLH4joixbD50-_QtO6q9ZNCElKEBx67PdCewGrpS5gXPwXe6c8bpwyes?key=-5Pzf3KtGU404R0JPHXCJg\" style=\"width: 600px\"><\/p>\n\n\n\n<p>The PWM A and B pins normally control the speed of any connected DC motors, but the \u201cStepper\u201d and \u201cAccelStepper\u201d libraries in Arduino have designated functions for setting and controlling speed. Therefore, the PWM pins connect straight to Vcc (5V).<\/p>\n\n\n\n<p>While testing the newest driver, we discovered that one of the steppers (Back Right) is single stack, whereas the rest are double stack. This means that the single stack motor has less torque than the others and was the reason it was behaving slightly different to the same inputs.<\/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<p><\/p>\n\n\n\n<p>We have had an issue with connecting one of the steppers up properly for a while, as there are no available cables with connectors that fit. Normal female breadboard wires were just falling off, so we had to find a momentary solution while ordering the required cable. Hamsa was able to get in touch with Rasmus, who had access to the 3D-printer on campus. I gave him one of the connectors for reference, and so began a back-and-forth process of printing and shaping the printed piece to fit the stepper. This would have to be picked up again next week.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\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\/2024\/10\/image-136.png\" alt=\"\" class=\"wp-image-9566\" width=\"222\" height=\"294\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-136.png 430w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-136-226x300.png 226w\" sizes=\"auto, (max-width: 222px) 100vw, 222px\" \/><figcaption class=\"wp-element-caption\"><strong>Marked Stepper motor withred. (Single stack with 3D<br>printed 6pin connector)<\/strong><\/figcaption><\/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\/2024\/10\/image-138-edited.png\" alt=\"\" class=\"wp-image-9577\" width=\"181\" height=\"392\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-138-edited.png 248w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-138-edited-138x300.png 138w\" sizes=\"auto, (max-width: 181px) 100vw, 181px\" \/><figcaption class=\"wp-element-caption\"><strong>The people&#8217;s favorite<\/strong><\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>Hamsa Hashi<\/strong> \ud83d\udcbb<\/h2>\n\n\n\n<p>This week, we worked on integrating the motor control for the robot using an Arduino Mega 2560 connected to the Raspberry Pi. By using the Arduino to control the stepper motors, we avoided challenges related to problematic libraries and dependencies on the Raspberry Pi. This decision also made it easier for Philip and me to collaborate, as we both have experience with C++.<br>To organize the work, we divided the task into steps.<\/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\" style=\"flex-basis:66.66%\">\n<p><br><strong>Step 1:<\/strong> Control the robot with a game controller to verify that both the code and the stepper motors behaved as expected. This turned out to be more complex than expected, as we discovered that the stepper motors were not identical, something Philip mentioned earlier in the blog.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"533\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-135-1024x533.png\" alt=\"\" class=\"wp-image-9560\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-135-1024x533.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-135-300x156.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-135-768x400.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-135-1536x799.png 1536w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-135.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>We connected the Arduino Mega 2560 to the Raspberry Pi via USB, using the same serial port in Python and Arduino IDE (installed on the Raspberry Pi) to test the motors. I connected the game controller to python through import pygame for controlling the motors, allowing us to check if the planned logic for omnidirectional mobility worked as intended. Due to missing components, as Philip described, we improvised by suspending the robot so the wheels could move freely without shifting the robot. This allowed us to observe how the motors responded to joystick input and whether the response matched the expected omni-directional movement without risking the robot rolling away.<\/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\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-image alignleft size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-134-1024x648.png\" alt=\"\" class=\"wp-image-9558\" width=\"678\" height=\"429\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-134-1024x648.png 1024w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-134-300x190.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-134-768x486.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-134.png 1467w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><figcaption class=\"wp-element-caption\"><strong>This is the first version of the omnidirectional robot control code using the <code>AccelStepper<\/code> library. This code controls the NEMA 17 stepper motors without advanced features like Microstepping support, Smooth Start and Stop, Exact Angle Control, and fine-tuned Control of Direction and Speed. The motors are driven by simple speed calculations based on joystick input, lacking precise control for smoother and more accurate maneuvers.<\/strong><\/figcaption><\/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-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/forste_arduino_test-1.mov\"><\/video><figcaption class=\"wp-element-caption\"><strong>This video highlights the robot&#8217;s jerky movements due to missing features like Microstepping and smooth acceleration. Notably, the back right wheel stops suddenly<\/strong> <strong>while the others move as expected, revealing its single-stack configuration&#8217;s limitations.<\/strong><\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>Along the way, we discovered that the last stepper motor had a different specification (single stack) than the others(double stack), which affected the joystick input as you can se in the video. A review of the datasheet showed that adjustments were needed. In the first version of the Arduino code, we had set the same speed for all wheels, but in the updated version, we adjusted the speed to 1000 steps per second per motor. This synchronized the movement better and eliminated issues with uneven acceleration that could cause the robot to move unpredictably.<\/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<p>To ensure the accuracy of the test results, we needed the last single stack motor de be running, so we contacted Rasmus, who helped us 3D-print a temporary 6-pin connector for the last stepper motor. This was a temporary solution, but it worked long enough to hopefully complete the necessary tests.<\/p>\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\/2024\/10\/image-139.png\" alt=\"\" class=\"wp-image-9583\" width=\"237\" height=\"314\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-139.png 506w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-139-226x300.png 226w\" sizes=\"auto, (max-width: 237px) 100vw, 237px\" \/><\/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 alignleft size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-140.png\" alt=\"\" class=\"wp-image-9584\" width=\"341\" height=\"224\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-140.png 1022w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-140-300x197.png 300w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-140-768x504.png 768w\" sizes=\"auto, (max-width: 341px) 100vw, 341px\" \/><figcaption class=\"wp-element-caption\"><strong>&lt;-<\/strong> <strong>6 pin connector attempt by Rasmus<\/strong><\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>We also implemented controlled acceleration and deceleration to prevent jerky movements, which reduces stress on the motors and prevents steps from being lost during sudden load changes. Once the missing components are in place, we plan to implement microstepping for smoother movements, which will provide better control, reduce vibrations, and increase precision. We will also work on individual speed control for each motor to improve omnidirectional maneuvering.<\/p>\n\n\n\n<p><strong>Version 2 of python and <strong>Arduino code<\/strong><\/strong><\/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 is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-141-765x1024.png\" alt=\"\" class=\"wp-image-9585\" width=\"345\" height=\"462\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-141-765x1024.png 765w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-141-224x300.png 224w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-141-768x1028.png 768w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-141.png 771w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><figcaption class=\"wp-element-caption\"><strong>Python code utilizes a single joystick to control the movement of the robot, ensuring straightforward and consistent commands to the Arduino for forward and backward actions. Simplified controls are set up to avoid step losses during movement.<\/strong><\/figcaption><\/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 aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-142.png\" alt=\"\" class=\"wp-image-9586\" width=\"304\" height=\"643\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-142.png 255w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-142-142x300.png 142w\" sizes=\"auto, (max-width: 304px) 100vw, 304px\" \/><figcaption class=\"wp-element-caption\"><strong>Arduino code integrates <code>AccelStepper<\/code> for stepper motor management, ensuring precise control over speed and direction. The configuration supports Mecanum wheels, allowing smooth omnidirectional movement, while addressing step accuracy concerns with gradual speed adjustments.<\/strong><\/figcaption><\/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-video alignright\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/Versjon_2_bedre_kjoring.mp4_1730055767856-1.mov\"><\/video><figcaption class=\"wp-element-caption\"><strong>This video showcases the performance with a temporary 6-pin connector, successfully coordinating all wheels. This confirms that the configuration meets the movement expectations without losing steps, demonstrating the system&#8217;s stability and effective motor synchronization<\/strong><\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns alignwide 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<p><strong>My plan for next week<\/strong><\/p>\n\n\n\n<p>I plan to <strong>run the code and perform real-time object detection locally on my Windows machine<\/strong> to improve performance. The goal is to use sockets to communicate between the Raspberry Pi and my local machine. By using sockets, I can send data from the Raspberry Pi to my Windows machine efficiently, allowing the Pi to focus solely on capturing video while my Windows machine handles the more demanding tasks of object detection. This should lead to faster processing and reduce latency+++.<\/p>\n\n\n\n<p>Additionally, I will<strong> <\/strong>subscribe to the Raspberry Pi&#8217;s camera feed and stream it to my local machine. To make this setup work, I need to configure a router so that both the Raspberry Pi and my Windows machine are on the same network. I&#8217;ve decided to bypass the IKT system since it has been too limiting. See you next week \ud83d\ude42<br><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Ruben Henriksen<\/strong> \ud83d\udee0\ufe0f<\/h2>\n\n\n\n<p><strong>DONE:<\/strong><\/p>\n\n\n\n<p>This week I came back from EuRoC and had to get back into my subjects. I began the redesign on the base for our robot. I checked out some materials we can use for our final product. For aesthetic reasons I am considering acrylic glass or some composite material.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns alignwide 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<p class=\"has-text-align-center\"><strong><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdG6Fbw2zN5UJnlpLYYHnIgBRg6-qNqFy4iqmKakcLhrkYkiiRPDns6U92gtgt6bnoOt_j6-zhDiZHR6V9QUHVXTYgdiDgG1_aB25KtT_PGmFp9K4ZwEKkSqkpiflW1HzjFT1LWKVM1pWZHCFb-qP41VPYw?key=EWYk46hcoYiMABQ51wVCFg\" style=\"width: 700px\"><\/strong><\/p>\n\n\n\n<p><strong>TO BE DONE:<\/strong><\/p>\n\n\n\n<p>I need some more info regarding what sensors that need to be fitted, and I need to investigate some material properties to land on a final decision regarding the materials for our final product.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Kevin Paulsen<\/strong> \ud83d\udee0\ufe0f<\/h2>\n\n\n\n<p><strong>What was done:<\/strong><\/p>\n\n\n\n<p><strong>This week, I 3D printed the parts for the robotic arm, and then proceeded to assemble it like an engineer who finally found the perfect excuse to avoid homework. Most of the parts played nice and fit as expected, but a few decided to work against me and will need some corrections so that everything works as intended (and, you know, doesn\u2019t break or refuse to fit together like a stubborn puzzle piece).<\/strong><\/p>\n\n\n\n<p><strong>Next on the list: making sure the rebellious parts get sorted out, so the final version doesn\u2019t just look cool but works like a charm too!<\/strong><\/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<p><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfUGuHGtxwjmtvwYKAIsQVxnsxR8lVzqbdhGY2KleUPRmVCS4CF6apExW-epzHD_hTLH0PSr61qyFNnQfIYQdkfPeg-0RPA8wplYMr8cvnCghcHZmGc_xciEbL6Mw8vIr63BI_-Jly6OYWoeCBeS2jem_g5n0NJfKRO1Gxpr6AwZwPhO0RHy5Y?key=yNwATaaFwfQlOks1QanovQ\" style=\"width: 400px\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcza4Umf9wvS9Chb8vqDw6J0SL6ev5lY5tFrsG3-bXslopOkV0FAcj6aFO8pzOTUfUFUS6KcP7di7ctOetSy6lxU8U15PCaAc-yvdtbVZzW3IJgMNPv094_99PsOEWFq8_65DeB8WycFmh0I9NeLCSv7gXfIe1aQNPBv9BIHbwdIqljsLZC4gY?key=yNwATaaFwfQlOks1QanovQ\" style=\"width: 700px\"><\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center\"><strong>Here is a picture of the 3D printed model next to the SolidWorks design, just to prove it\u2019s not all happening in my imagination.<\/strong><br><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Sokaina Cherkane<\/strong> \ud83d\udcbb<\/h2>\n\n\n\n<p>This week, I collaborated with Mikolaj to set up the necessary software and hardware for controlling a robotic arm. We installed <strong>Dynamixel Wizard 2.0<\/strong> and <strong>R+ Manager<\/strong>, software tools specifically designed for configuring and managing <strong>Dynamixel actuators<\/strong>\u2014a type of advanced servo motor widely used in robotics applications like robotic arms. For the hardware setup, we installed four servo motors (shown in the image below) to enable full rotational and linear movements. We connected the first servo (S0) to an <strong>OpenCM_9.04<\/strong> (check the picture below) and successfully tested the arm\u2019s range of motion, including 360-degree rotation, forward, upward, and downward movements.<\/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\" style=\"flex-basis:33.33%\">\n<p><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXd5-7bO5pIsBCT_9yHGxOx6ldTTlq9RMlf8CSq51DWd4FvurTNLY-fCOcsTGrB1juDbXvXXZHwgCLrjOUYQI4Ln4JQVyWLyGQeVrx1hIU9r_3nPo4A0MDjQy5vHC8Jl3gqonr1lXM6vuyu1Z-9lmMJrNDfi?key=cIhVkpdlamDsdDlWxVAjQg\" style=\"width: 300px\"><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\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-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/ae9f4b81-d1c8-4988-8d88-8301c06f0143.mov\"><\/video><\/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-video\"><video controls src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/IMG_9512.mov\"><\/video><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Towards the end of the week, I began studying <strong>forward and inverse kinematics<\/strong>, essential concepts for precise robotic movement. Forward kinematics allows the calculation of the arm\u2019s endpoint based on known joint angles and link lengths, ensuring accuracy in reaching a specified location. In contrast, inverse kinematics determines the necessary joint angles to reach a specific point in space, it is critical for picking up objects at exact positions. Together, these techniques ensure predictable and precise movements.<\/p>\n\n\n\n<p>Additionally, I started learning about <strong>ROS (Robot Operating System)<\/strong>, which is advantageous for a robotic arm as it provides a framework with pre-built libraries for handling complex movement control, sensor integration, and efficient development.<\/p>\n\n\n\n<p><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Mikolaj Szczeblewski<\/strong> \ud83d\udd0b<\/h2>\n\n\n\n<p><strong>What was done:<\/strong><\/p>\n\n\n\n<p>This week I have managed to get the servos to finally have a code compiled through the Arduino IDE which made them run.<br>For any students stumbling upon these servos, one important thing you have to know (Yes, very dumb thing to mention, yet it is easy to forget):<br><br>&#8211; The <strong>Dynamixel Wizard 2.0<\/strong>, which is a program for configuration, testing and firmware updates for the Dynamixel Servos, establishes a serial connection through a USB port, the same port which also communicates with the Arduino IDE, only one program can access the serial port at a time.<\/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 aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-159.png\" alt=\"\" class=\"wp-image-9616\" width=\"489\" height=\"385\" srcset=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-159.png 652w, https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/image-159-300x237.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/figure>\n\n\n\n<p><br>Therefore, the code was correct, but it couldn\u2019t compile through because of this reason. I didn\u2019t consider this to be a problem earlier, as I thought it was a program that had some kind of \u201creal-time control\u201d or monitoring application and demanded to maintain constant uninterrupted communication , however that was not the case.<\/p>\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 aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dronesonen.usn.no\/wp-content\/uploads\/2024\/10\/462572327_1646988262544517_707434982068647699_n-768x1024.jpg\" alt=\"\" class=\"wp-image-9615\" width=\"405\" height=\"538\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>With Steven\u2019s help we\u2019ve managed to establish this communication, however the whole system will be controlled by the brain which is Raspberry Pi, and for our Computer engineers\u2019 wish, we have to implement a python API for this purpose, given that all other hardware will be communicating only through that particular language.<br><br>I have ran sketches provided by the Dynamixel2Arduino library, where I tested the velocity and position control of the servos, and also the current measurement in mA.<br><br>Since I have the most expertise on the servos and the control tables that address every operation that a Dynamixel servo is dependent on, I will have to guide the Computer engineers through the correct calibrations and code adjustments to the servos, so that we are not at risk of harming the hardware.<br><br>The testing will no doubt be excruciatingly time-consuming and difficult to comprehend at first glance, in terms of programming the servos. Nevertheless, when we finally establish the communication with the Python API, the computer engineers will have the opportunity to test the servos and program every \u201cjoint\u201d accordingly.<\/p>\n\n\n\n<p>Already this week we\u2019ve looked on the DynamixelSDK, a software development kit for controlling Dynamixel servo functions using packet communication.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Welcome back to our 8th ToyzRgone blogpost! Below, you will find the contributions made by each of our team members either individually or in pairs: Philip Dahl \ud83d\udd0b Communication The main goal to start this week off, was to establish communication between Arduino and Raspberry Pi. Since everything stepper related has been run and tested [&hellip;]<\/p>\n","protected":false},"author":108,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[100],"class_list":["post-9553","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-toyzrgone"],"_links":{"self":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9553","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\/108"}],"replies":[{"embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9553"}],"version-history":[{"count":6,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9553\/revisions"}],"predecessor-version":[{"id":9660,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=\/wp\/v2\/posts\/9553\/revisions\/9660"}],"wp:attachment":[{"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dronesonen.usn.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}