Commit 38538f7a authored by jcarpent's avatar jcarpent
Browse files

[Python] Homogenise variable names

parent b40e7d15
...@@ -29,11 +29,11 @@ namespace se3 ...@@ -29,11 +29,11 @@ namespace se3
const Eigen::VectorXd & q, const Eigen::VectorXd & q,
Model::JointIndex jointId, Model::JointIndex jointId,
bool local, bool local,
bool update_geometry) bool update_kinematics)
{ {
Data::Matrix6x J(6,model.nv); J.setZero(); Data::Matrix6x J(6,model.nv); J.setZero();
if (update_geometry) if (update_kinematics)
computeJacobians(model,data,q); computeJacobians(model,data,q);
if(local) getJacobian<true> (model,data,jointId,J); if(local) getJacobian<true> (model,data,jointId,J);
...@@ -56,7 +56,7 @@ namespace se3 ...@@ -56,7 +56,7 @@ namespace se3
"Joint configuration q (size Model::nq)", "Joint configuration q (size Model::nq)",
"Joint ID, the index of the joint.", "Joint ID, the index of the joint.",
"frame (true = local, false = world)", "frame (true = local, false = world)",
"update_geometry (true = update the value of the total jacobian)"), "update_kinematics (true = update the value of the total jacobian)"),
"Computes the jacobian of a given given joint according to the given input configuration." "Computes the jacobian of a given given joint according to the given input configuration."
"If local is set to true, it returns the jacobian associated to the joint frame. Otherwise, it returns the jacobian of the frame coinciding with the world frame."); "If local is set to true, it returns the jacobian associated to the joint frame. Otherwise, it returns the jacobian of the frame coinciding with the world frame.");
} }
......
...@@ -14,12 +14,9 @@ ...@@ -14,12 +14,9 @@
# Pinocchio If not, see # Pinocchio If not, see
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
import time
import libpinocchio_pywrap as se3 import libpinocchio_pywrap as se3
import utils import utils
from explog import exp import time
class RobotWrapper(object): class RobotWrapper(object):
...@@ -99,8 +96,8 @@ class RobotWrapper(object): ...@@ -99,8 +96,8 @@ class RobotWrapper(object):
else: else:
se3.forwardKinematics(self.model, self.data, q) se3.forwardKinematics(self.model, self.data, q)
def position(self, q, index, update_geometry=True): def position(self, q, index, update_kinematics=True):
if update_geometry: if update_kinematics:
se3.forwardKinematics(self.model, self.data, q) se3.forwardKinematics(self.model, self.data, q)
return self.data.oMi[index] return self.data.oMi[index]
...@@ -109,13 +106,13 @@ class RobotWrapper(object): ...@@ -109,13 +106,13 @@ class RobotWrapper(object):
se3.forwardKinematics(self.model, self.data, q, v) se3.forwardKinematics(self.model, self.data, q, v)
return self.data.v[index] return self.data.v[index]
def acceleration(self, q, v, a, index, update_acceleration=True): def acceleration(self, q, v, a, index, update_kinematics=True):
if update_acceleration: if update_kinematics:
se3.forwardKinematics(self.model, self.data, q, v, a) se3.forwardKinematics(self.model, self.data, q, v, a)
return self.data.a[index] return self.data.a[index]
def jacobian(self, q, index, update_geometry=True, local_frame=True): def jacobian(self, q, index, update_kinematics=True, local_frame=True):
return se3.jacobian(self.model, self.data, q, index, local_frame, update_geometry) return se3.jacobian(self.model, self.data, q, index, local_frame, update_kinematics)
def computeJacobians(self, q): def computeJacobians(self, q):
return se3.computeJacobians(self.model, self.data, q) return se3.computeJacobians(self.model, self.data, q)
......
Markdown is supported
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