User Tools

Site Tools


vega_darwin

This is an old revision of the document!


How to Implement Master Slave Control between Darwin OP's

Author: Fausto Vega Email: vegaf1@unlv.nevada.edu
Date: Last modified on <3/28/19>
Keywords: Darwin OP , C++/C Programming, Master-Slave


The objective of the tutorial is to implement Master-Slave control between two Darwin OP units. This means that by manually moving the joints of one Darwin OP, one can control the other robot through a common network. Solving this partially or completely is important because it allows for a robust and interactive way to control a robot. This tutorial shows you how to implement this type of control on one arm of the Darwin OP and how to run the program. It takes approximately 30 minutes to complete.

Motivation and Audience

This tutorial's motivation is to teach how to create a Master Slave system between two Darwin OP robots. Readers of this tutorial assumes the reader has the following background and interests:

* Understand C++ Programming basics
* Perhaps also know how to use the Linux command prompt
* Perhaps additional background needed may include Darwin OP basics
* This tutorial may also attract readers who are interested in teleoperation and humanoids

The rest of this tutorial is presented as follows:

Other Tutorials

For a background on the Darwin OP basics and a more in depth explanation of network programming refer to the following tutorials:

Source Code

The following folders contain the code used to implement this type of control. It is based off a client server model also know as network programming. In this model, there is a client which connects to the other platform, and the server which makes the request for information from the client. This will allow the two computers inside the Darwin OP’s to communicate over a network. In this case, instead of sending a text message from computer to computer as the original program does, we modified the code to send Dynamixel position values from one platform to the other. *darwin_client.zip *darwin_server.zip

Instructions

This section gives step-by-step instructions along with commands to run the Master-Slave program. Steps 1 and 2 are for users who want to implement on their own robot, DASL users running the demo can skip to Step 3. Designate one robot as the server and one as the client. Both will have their own code.

Step 1: Download the source code

Download the server folder on one Darwin OP and the client folder on the other Darwin OP

Step 2: Make the code

Proceed to the network programming folder through a Linux terminal(ctrl alt t) on each robot with the following command:

Client Robot Statement:

   cd Desktop/darwin_client/Linux/project/network_programming

Then make the code with the following command:

   sudo make

The password for both Darwin's is 111111

Repeat the same process on the server robot.

Server Robot Statement:

   cd Desktop/darwin_server/Linux/project/network_programming
   sudo make

Step 3: Checking the Network

Once the program is built, make sure that both robots are connected to the same network. If running the demo at DASL, both robots must be connected to DASL Warehouse 2.

Step 4: Run your Program

Run the server program first by accessing the command prompt, navigating to the network programming folder (as shown above) and running the following command.

   ./server 5000

The 5000 is the port we are using to communicate.

Run the client robot by accessing the command prompt, navigating to the network folder (as shown above) and running the following command:

   ./client 192.168.50 5000

This command specifies the IP address of the server robot and the port number. If this command is not working, check the IP address of the server Darwin with the following command:

   ifconfig

Then insert it for the IP address (192.168.50) in the command above.

Step 5: Checking the Network

Once the robot is in walk ready position, the torque on the right arm will turn off after 5 seconds, so make sure to hold the arm. Once the torque is off, move the arm to different positions. One will notice that the same positions will be copied on the robot acting as a server.

Step 6: Checking the Network

To exit out of the program, press control C in the command prompt

Demonstration

In this demonstration, I successfully compiled and execute the program described above

Final Words

This tutorial's objective was to implement Master-Slave control on two Darwin OP platforms. The source code was provided as well as how to run the program. Once the concepts were conveyed the reader could teleoperate one robot with the joints of another.

Speculating future work derived from this tutorial, includes implementing this control to all the degrees of freedom, and creating an exoskeleton as the Master. In the big picture, the problem of basic Master-Slave teleoperation can be solved with this tutorial.

For questions, clarifications, etc, Email: vegaf1@unlv.nevada.edu

vega_darwin.1553829256.txt.gz · Last modified: 2019/03/28 20:14 by faustovega