Table of Contents

Yumi experiment with the tactile table

Tests:

Click to display ⇲

Click to hide ⇱

The python API

python client-mary.py [country part side position]

ARGUMENTS :

 country : en | fr (natively supported)
 part : arm | hand | elbow | shoulder | leg | foot | knee | hip
 side : left | right | 0
 position : up | down | front | back | left | right
2016/02/19 00:09 · mai
Tag#
2
12
16
26
8
8
16
2
9
8
8
2
3
1
12
1
4
1
1
1
1
1
2
2017/03/06 15:45 Delphine Binoux
2015/10/28 15:04 Nicolas Favé
2018/04/09 20:33 Maxime Devanne
2018/04/03 09:06 Maxime Devanne
2018/09/11 22:45 Mai Nguyen
2017/02/28 10:13 Maxime Devanne
2016/02/19 14:33 Nicolas Favé
2018/08/01 17:11 Mai Nguyen
2016/02/19 00:09 Mai Nguyen
2015/10/28 14:28 Nicolas Favé
2016/02/19 14:33 Nicolas Favé
2015/10/28 15:21 Nicolas Favé
2015/10/28 15:32 Nicolas Favé
2015/10/28 15:44 Nicolas Favé
2017/03/03 15:48 Maxime Devanne
2015/10/28 13:01  
2015/12/02 14:45 Mai Nguyen
2015/10/28 13:01  
2015/10/28 13:01  
2016/02/19 14:32 Nicolas Favé
2016/02/19 14:33 Nicolas Favé
2019/02/12 13:04 Yao - Fabien - Flavien
2015/11/03 19:01 Mai Nguyen
2020/07/03 17:48 Mai Nguyen
2015/10/28 13:01  
2018/04/05 16:33 Nicolas Duminy

Introduction

Whatever ABB station is used, real or virtual, this tutorial shall show you how to control it using our controller framework. On the robot, a controller is running, it can execute programs written in a language called RAPID. Those RAPID programs, are what the robot execute in real time. The PC controller, written in C# fulfills two roles:

Then, an external program, written in any language, can interact with the PC controller using zeroMQ library.

Easy Use

Open Robotstudio

Load saved station or import rsbag of the station (for the first use)

Go to RAPID tab and wait for controller to be fully loaded

Check the correct tasks are selected for running (deselect the others)

Go to Add-ins tab

Load the RobotStudioEmptyAddin1 (in General folder, right-click then load)

Start the Yumi PC Controller (yumi_control/PC_SDK/YumiControlPC/bin/Debug/YumiControlPC.exe)

A window should open

Select the Yumi controller in the list, then click on “Connect”, then “Start server” (Let the fields at default values. Important, do not close this window)

Then search and launch your client program (e.g. the yumi_control.py script)

Content of yumi_control code

Two folders:

RAPID folder

Contains different test modules. The only important ones are the following:

On the robot, 3 tasks exist:

T_ROB_L is not used, T_ROB_R controls in real time the right arm motions and T_ROB_R_b is a background task recording the current trajectory of the arm (both in joint and TCP space).

PC_SDK subfolder

Contains different VisualStudio projects:

YumiControlPC

The code is splat in 3 parts:

Communication protocol

The communication between the PC SDK controller and an external program wanting to control the robot is done using the zeroMQ library. The protocol used is of type Server/client and the message exchanged are JSON formatted.

A client order is formatted like this:

Click to display ⇲

Click to hide ⇱

{

  "type": order type,
  "payload": input parameters

}

The server acknowledgement is shaped:

Click to display ⇲

Click to hide ⇱

{

  "type": error if the order was badly formatted, order type otherwise,
  "payload": contains output if needed,
  "valid": true if order was executed correctly, wrong otherwise

}

Functioning orders:

Click to display ⇲

Click to hide ⇱

{

  "type": "move",
  "payload": {
      "dt": timestep as float,
      "path": [
          [joint_1_t_1,
           joint_2_t_1,
           ...
           joint_7_t_1],
           [joint_1_t_2,
           ...
           joint_7_t_2],
           ...
       ]
   }

}

