User Tools

Site Tools


robotic_manipulators_ibvs

This is an old revision of the document!


Image Based Visual Servoing

This tutorial will show how to configure and program the Dynamixels servos in Cusing Visual Studio and the library provided by Dynamixel.Also , will show how to configure and program the Flea3 camera in C++ using Visual Studio and the library FlyCapture. ---- ===== USB2Dynamixel installation ===== First step is to check if your USB2dynamixel hardware is working good and recognizing the servos connected to it. Download the [[http://www.robotis.com/xe/download_en

 *Download Dynamixel SDK in the [[https://github.com/ROBOTIS-GIT/DynamixelSDK/tree/master/c%2B%2B|github repository]]
 *Go to the subfolder: DynamixelSDK-master\c++\build\win64 and open the dxl_x64_cpp solution. Build the solution in Release and x64.  (this will create the dll in the output folder to be included in the envinment variables).

 *Open your Visual Studio and start a project where you already have the OpenCV included (see the OpenCV tutorials page to see how to include OpenCV into Visual Studio
 *Right click in your solution in the solution explorer and go to properties

 *Under C++ > general > additional include directories include the path : DynamixelSDK-master\c++\include ( depend on where you saved the github repository.
 *Under Linker > general > additional include directories include the path: DynamixelSDK-master\c++\build\win64\output ( depend on where you saved the github repository.
 *Under Linker > input > additional dependencies add the library dxl_x64_cpp.lib

 *Go to your file explorer , right click into your PC icon , and go to properties and click into advanced system settings

Click in environment variables and under system variables find the variable path and click in edit Include the path : DynamixelSDK-master\c\build\win64\output.


FlyCapture Library installation guide

  • Download the FlyCapture SDK
  • Install the SDK and open the FlyCapture software. Test and see if your Camera is recognized by your PC (REQUIRED USB 3.0). If it's everything OK you can continue the tutorial and include the library to work with C++
  • Open a solution in the Visual Studio where you already have OpenCV included.
  • Right click the solution in the solution explorer and go to properties.
  • Under C++ > general > additional include directories include the directory: Program Files\Point Grey\include
  • Under Linker > general > additional library directories include the directory: Program Files\Point Grey\lib64\vs2015
  • Under Link > input > additional dependencies include the library: FlyCapture2d_v140.lib

How to use Dynamixel SDK API's

The control of the dynamixel servos in C++ for the most applications is very straight forward. You will only read / write information through the serial port , and the information depends on the address that you put in the API.

Depending on your Dynamixel model , the address for certain properties can be different , so check before the address table of your dynamixel. For example , using the modelmx-64 this how the address table looks like:

The first column is the address that we will provide to the API , the second and third column is what this address represents , and the fourth column says what is the use ( Read (R) or write (W) or both (RW) ).

If we want to read the present position of any of the dynamixels connected to the USB2Dynamixel , this is done by using the API to read , providing address corresponding to present position and the Dynamixel ID .

robotic_manipulators_ibvs.1470700158.txt.gz · Last modified: 2016/08/08 16:49 by joaomatos