Python control interface for interacting with the ABB YuMi Robot

BerkeleyAutomation, updated 🕥 2022-01-21 18:56:11

YuMi Python Interface

AutoLab, UC Berkeley

This package provides a python interface for control and communication with ABB's Yumi. Currently the interface is still undergoing development, so changes will occur to this repo. For best results please be on the newest commit of the master branch before installing and using.

Full documentation can be found at

UPDATE: As of commit f4be489 on June 18, 2017, yumipy depends on autolab_core, a renamed version of core. If this affects you (you have installed yumipy before June 18th, 2017), please do the following: * Pull the latest commit from core * Re-install using pip or following the instructions here * Pull the lastest commit from yumipy


Step 1: Install the alan YuMi python interface on the client computer that will communicate with the YuMi: sh $ python develop Step 2: Upload SERVER_LEFT.mod and SERVER_RIGHT.mod under src/alan/control/ to the left and right arms of YuMi through RobotStudio.


Simple example to import and use the YuMi interface (make sure the YuMi is in Auto mode and has the server running): ```python from yumipy import YuMiRobot

starting the robot interface

y = YuMiRobot()

getting the current pose of the right end effector

pose = y.right.get_pose()

move right arm forward by 5cm using goto_pose

pose.translation[0] += 0.05 y.right.goto_pose(pose)

move right arm back by 5cm using move delta

y.right.goto_pose_delta((-0.05,0,0)) ```

The control and RAPID server code is inspired by the open-abb-driver.


Please request for support and report issues with errors and bugs on the repository Issues tab - that is the best way for us to respond. For other inquiries please contact Jeff Mahler at [email protected] and Jacky Liang at [email protected]


sudo python develop が実行できない

opened on 2022-10-11 10:12:26 by Miya-imslab

こんにちは terminalでsudo python developを実行したのですが以下のエラーが出ました。 私の環境はROS Melodicです。

[email protected]:~/3/src/yumipy$ sudo python develop [sudo] member のパスワード: running develop running egg_info creating yumipy.egg-info writing requirements to yumipy.egg-info/requires.txt writing yumipy.egg-info/PKG-INFO writing top-level names to yumipy.egg-info/top_level.txt writing dependency_links to yumipy.egg-info/dependency_links.txt writing manifest file 'yumipy.egg-info/SOURCES.txt' reading manifest file 'yumipy.egg-info/SOURCES.txt' writing manifest file 'yumipy.egg-info/SOURCES.txt' running build_ext Creating /usr/local/lib/python2.7/dist-packages/yumipy.egg-link (link to .) Adding yumipy 0.1.0 to easy-install.pth file

Installed /home/member/3/src/yumipy Processing dependencies for yumipy==0.1.0 Searching for ipython==5.5.0 Reading Downloading Best match: ipython 5.5.0 Processing ipython-5.5.0-py2-none-any.whl Installing ipython-5.5.0-py2-none-any.whl to /usr/local/lib/python2.7/dist-packages Adding ipython 5.5.0 to easy-install.pth file Installing ipython script to /usr/local/bin Installing iptest2 script to /usr/local/bin Installing iptest script to /usr/local/bin Installing ipython2 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/ipython-5.5.0-py2.7.egg Searching for setproctitle Reading Downloading Best match: setproctitle 1.3.2 Processing setproctitle-1.3.2.tar.gz Writing /tmp/easy_install-LUNDW3/setproctitle-1.3.2/setup.cfg Running setproctitle-1.3.2/ -q bdist_egg --dist-dir /tmp/easy_install-LUNDW3/setproctitle-1.3.2/egg-dist-tmp-a5RbSW Traceback (most recent call last): File "", line 32, in 'sphinx_rtd_theme' File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 162, in setup return distutils.core.setup(**attrs) File "/usr/lib/python2.7/distutils/", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/", line 972, in run_command File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 38, in run self.install_for_development() File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 156, in install_for_development self.process_distribution(None, self.dist, not self.no_deps) File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 758, in process_distribution [requirement], self.local_index, self.easy_install File "/home/member/.local/lib/python2.7/site-packages/pkg_resources/", line 782, in resolve replace_conflicting=replace_conflicting File "/home/member/.local/lib/python2.7/site-packages/pkg_resources/", line 1065, in best_match return self.obtain(req, installer) File "/home/member/.local/lib/python2.7/site-packages/pkg_resources/", line 1077, in obtain return installer(requirement) File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 685, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 711, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 896, in install_eggs return self.build_and_install(setup_script, setup_base) File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 1164, in build_and_install self.run_setup(setup_script, setup_base, args) File "/home/member/.local/lib/python2.7/site-packages/setuptools/command/", line 1150, in run_setup run_setup(setup_script, args) File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 253, in run_setup raise File "/usr/lib/python2.7/", line 35, in exit self.gen.throw(type, value, traceback) File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 195, in setup_context yield File "/usr/lib/python2.7/", line 35, in exit self.gen.throw(type, value, traceback) File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 166, in save_modules saved_exc.resume() File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 141, in resume six.reraise(type, exc, self._tb) File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 154, in save_modules yield saved File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 195, in setup_context yield File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 250, in run_setup _execfile(setup_script, ns) File "/home/member/.local/lib/python2.7/site-packages/setuptools/", line 44, in _execfile code = compile(script, filename, 'exec') File "/tmp/easy_install-LUNDW3/setproctitle-1.3.2/", line 18 raise Exception(f"cannot find version in {}") ^ SyntaxError: invalid syntax

