Commit 8a91e0e6 authored by jcarpent's avatar jcarpent
Browse files

[Python] Update script according to new API of Jacobian functions

parent a0deb7ce
......@@ -31,7 +31,7 @@ def hessian(robot,q,crossterms=False):
'''
lambdas.setRobotArgs(robot)
H=np.zeros([6,robot.model.nv,robot.model.nv])
se3.computeJacobians(robot.model,robot.data,q)
se3.computeJointJacobians(robot.model,robot.data,q)
J = robot.data.J
skiplast = -1 if not crossterms else None
for joint_i in range(1,robot.model.njoints):
......
......@@ -16,6 +16,8 @@
from . import libpinocchio_pywrap as se3
from . import utils
from .deprecation import deprecated
import time
import os
......@@ -171,8 +173,12 @@ class RobotWrapper(object):
def jacobian(self, q, index, update_kinematics=True, local_frame=True):
return se3.jacobian(self.model, self.data, q, index, local_frame, update_kinematics)
@deprecated("This method is now deprecated. Please use computeJointJacobians instead.")
def computeJacobians(self, q):
return se3.computeJacobians(self.model, self.data, q)
return se3.computeJointJacobians(self.model, self.data, q)
def computeJointJacobians(self, q):
return se3.computeJointJacobians(self.model, self.data, q)
def updateGeometryPlacements(self, q=None, visual=False):
if visual:
......@@ -191,7 +197,7 @@ class RobotWrapper(object):
def framesKinematics(self, q):
se3.framesKinematics(self.model, self.data, q)
''' Call computeJacobians if update_geometry is true. If not, user should call computeJacobians first.
''' Call computeJointJacobians if update_geometry is true. If not, user should call computeJointJacobians first.
Then call getJacobian and return the resulted jacobian matrix. Attention: if update_geometry is true,
the function computes all the jacobians of the model. It is therefore outrageously costly wrt a
dedicated call. Use only with update_geometry for prototyping.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment