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 https://berkeleyautomation.github.io/yumipy/
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 setup.py 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 setup.py 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
y = YuMiRobot()
pose = y.right.get_pose()
pose.translation[0] += 0.05 y.right.goto_pose(pose)
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]
こんにちは
terminalでsudo python setup.py develop
を実行したのですが以下のエラーが出ました。
私の環境はROS Melodicです。
[email protected]:~/3/src/yumipy$ sudo python setup.py 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 https://pypi.org/simple/ipython/ Downloading https://files.pythonhosted.org/packages/08/2c/6285504003b4eadce5540f3ee3adc081468b26723f3eef07d9d5d7d97ed8/ipython-5.5.0-py2-none-any.whl#sha256=578e2f3d779ed130a3cfefc09b2eb965a81457f6a31a25cd38e0bab622d4777d 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 https://pypi.org/simple/setproctitle/
Downloading https://files.pythonhosted.org/packages/b5/47/ac709629ddb9779fee29b7d10ae9580f60a4b37e49bce72360ddf9a79cdc/setproctitle-1.3.2.tar.gz#sha256=b9fb97907c830d260fa0658ed58afd48a86b2b88aac521135c352ff7fd3477fd
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/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LUNDW3/setproctitle-1.3.2/egg-dist-tmp-a5RbSW
Traceback (most recent call last):
File "setup.py", line 32, in
Bumps ipython from 5.5.0 to 7.16.3.
d43c7c7
release 7.16.35fa1e40
Merge pull request from GHSA-pq7m-3gw7-gq5x8df8971
back to dev9f477b7
release 7.16.2138f266
bring back release helper from master branch5aa3634
Merge pull request #13341 from meeseeksmachine/auto-backport-of-pr-13335-on-7...bcae8e0
Backport PR #13335: What's new 7.16.28fcdcd3
Pin Jedi to <0.17.2.2486838
release 7.16.120bdc6f
fix conda buildDependabot 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
.
Hi:
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)
pose = robot.right.get_pose()
print('pose',pose) is_reachalbe = robot.right.is_pose_reachable(pose) print(f'is pose reachable: {is_reachalbe}')
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)
robot.right.goto_pose(pose)
print('ok')
error:
/home/robot/sd1/venv/venv2/bin/python /home/robot/sd1/venv/test.py
WARNING:root:Failed to import geometry msgs in rigid_transformations.py.
WARNING:root:Failed to import ros dependencies in rigid_transforms.py
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/test.py", line 82, in
Process finished with exit code 1
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/calibrate_grippers.py'). 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.)
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!
Dear,
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
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 6.06.01.00. 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.
I thank you in advance