Allow URRobot to be used as a context object.
This commit is contained in:
parent
47c29fab83
commit
606ecd5fa3
@ -365,11 +365,3 @@ class Robot(URRobot):
|
|||||||
t = m3d.Transform()
|
t = m3d.Transform()
|
||||||
t.orient.rotate_zb(val)
|
t.orient.rotate_zb(val)
|
||||||
self.add_pose_tool(t)
|
self.add_pose_tool(t)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,6 +54,12 @@ class URRobot(object):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.__repr__()
|
return self.__repr__()
|
||||||
|
|
||||||
|
def __enter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
|
self.close()
|
||||||
|
|
||||||
def is_running(self):
|
def is_running(self):
|
||||||
"""
|
"""
|
||||||
Return True if robot is running (not
|
Return True if robot is running (not
|
||||||
@ -432,6 +438,3 @@ class URRobot(object):
|
|||||||
Move down in csys z
|
Move down in csys z
|
||||||
"""
|
"""
|
||||||
self.up(-z, acc, vel)
|
self.up(-z, acc, vel)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,5 +252,3 @@ class URRTMonitor(threading.Thread):
|
|||||||
while not self._stop_event:
|
while not self._stop_event:
|
||||||
self.__recv_rt_data()
|
self.__recv_rt_data()
|
||||||
self._rtSock.close()
|
self._rtSock.close()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user