acknowledgenemt:

Click to display ⇲

Click to hide ⇱

{

  "type": "move",
  "valid": true or false,
  "payload": {
      "pose": [TCP_final_pose_x, y, z, q1, q2, q3, q4],
      "joints": [TCP_final_joints_1, 2, 3, 4, 5, 6, 7],
      "trajectory": complete TCP trajectory shaped like the order "path" field
  }

}

Click to display ⇲

Click to hide ⇱

{

  "type": "reset",
  "payload": [initial_joint_pose_1, 2, 3, 4, 5, 6, 7] as double

}

acknowledgement:

Click to display ⇲

Click to hide ⇱

{

  "type": "reset",
  "payload": "",
  "valid": true or false

}

Real Yumi Robot

First, connect the robot to power. Make sure, the flex pendant is connected too. If you want to connect to the robot through a LAN, connect an Ethernet cable to its WAN Ethernet port. If you want to connect directly a computer to the robot, connect it with Ethernet cable to its service port. Then you can power up the robot by rotating the power switch (near the flex pendant connector).

You can control the robot using the flex pendant (make sure it's configured in manual mode before). It can launch programs, configure the robot, test the motions of individual joints, etc. However, in our case, we will prefer the automatic mode, which will enable the controlling computer to command the robot without validation on the flex pendant.

If, at some point after booting the robot, it says some of its joints are wrongly calibrated, you will need to launch the manual calibration routine. I haven't done the tutorial for this part, but you can find the explanation in the Yumi documentation.

To connect to the robot with the computer, launch Robotstudio, and choose “Online” mode (in the File menu). Then you choose a method to select the robot and you will connect to it. Afterwards, you can control the robot using Robotstudio. Certain commands require writing privileges, you can take them by login on the robot and ask them. The default user only has limited rights, though they should be enough.

If you need to move the robot's joints manually, you must power down the motors beforehand, and disable the mechanical brakes by pushing continuously the black buttons under the robot torso.

Installation

First, we need a windows computer (at least Windows 7).

We need to install Visual Studio 2015+ (the community edition is free and works fine)

Then we need to install Robotstudio 6.05 (not tested for other versions)

Then we can install Robotstudio SDK and PC SDK

Then we must adapt the custom Robotstudio Add-In to the new computer, and copy it among other Add-Ins. The file is yumi_control/PC_SDK/RobotStudioEmptyAddin1/RobotStudioAddin1/RobotStudioAddin1.rsaddin. We must change the two paths in the <Assembly> section, and make it point yumi_control/PC_SDK/RobotStudioEmptyAddin1/RobotStudioAddin1/bin/Debug and yumi_control/PC_SDK/RobotStudioEmptyAddin1/RobotStudioAddin1/bin/Release (absolute paths). Then the file shall be copied into Robotstudio Add-Ins folder (usually in Program Files (x86)/ABB IndustrialIT/RoboticsIT/RobotStudio 6.05/Bin/Addins.

At any time, we can install python 2.7 (let it be configured in environment variables for access using command line)

Install required library python-zeromq, matplotlib, numpy, scipy Can be installed through pip:

Click to display ⇲

Click to hide ⇱

pip install numpy scipy matplotlib python-zmq

API and packages used

PC SDK

This package enables to control an ABB controller using C# or Visual Basic. It can connect to the controller, log in, start/stop tasks, change/read module variables, change signal values, upload/download file, etc. We cannot send directly commands to the robot RAPID controller, but through variables modifications and file exchanges, we can set input parameters, then start the tasks. To get more documentation on the PC SDK API, go to http://developercenter.robotstudio.com/pcsdk/api_reference

Robotstudio SDK

This package enables to write Add-Ins and Smart Component for Robotstudio applications. More documentation on the Robotstudio SDK API, go to http://developercenter.robotstudio.com/robotstudio/api_reference