Bump ipython from 5.5.0 to 7.16.3

opened on 2022-01-21 18:56:11 by dependabot[bot]

Bumps ipython from 5.5.0 to 7.16.3.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](

yumi robot go to pose issue

opened on 2021-12-02 12:11:13 by fourteenjiang


I have been having an issue with using command go_to pose, any command related with pose will fail, I tried to print if reachable for different positions, even the home position is unreachable, the coder and error message are as follow, I would be appreciating if you could have a look.

import numpy as np from yumipy import YuMiRobot, YuMiState, YuMiArm from autolab_core import RigidTransform

def quaternion_rotation_matrix(Q):

# Covert a quaternion into a full three-dimensional rotation matrix.
# Input
# :param Q: A 4 element array representing the quaternion (q0,q1,q2,q3)
# Output
# :return: A 3x3 element matrix representing the full 3D rotation matrix.
#          This rotation matrix converts a point in the local reference
#          frame to a point in the global reference frame.

# Extract the values from Q
q0 = Q[0]
q1 = Q[1]
q2 = Q[2]
q3 = Q[3]

# First row of the rotation matrix
r00 = 2 * (q0 * q0 + q1 * q1) - 1
r01 = 2 * (q1 * q2 - q0 * q3)
r02 = 2 * (q1 * q3 + q0 * q2)

# Second row of the rotation matrix
r10 = 2 * (q1 * q2 + q0 * q3)
r11 = 2 * (q0 * q0 + q2 * q2) - 1
r12 = 2 * (q2 * q3 - q0 * q1)

# Third row of the rotation matrix
r20 = 2 * (q1 * q3 - q0 * q2)
r21 = 2 * (q2 * q3 + q0 * q1)
r22 = 2 * (q0 * q0 + q3 * q3) - 1

# 3x3 rotation matrix
rot_matrix = np.array([[r00, r01, r02],
                       [r10, r11, r12],
                       [r20, r21, r22]])

return rot_matrix

def trans_matrix(T): T0 = T[0]0.001 T1 = T[1]0.001 T2 = T[2]*0.001

trans_matrix = np.array([T0 ,T1 , T2])

return trans_matrix

robot = YuMiRobot() rhome = YuMiState([0, -130, 30, 0, 40, 0, -135]) robot.right.goto_state(rhome)

robot.right.goto_state(YuMiState([23.4889, -102.875, 55.0657, 74.4949, -74.5303, 106.163, -54.7101]))

robot.right.goto_state(YuMiState([23.4889, -102.875, 55.0657, 74.4949, -74.5303, 106.163, -54.7101]))

pose = robot.right.get_pose()

pose.translation[0] += 0.05

print('pose',pose) is_reachalbe = robot.right.is_pose_reachable(pose) print(f'is pose reachable: {is_reachalbe}')

rot_mat = quaternion_rotation_matrix([0.05747,-0.83779,-0.11153,-0.53139])


rot_mat = quaternion_rotation_matrix([0.05736,-0.83777,-0.11147,-0.53144]) trans_mat=trans_matrix([228.44,-150.86,131.19]) lin_pose_1 = RigidTransform(rot_mat, trans_mat,from_frame='tool',to_frame='world') print ('lin1',lin_pose_1)




error: /home/robot/sd1/venv/venv2/bin/python /home/robot/sd1/venv/ WARNING:root:Failed to import geometry msgs in WARNING:root:Failed to import ros dependencies in WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable ERROR:root:Unable to load ROS! Will not be able to use client-side motion planner! WARNING:root:rospy could not be imported, yumi over ros will be unavailable pose Tra: [ 0.17658001 -0.15087 0.13117 ] Rot: [[ 0.41098882 0.2482465 0.87718975] [ 0.12717825 -0.96841394 0.21447643] [ 0.90272581 0.02341205 -0.42957886]] Qtn: [-0.05700006 0.83800084 0.11200011 0.53100053] from tool to world is pose reachable: False lin1 Tra: [ 0.22844 -0.15086 0.13119] Rot: [[ 0.41029748 0.24773924 0.87766114] [ 0.12580565 -0.96856854 0.21458821] [ 0.90323682 0.02237026 -0.42856271]] Qtn: [-0.05736006 0.83776917 0.11147011 0.53144053] from tool to world Traceback (most recent call last): File "/home/robot/sd1/venv/", line 82, in robot.right.goto_pose(pose) File "/home/robot/.local/lib/python3.6/site-packages/yumipy/", line 559, in goto_pose res = self._request(req, wait_for_res, timeout=self._motion_timeout) File "/home/robot/.local/lib/python3.6/site-packages/yumipy/", line 314, in _request raise YuMiControlException(req_packet, res) yumipy.yumi_exceptions.YuMiControlException: Failed Request! Req: _REQ_PACKET(req='1 176.6 -150.9 131.2 -0.057 0.838 0.112 0.531 #', timeout=8, return_res=True) Res: _RAW_RES(mirror_code=1, res_code=0, message='Unreachable Pose') Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/", line 28, in poll pid, sts = os.waitpid(, flag) KeyboardInterrupt

Process finished with exit code 1

Unable to load ROS! PLZ HELP

opened on 2020-10-30 13:12:52 by EtherW

Hello, I am working with ubuntu16.04 and ROS Kinetic. I follow the Installation Guide(ROS Installation) and succeed to installing autolab_core module and yumipy. But I come across the problem when I calibrate the grippers(with 'python tools/'). The actual robot's grippers can be calibrated, however, the terminal shows 'ERROR:root:Unable to load ROS! Will not be able to use client-side motion planner!'(I've uploaded the picture.) Unable_to_load

So, I'm writing to ask if it's for the version of ROS, which should be installed with Jade. Can anyone give me some help and I thank you in advance!

old arm-angle definition

opened on 2020-01-27 10:08:09 by theotromp97


I have successfully installed yumipy and can make a connection with the yumi successfully. My problem is regarding a newer version of RobotStudio (6.0.8). My problem is basically the same as THIS thread. When i try a goto_pose() command I get the same error as in the link above. In RobotStudio V6.0.8 there is no option anymore to use old arm angle definition so this solution does not work in this version. Using a previous version of RobotStudio is not really an option so I need a solution to change the arm-angle definition.

Thanks in advance. Best regards, Theo

communication problem

opened on 2019-11-06 14:02:24 by MERYEMTAGH

Hello, I have a problem with communication with the robot I followed your tutorial as needed and I always get this problem that I think about the python version or something like that. I work with ros kinetic under ubuntu 16.4 and I have a RobotWare version I put a screenshot of my problem and I hope you can at least understand the source of this problem where anything that can help me. image

I thank you in advance

Berkeley Automation Lab
GitHub Repository