Yumi experiment with the tactile table

Tests:

Click to display ⇲

Click to hide ⇱

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:

  • controlling the robot, by remotely changing and reading variables of running RAPID programs, stopping them, starting them, and checking the robot internal state
  • running a proxy server to enable remote programs to send commands to the robot (e.g. SGIM program).

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)

  • T_ROB_R (mechanic task)
  • T_ROB_R_b (background task)

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: contains the RAPID modules which runs on the robot
  • PC_SDK: contains C# VisualStudio projects enabling to control the robot

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

  • CalibData.mod: contains calibration information for the robot (DO NOT MODIFY IT!)
  • FileTransfer.sys: contains functions to serialize and deserialize specific data
  • RecordingModule.mod: main module running on the background task, it records in TCP and joint space the trajectory of the arm
  • MainModule.mod: old main module to be used on real robot, however too complex as it contains too many different functions, also deprecated (can be used as reference for RAPID implementation)
  • MainSimuModule.mod: main module running on the main task (T_ROB_R), waits for joint trajectory to execute motion
  • YumiProgram.pgf: xml description of the whole program, used to import whole program using the flex pendant (NOT UP TO DATE)

On the robot, 3 tasks exist:

  • T_ROB_R: main mechanical task for the right arm
  • T_ROB_L: main mechanical task for left arm
  • T_ROB_R_b: background task for right arm

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).

Contains different VisualStudio projects:

  • RecordYumi: client application that will connect to the running YumiControlPC server to make it record/play trajectories from files (DEPRECATED)
  • RobotStudioEmptyAddin1: Add-in for RobotStudio which sets the right arm joints to initial configuration when requested, hosts a zeroMQ server to do so
  • YumiControlPC: the controller for the robot, implements a visual interface to connect to the robot, it controls the execution of the RAPID programs on the robot and hosts a zeroMQ server for external application to command the robot (also connect to the RobotStudioEmptyAddin1 for resetting environment)

YumiControlPC

The code is splat in 3 parts:

  • SimuYumiNode.cs: contains the code managing the zeroMQ communication protocol, called when receiving external commands
  • SimuYumiController.cs: contains the code interfacing with the robot remote controller
  • YumiController.cs: contains the callbacks for the visual interface created when starting the application

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:

  • motion execution:

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
  }

}

  • reset order:

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

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

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

  • yumi.txt
  • Last modified: 2019/05/13 13:43
  • by nduminy