Commit 73f9fe3b authored by jcarpent's avatar jcarpent
Browse files

[Python] Expose getJacobian algo

parent d5aeccd0
...@@ -42,6 +42,20 @@ namespace se3 ...@@ -42,6 +42,20 @@ namespace se3
return J; return J;
} }
static Data::Matrix6x
get_jacobian_proxy(const Model & model,
Data & data,
Model::JointIndex jointId,
bool local)
{
Data::Matrix6x J(6,model.nv); J.setZero();
if(local) getJacobian<LOCAL> (model,data,jointId,J);
else getJacobian<WORLD> (model,data,jointId,J);
return J;
}
static Data::Matrix6x static Data::Matrix6x
get_jacobian_time_variation_proxy(const Model & model, get_jacobian_time_variation_proxy(const Model & model,
Data & data, Data & data,
...@@ -75,6 +89,14 @@ namespace se3 ...@@ -75,6 +89,14 @@ namespace se3
"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.");
bp::def("getJacobian",get_jacobian_proxy,
bp::args("Model, the model of the kinematic tree",
"Data, the data associated to the model where the results are stored",
"Joint ID, the index of the joint.",
"frame (true = local, false = world)"),
"Computes the jacobian of a given given joint according to the given entries in data."
"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.");
bp::def("computeJacobiansTimeVariation",computeJacobiansTimeVariation, bp::def("computeJacobiansTimeVariation",computeJacobiansTimeVariation,
bp::args("Model","Data", bp::args("Model","Data",
"Joint configuration q (size Model::nq)", "Joint configuration q (size Model::nq)",
......
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