do not keep ref of inverse matrix for calibration, small packaging changes for pipy

This commit is contained in:
Olivier R-D 2014-01-16 14:56:36 +01:00
parent 7ec4165fc2
commit 08baca5a0f
3 changed files with 16 additions and 9 deletions

View File

@ -2,16 +2,25 @@ from distutils.core import setup
from distutils.command.install_data import install_data
import make_deb
setup (name = "python-urx",
version = make_deb.vcsstring,
setup (name = "urx",
version = ".8.0",
description = "Python library to control an UR robot",
author = "Olivier Roulet-Dubonnet",
author_email = "olivier.roulet@gmail.com",
url = 'https://github.com/oroulet/python-urx',
packages = ["urx"],
provides = ["urx"],
license = "GNU General Public License v3",
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: System :: Hardware :: Hardware Drivers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
)

View File

@ -1,7 +1,7 @@
"""
Python library to control an UR robot through its TCP/IP interface
"""
__version__ = "0.8"
__version__ = "0.8.0"

View File

@ -430,7 +430,6 @@ class Robot(URRobot):
self.default_linear_velocity = 0.01
self.csys_dict = {}
self.csys = None
self.csys_inv = None
self.set_csys("Robot", m3d.Transform()) #identity
def set_tcp(self, tcp):
@ -452,7 +451,6 @@ class Robot(URRobot):
if matrix:
self.add_csys(name, matrix)
self.csys = self.csys_dict[name]
self.csys_inv = self.csys.inverse()
def orient(self, orient, acc=None, vel=None, radius=0, wait=True):
if type(orient) is not m3d.Orientation:
@ -510,7 +508,7 @@ class Robot(URRobot):
else:
pose = URRobot.movel(self, t.pose_vector, acc=acc, vel=vel, wait=wait, radius=radius)
if pose != None : #movel does not return anything when wait is False
return self.csys_inv * m3d.Transform(pose)
return self.csys.inverse * m3d.Transform(pose)
set_transform = apply_transform #since we have set_pos, set_orient, we should be consistent and use set for tranform to ..
@ -533,7 +531,7 @@ class Robot(URRobot):
get current transform from base to to tcp
"""
pose = URRobot.getl(self, wait)
trans = self.csys_inv * m3d.Transform(pose)
trans = self.csys.inverse * m3d.Transform(pose)
return trans
def get_pose(self, wait=False):