expose-contact-jacobian.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 INRIA
3 //
4 
7 
9 
10 namespace bp = boost::python;
11 
12 namespace pinocchio
13 {
14  namespace python
15  {
16 
18  RigidConstraintModelVector;
20  RigidConstraintDataVector;
21 
23  const context::Model & model,
24  const context::Data & data,
27  {
29  J.setZero();
31  return J;
32  }
33 
35  const context::Model & model,
36  const context::Data & data,
37  const RigidConstraintModelVector & contact_models,
38  RigidConstraintDataVector & contact_datas)
39  {
40  const Eigen::DenseIndex constraint_size = getTotalConstraintSize(contact_models);
41  context::MatrixXs J(constraint_size, model.nv);
42  J.setZero();
44  return J;
45  }
46 
48  {
49  bp::def(
50  "getConstraintJacobian", getConstraintJacobian_proxy,
51  bp::args("model", "data", "contact_model", "contact_data"),
52  "Computes the kinematic Jacobian associatied to a given constraint model.");
53  bp::def(
54  "getConstraintsJacobian", getConstraintsJacobian_proxy,
55  bp::args("model", "data", "contact_models", "contact_datas"),
56  "Computes the kinematic Jacobian associatied to a given set of constraint models.");
57  }
58  } // namespace python
59 } // namespace pinocchio
boost::python
pinocchio::python::context::RigidConstraintData
RigidConstraintDataTpl< Scalar, Options > RigidConstraintData
Definition: bindings/python/context/generic.hpp:146
pinocchio::DataTpl
Definition: context/generic.hpp:25
pinocchio::python::exposeContactJacobian
void exposeContactJacobian()
Definition: expose-contact-jacobian.cpp:47
pinocchio::python::getConstraintsJacobian_proxy
static context::MatrixXs getConstraintsJacobian_proxy(const context::Model &model, const context::Data &data, const RigidConstraintModelVector &contact_models, RigidConstraintDataVector &contact_datas)
Definition: expose-contact-jacobian.cpp:34
contact-cholesky.contact_data
list contact_data
Definition: contact-cholesky.py:33
setup.data
data
Definition: cmake/cython/setup.in.py:48
inverse-kinematics-3d.J
J
Definition: inverse-kinematics-3d.py:28
pinocchio::python::getConstraintJacobian_proxy
static context::MatrixXs getConstraintJacobian_proxy(const context::Model &model, const context::Data &data, const context::RigidConstraintModel &contact_model, context::RigidConstraintData &contact_data)
Definition: expose-contact-jacobian.cpp:22
simulation-contact-dynamics.contact_datas
list contact_datas
Definition: simulation-contact-dynamics.py:60
algorithms.hpp
pinocchio::RigidConstraintModelTpl
Definition: algorithm/constraints/fwd.hpp:14
pinocchio::context::MatrixXs
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > MatrixXs
Definition: context/generic.hpp:49
python
pinocchio::RigidConstraintDataTpl
Definition: algorithm/constraints/fwd.hpp:16
pinocchio::getConstraintJacobian
void getConstraintJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const RigidConstraintModelTpl< Scalar, Options > &constraint_model, RigidConstraintDataTpl< Scalar, Options > &constraint_data, const Eigen::MatrixBase< Matrix6Like > &J)
Computes the kinematic Jacobian associatied to a given constraint model.
simulation-contact-dynamics.contact_model
contact_model
Definition: simulation-contact-dynamics.py:65
contact-jacobian.hpp
pinocchio::getTotalConstraintSize
struct PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility") RigidConstraintModelTpl size_t getTotalConstraintSize(const std::vector< RigidConstraintModelTpl< Scalar, Options >, Allocator > &contact_models)
Contact model structure containg all the info describing the rigid contact model.
Definition: algorithm/contact-info.hpp:810
pinocchio::getConstraintsJacobian
void getConstraintsJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const std::vector< RigidConstraintModelTpl< Scalar, Options >, ConstraintDataAllocator > &constraint_model, std::vector< RigidConstraintDataTpl< Scalar, Options >, ConstraintDataAllocator > &constraint_data, const Eigen::MatrixBase< DynamicMatrixLike > &J)
Computes the kinematic Jacobian associatied to a given set of constraint models.
pinocchio::python::PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR
typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(context::RigidConstraintModel) RigidConstraintModelVector
contact-cholesky.contact_models
list contact_models
Definition: contact-cholesky.py:22
std-vector.hpp
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::python::context::RigidConstraintModel
RigidConstraintModelTpl< Scalar, Options > RigidConstraintModel
Definition: bindings/python/context/generic.hpp:145
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:09