Skip to content

Commit ed54f41

Browse files
author
Siddhartha Srinivasa
committed
Cleaned up optimized joint velocity computation
1 parent 492533c commit ed54f41

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/prpy/util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ def quadraticObjective(dq, *args):
427427
@param dq joint velocity
428428
@param args[0]Jacobian
429429
@param args[1] desired twist
430+
@return objective the objective function
431+
@return gradient the analytical gradient of the objective
430432
'''
431433
J = args[0]
432434
dx = args[1]
@@ -450,6 +452,9 @@ def ComputeJointVelocityFromTwist(robot, twist,
450452
defaults to quadraticObjective
451453
@params dq_init optional initial guess for optimal joint velocity
452454
defaults to robot.GetActiveDOFVelocities()
455+
@return dq_opt optimal joint velocity
456+
@return twist_opt actual achieved twist
457+
can be different from desired twist due to constraints
453458
'''
454459
manip = robot.GetActiveManipulator()
455460
robot.SetActiveDOFs(manip.GetArmIndices())
@@ -478,8 +483,6 @@ def ComputeJointVelocityFromTwist(robot, twist,
478483
bounds=dq_bounds, approx_grad=False)
479484

480485
dq_opt = opt[0]
481-
if opt[1] > 0:
482-
print "Unable to produce desired twist."
483486
twist_opt = numpy.dot(jacobian, dq_opt)
484487

485488
return dq_opt, twist_opt

0 commit comments

Comments
 (0)