add method for csys from points and read all digital ios at once
This commit is contained in:
parent
43ac33abd5
commit
f7fb1f5a12
2
setup.py
2
setup.py
@ -3,7 +3,7 @@ from distutils.command.install_data import install_data
|
||||
|
||||
|
||||
setup (name = "urx",
|
||||
version = "0.9.3",
|
||||
version = "0.9.4",
|
||||
description = "Python library to control an UR robot",
|
||||
author = "Olivier Roulet-Dubonnet",
|
||||
author_email = "olivier.roulet@gmail.com",
|
||||
|
@ -209,13 +209,13 @@ class Robot(URRobot):
|
||||
vector = vector.list
|
||||
return URRobot.set_gravity(self, vector)
|
||||
|
||||
def new_csys_from_pxy(self):
|
||||
def new_csys_from_xpy(self):
|
||||
"""
|
||||
Return new coordinate system from three points: Origin, X, Y
|
||||
Return new coordinate system from three points: X, Origin, Y
|
||||
based on math3d: Transform.new_from_xyp
|
||||
"""
|
||||
print("A new coordinate system will be defined from the next three points")
|
||||
print("Firs point is origin, second X, third Y")
|
||||
print("Firs point is X, second Origin, third Y")
|
||||
print("Set it as a new reference by calling myrobot.set_csys(new_csys)")
|
||||
input("Move to first point and click Enter")
|
||||
# we do not use get_pose so we avoid rounding values
|
||||
|
@ -171,6 +171,12 @@ class URRobot(object):
|
||||
"""
|
||||
return self.secmon.get_digital_out(val, wait=wait)
|
||||
|
||||
def get_digital_out_bits(self, wait=False):
|
||||
"""
|
||||
get digital output as a byte
|
||||
"""
|
||||
return self.secmon.get_digital_out_bits(wait=wait)
|
||||
|
||||
def set_analog_out(self, output, val):
|
||||
"""
|
||||
set analog output, val is a float
|
||||
|
@ -364,6 +364,12 @@ class SecondaryMonitor(Thread):
|
||||
else:
|
||||
return 0
|
||||
|
||||
def get_digital_out_bits(self, wait=False):
|
||||
if wait:
|
||||
self.wait()
|
||||
with self._dictLock:
|
||||
return self._dict["MasterBoardData"]["digitalOutputBits"]
|
||||
|
||||
def get_digital_in(self, nb, wait=False):
|
||||
if wait:
|
||||
self.wait()
|
||||
@ -375,18 +381,18 @@ class SecondaryMonitor(Thread):
|
||||
else:
|
||||
return 0
|
||||
|
||||
def get_analog_in(self, nb, wait=False):
|
||||
if wait:
|
||||
self.wait()
|
||||
with self._dictLock:
|
||||
return self._dict["MasterBoardData"]["analogInput" + str(nb)]
|
||||
|
||||
def get_digital_in_bits(self, wait=False):
|
||||
if wait:
|
||||
self.wait()
|
||||
with self._dictLock:
|
||||
return self._dict["MasterBoardData"]["digitalInputBits"]
|
||||
|
||||
def get_analog_in(self, nb, wait=False):
|
||||
if wait:
|
||||
self.wait()
|
||||
with self._dictLock:
|
||||
return self._dict["MasterBoardData"]["analogInput" + str(nb)]
|
||||
|
||||
def get_analog_inputs(self, wait=False):
|
||||
if wait:
|
||||
self.wait()
|
||||
|
Loading…
x
Reference in New Issue
Block a user