Removed speedx method in robot.py for avoiding confusion: moved speedj and speedl methods to robot.py

This commit is contained in:
Alvaro Capellan 2016-07-05 16:41:36 +02:00
parent 3b0e38868b
commit 70e13773df
2 changed files with 11 additions and 21 deletions

View File

@ -144,18 +144,20 @@ class Robot(URRobot):
trans = self.get_pose(wait)
return trans.pos
def speedx(self, command, velocities, acc, min_time):
def speedl(self, velocities, acc, min_time):
"""
send command to robot formated like speedl or speedj
move at given velocities until minimum min_time seconds
"""
if command != "speedj":
v = self.csys.orient * m3d.Vector(velocities[:3])
w = self.csys.orient * m3d.Vector(velocities[3:])
vels = np.concatenate((v.array, w.array))
else:
vels = velocities
URRobot.speedx(self, command, vels, acc, min_time)
return self.speedx("speedl", vels, acc, min_time)
def speedj(self, velocities, acc, min_time):
"""
move at given joint velocities until minimum min_time seconds
"""
return self.speedx("speedj", velocities, acc, min_time)
def speedl_tool(self, velocities, acc, min_time):
"""

View File

@ -258,18 +258,6 @@ class URRobot(object):
prog = "{}([{},{},{},{},{},{}], a={}, t_min={})".format(command, *vels)
self.send_program(prog)
def speedl(self, velocities, acc, min_time):
"""
move at given velocities until minimum min_time seconds
"""
return self.speedx("speedl", velocities, acc, min_time)
def speedj(self, velocities, acc, min_time):
"""
move at given joint velocities until minimum min_time seconds
"""
return self.speedx("speedj", velocities, acc, min_time)
def movej(self, joints, acc=0.1, vel=0.05, wait=True, relative=False, threshold=None):
"""
move in joint space