Skip to content

Commit

Permalink
expose computeJointKinematicHessians to python
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Torres committed Mar 28, 2024
1 parent 1c481f9 commit 8bebc6e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 15 additions & 3 deletions bindings/python/algorithm/expose-kinematics-derivatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,21 @@ namespace pinocchio
"\tmodel: model of the kinematic tree\n"
"\tdata: data related to the model\n");

bp::def("computeJointKinematicHessians",
&computeJointKinematicHessians<double, 0, JointCollectionDefaultTpl,
VectorXd>,
bp::args("model", "data", "q"),
"Computes the full model Jacobian, i.e. the stack of all the "
"motion subspaces expressed in the coordinate world frame.\n"
"The result is accessible through data.J. This function computes "
"also the forward kinematics of the model.\n\n"
"Parameters:\n"
"\tmodel: model of the kinematic tree\n"
"\tdata: data related to the model\n"
"\tq: the joint configuration vector (size model.nq)\n",
bp::return_value_policy<bp::return_by_value>());

}




} // namespace python
} // namespace pinocchio
2 changes: 2 additions & 0 deletions include/pinocchio/bindings/python/multibody/data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ namespace pinocchio
.ADD_DATA_PROPERTY(dq_after,"Generalized velocity after the impact.")
.ADD_DATA_PROPERTY(staticRegressor,"Static regressor.")
.ADD_DATA_PROPERTY(jointTorqueRegressor,"Joint torque regressor.")

.ADD_DATA_PROPERTY(kinematic_hessians,"Joint Kinematic Hessians.")

.def(bp::self == bp::self)
.def(bp::self != bp::self)
Expand Down

0 comments on commit 8bebc6e

Please # to comment.