7 from __future__
import print_function
9 import warnings
as _warnings
11 from .
import pinocchio_pywrap
as pin
12 from .deprecation
import deprecated, DeprecatedWarning
17 if len(args)==5
and type(args[4])
is bool:
18 message = (
"This function signature has been deprecated and will be removed in future releases of Pinocchio. " 19 "Please change for the new signature of impulseDynamics(model,data[,q],v_before,J[,r_coeff[,inv_damping]]).")
20 _warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
25 updateKinematics = args[4]
28 return pin.impulseDynamics(model,data,q,v_before,J,r_coeff,inv_damping)
30 return pin.impulseDynamics(model,data,v_before,J,r_coeff,inv_damping)
32 return pin.impulseDynamics(model, data, *args)
34 impulseDynamics.__doc__ = (
35 pin.impulseDynamics.__doc__
36 +
'\n\nimpulseDynamics( (Model)Model, (Data)Data, (object)q, (object)v_before, (object)J, (float)r_coeff, (bool)updateKinematics) -> object :' 37 +
'\n This function signature has been deprecated and will be removed in future releases of Pinocchio.' 43 if len(args)==7
and type(args[6])
is bool:
44 message = (
"This function signature has been deprecated and will be removed in future releases of Pinocchio. " 45 "Please change for the new signature of forwardDynamics(model,data[,q],v,tau,J,gamma[,inv_damping]).")
46 _warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
53 updateKinematics = args[6]
55 return pin.forwardDynamics(model,data,q,v,tau,J,gamma,inv_damping)
57 return pin.forwardDynamics(model,data,tau,J,gamma,inv_damping)
59 return pin.forwardDynamics(model, data, *args)
61 forwardDynamics.__doc__ = (
62 pin.forwardDynamics.__doc__
63 +
'\n\nforwardDynamics( (Model)Model, (Data)Data, (object)q, (object)v, (object)tau, (object)J, (object)gamma, (float)damping, (bool)update_kinematics) -> object :' 64 +
'\n This function signature has been deprecated and will be removed in future releases of Pinocchio.' 67 @
deprecated(
"This function has been renamed computeJointJacobian and will be removed in future releases of Pinocchio. Please change for new computeJointJacobian.")
69 return pin.computeJointJacobian(model,data,q,jointId)
71 @
deprecated(
"This function has been renamed computeFrameJacobian and will be removed in future releases of Pinocchio. Please change for new computeFrameJacobian.")
73 return pin.computeFrameJacobian(model,data,q,frameId)
77 message = (
"This function signature has been renamed and will be removed in future releases of Pinocchio. " 78 "Please change for the new signature of computeCentroidalMomentum(model,data,q,v).")
79 _warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
80 return pin.computeCentroidalMomentum(model,data,q,v)
82 message = (
"This function signature has been renamed and will be removed in future releases of Pinocchio. " 83 "Please change for the new signature of computeCentroidalMomentumTimeVariation(model,data,q,v,a).")
84 _warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
85 return pin.computeCentroidalMomentum(model,data,q,v,a)
87 computeCentroidalDynamics.__doc__ = (
"This function has been renamed computeCentroidalMomentum or computeCentroidalMomentumTimeVariation to either only compute the centroidal momentum quantity or also its time derivative respectively." )
91 @
deprecated(
"The fcl property has been renamed geometry. Please use GeometryObject.geometry instead")
95 @
deprecated(
"This function is now called SE3ToXYZQUATtuple. Please change for this new signature to delete this warning.")
97 return pin.SE3ToXYZQUATtuple(M)
99 @
deprecated(
"This function is now called SE3ToXYZQUAT. Please change for this new signature to delete this warning.")
101 return pin.SE3ToXYZQUAT(M)
103 @
deprecated(
"This function is now called XYZQUATToSE3. Please change for this new signature to delete this warning.")
105 return pin.XYZQUATToSE3(x)
110 if isinstance(arg3,(str,list,pin.StdVec_StdString)):
115 mesh_loader = args[2]
116 message = (
"This function signature is now deprecated and will be removed in future releases of Pinocchio. " 117 "Please change for the new signature buildGeomFromUrdf(model,filename,type,package_dirs,mesh_loader).")
118 _warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
119 return pin.buildGeomFromUrdf(model,filename,geom_type,package_dir,mesh_loader, **kwargs)
121 message = (
"This function signature is now deprecated and will be removed in future releases of Pinocchio. " 122 "Please change for the new signature buildGeomFromUrdf(model,filename,type,package_dirs).")
123 _warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
124 return pin.buildGeomFromUrdf(model,filename,geom_type,package_dir, **kwargs)
126 return pin.buildGeomFromUrdf(model, filename, *args, **kwargs)
128 buildGeomFromUrdf.__doc__ = (
129 pin.buildGeomFromUrdf.__doc__
132 @
deprecated(
"This function is now deprecated and will be removed in future releases of Pinocchio. " 133 "Please change for the new function computePotentialEnergy.")
135 if update_kinematics:
136 return pin.computePotentialEnergy(model,data,q)
138 return pin.computePotentialEnergy(model,data)
140 potentialEnergy.__doc__ +=
'\n' + pin.computePotentialEnergy.__doc__
142 @
deprecated(
"This function is now deprecated and will be removed in future releases of Pinocchio. " 143 "Please change for the new function computeKineticEnergy.")
145 if update_kinematics:
146 return pin.computeKineticEnergy(model,data,q,v)
148 return pin.computeKineticEnergy(model,data)
150 kineticEnergy.__doc__ +=
'\n' + pin.computeKineticEnergy.__doc__
152 from .utils
import npToTTuple, npToTuple
153 pin.rpy.npToTTuple =
deprecated(
"This function was moved to the utils submodule.")(npToTTuple)
154 pin.rpy.npToTuple =
deprecated(
"This function was moved to the utils submodule.")(npToTuple)
157 @
deprecated(
"This function is now deprecated without replacement.")
160 if not isinstance(mesh_scale, np.ndarray):
161 mesh_scale = np.array([mesh_scale]*3)
162 for geom
in geom_model.geometryObjects:
163 geom.meshScale = mesh_scale
def setGeometryMeshScales(geom_model, mesh_scale)
def jointJacobian(model, data, q, jointId)
def forwardDynamics(model, data, args)
def frameJacobian(model, data, q, frameId)
def potentialEnergy(model, data, q, update_kinematics=True)
def computeCentroidalDynamics(model, data, q, v, a=None)
def impulseDynamics(model, data, args)
def buildGeomFromUrdf(model, filename, args, kwargs)
def kineticEnergy(model, data, q, v, update_kinematics=True)
def deprecated(instructions)