====== How To set up Dynamixel SDK ====== **Author:** Yunki hong(05/2019), Myong Geon Kim(07/2019), Brandon Seo(Current) Email: hyunduck1024@gmail.com \\ **Date:** Last modified on <06/20/19> \\ **Keywords:** Tutorial, how to, step-by-step, dynamixel-sdk \\ {{ mgkim:ds_1.jpg?200 |}} \\ ===== Motivation and Audience ===== \\ \\ This tutorial offers you the step-by-step method to control Dynamixel in Windows environment. \\ If you are not familiar with coding, you would better study basic concept of CPP language programming before you begin this project. \\ Even though if this is the first time for you to programming something, you don’t have to worry. \\ Because all we need to do is using open source library that had been already built by somebody. \\ So, focus on that point as you proceed this project. \\ And ROBOTIS, which is the company produce Dynamixel, posted a nice manual and quick start video about Dynamixel SDK on their website. \\ You also can learn a lot by following the manual and videos. \\ \\ Therefore, lock and load your confidence! Let’s fire this up! \\ \\ Readers of this tutorial assumes the reader has the following background and interests: \\ * Basic background of CPP \\ \\ The rest of this tutorial is presented as follows: * [[dynamixel_set_up#partsList|Parts List]] * [[dynamixel_set_up#setup|Set up]] * Final Words ==== Parts List ==== - Dynamixel(MX-28) {{ mgkim:ds_1.jpg?200 |}} \\ - USB2 signal converter or U2D2 signal port {{ mgkim:ds_2.jpg?200 |}}{{ mgkim:ds_3.jpg?200 |}} \\ - SMPS (Switched-Mode Power Supply {{ mgkim:ds_4.jpg?200 |}}{{ mgkim:ds_5.jpg?200 |}} \\ - 12V Adapter {{ mgkim:ds_6.jpg?200 |}} ==== Set up ==== **Step 1** \\ \\ 0. Install Visual Studio \\ \\ https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx \\ You can download visual studio on this website. \\ \\ 1. Install Dynamixel SDK. & Wizard \\ Download Dynamixel SDK. \\ http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/download/#repository \\ In this web page, you can see Direct Download link of Dynamixel SDK. \\ Download it and unzip it to any folder you want. \\ And then, Let’s download ROBOPLUS \\ ROBOPLUS is the software for ROBOTIS products based on GUI. \\ It is integrated software of various functions. What are we specially going to use is Dynamixel Wizard. \\ It helps you to manage your Dynmaixel directly. \\ You can connect Dynamixels to PC with Dynamixel Wizard so you can check some information and status of your Dynamixels. \\ Click the link below \\ http://en.robotis.com/service/downloadpage.php?ca_id=10# \\ You would find RoboPlus tab. Choose OS version that matches to your PC. \\ Most of the case you may need 1.1.3.0 Windows Vista/7/8/10 (exe) \\ \\ **Step 2** \\ \\ Device set up. \\ \\ The easiest way to understand which part goes which is to watch this video and follow it. \\ https://youtu.be/RLnpps8eh6U \\ And then, read this page carefully or just follow below shortcut. \\ http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/device_setup/#controller \\ {{ mgkim:ds_7.png?200 |}} \\ Flip the switch to TTL because we are using MX-series Dynamixel when you are using USB2. {{ mgkim:ds_8.png?200 |}} \\ \\ **Step 3** \\ \\ Library set up \\ Before practicing SDK sample code, we need to build the library we had downloaded. \\ http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/library_setup/c_windows/#c-windows \\ follow the instruction in above URL. \\ \\ **Step 4** \\ \\ Check the set up and practice SDK sample code \\ \\ you need control table address for device checking and practice. \\ you can find it in this webpage. \\ http://emanual.robotis.com/docs/en/dxl/mx/mx-28/#control-table-data-address \\ You also need to change the value of following parameters via Dynamixel Wizard before you run the examples. \\ {{ mgkim:ds_9.jpg?400 |}} \\ \\ C++ read write protocol 1.0 (position control) \\ E-manual http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/sample_code/cpp_read_write_protocol_1_0/#cpp-protocol-10 \\ This example writes Goal Position to Dynamixel and reads Present Position of Dynamixel until it stops moving. \\ The functions that are related with the Read and the Write handle the number of items which are near each other in the Dynamixel control table, such as the goal position and the goal velocity. \\ \\ (1) Run the project solution file (.sln) \\ in the [DynamixelSDK folder]/c/example/protocol1.0/read_write/win64(32)] directory. \\ {{ mgkim:ds_10.jpg?400 |}} \\ (2) Change parameters like below image \\ {{ mgkim:ds_11.jpg?400 |}} \\ You can check which port is being used on your controller in Device Manager. \\ {{ mgkim:ds_12.jpg?400 |}} \\ (3) Click on the Local Windows Debugger button to run the program. \\ ==== Final Words ==== For questions, clarifications, etc, Email: m.geon.kim@gmail.com