Commit 11793c30 authored by jcarpent's avatar jcarpent
Browse files

[Python] Expose algo to derived with respect to time the joint Jacobian

parent 59385e63
//
// Copyright (c) 2015-2016 CNRS
// Copyright (c) 2015-2017 CNRS
//
// This file is part of Pinocchio
// Pinocchio is free software: you can redistribute it
......@@ -42,6 +42,21 @@ namespace se3
return J;
}
static Data::Matrix6x
get_jacobian_time_variation_proxy(const Model & model,
Data & data,
Model::JointIndex jointId,
bool local)
{
Data::Matrix6x dJ(6,model.nv); dJ.setZero();
if(local) getJacobianTimeVariation<true> (model,data,jointId,dJ);
else getJacobianTimeVariation<false> (model,data,jointId,dJ);
return dJ;
}
void exposeJacobian()
{
bp::def("computeJacobians",computeJacobians,
......@@ -59,6 +74,22 @@ namespace se3
"update_kinematics (true = update the value of the total jacobian)"),
"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.");
bp::def("computeJacobiansTimeVariation",computeJacobiansTimeVariation,
bp::args("Model","Data",
"Joint configuration q (size Model::nq)",
"Joint velocity v (size Model::nv)"),
"Calling computeJacobiansTimeVariation",
bp::return_value_policy<bp::return_by_value>());
bp::def("getJacobianTimeVariation",get_jacobian_time_variation_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 time variation of a specific joint frame expressed either in the world frame or in the local frame of the joint."
"You have to run computeJacobiansTimeVariation first."
"If local is set to true, it returns the jacobian time variation associated to the joint frame. Otherwise, it returns the jacobian time variation of the frame coinciding with the world frame.");
}
} // namespace python
......
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