pinocchio  3.9.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
CodeGenConstraintDynamicsDerivatives< _Scalar > Struct Template Reference
Inheritance diagram for CodeGenConstraintDynamicsDerivatives< _Scalar >:
Collaboration diagram for CodeGenConstraintDynamicsDerivatives< _Scalar >:

Public Types

typedef Base::ADConfigVectorType ADConfigVectorType
typedef Eigen::aligned_allocator< ADContactDataADConstraintDataAllocator
typedef Eigen::aligned_allocator< ADContactModelADConstraintModelAllocator
typedef pinocchio::RigidConstraintDataTpl< ADScalar, Base::Options > ADContactData
typedef std::vector< ADContactData, ADConstraintDataAllocator > ADContactDataVector
typedef pinocchio::RigidConstraintModelTpl< ADScalar, Base::Options > ADContactModel
typedef std::vector< ADContactModel, ADConstraintModelAllocator > ADContactModelVector
typedef Base::ADData ADData
typedef ADData::MatrixXs ADMatrixXs
typedef Base::ADScalar ADScalar
typedef Base::ADTangentVectorType ADTangentVectorType
typedef CodeGenBase< _Scalar > Base
typedef Eigen::aligned_allocator< ContactDataConstraintDataAllocator
typedef Eigen::aligned_allocator< ContactModelConstraintModelAllocator
typedef pinocchio::RigidConstraintDataTpl< Scalar, Base::Options > ContactData
typedef std::vector< ContactData, ConstraintDataAllocator > ContactDataVector
typedef pinocchio::RigidConstraintModelTpl< Scalar, Base::Options > ContactModel
typedef std::vector< ContactModel, ConstraintModelAllocator > ContactModelVector
typedef Base::MatrixXs MatrixXs
typedef Base::Model Model
typedef Base::Scalar Scalar
typedef Base::VectorXs VectorXs
Public Types inherited from CodeGenBase< _Scalar >
enum  { Options = 0 }
typedef ADModel::ConfigVectorType ADConfigVectorType
typedef pinocchio::DataTpl< ADScalar, Options > ADData
typedef CppAD::ADFun< CGScalar > ADFun
typedef Eigen::Matrix< ADScalar, Eigen::Dynamic, Eigen::Dynamic, Options > ADMatrixXs
typedef pinocchio::ModelTpl< ADScalar, Options > ADModel
typedef CppAD::AD< CGScalar > ADScalar
typedef ADModel::TangentVectorType ADTangentVectorType
typedef Eigen::Matrix< ADScalar, Eigen::Dynamic, 1, Options > ADVectorXs
typedef pinocchio::DataTpl< CGScalar, Options > CGData
typedef pinocchio::ModelTpl< CGScalar, Options > CGModel
typedef CppAD::cg::CG< Scalar > CGScalar
typedef Model::ConfigVectorType ConfigVectorType
typedef pinocchio::DataTpl< Scalar, Options > Data
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > MatrixXs
typedef pinocchio::ModelTpl< Scalar, Options > Model
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options|Eigen::RowMajor > RowMatrixXs
typedef _Scalar Scalar
typedef Model::TangentVectorType TangentVectorType
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > VectorXs

Public Member Functions

 CodeGenConstraintDynamicsDerivatives (const Model &model, const ContactModelVector &contact_models, const std::string &function_name="partial_constraintDynamics", const std::string &library_name="cg_partial_constraintDynamics_eval")
void buildMap ()
 build the mapping Y = f(X)
Eigen::DenseIndex constraintDim (const ContactModelVector &contact_models) const
template<typename ConfigVectorType, typename TangentVector1, typename TangentVector2>
void evalFunction (const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVector1 > &v, const Eigen::MatrixBase< TangentVector2 > &tau)
typedef PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE (ADMatrixXs) RowADMatrixXs
typedef PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE (MatrixXs) RowMatrixXs
Public Member Functions inherited from CodeGenBase< _Scalar >
 CodeGenBase (const Model &model, const Eigen::DenseIndex dim_input, const Eigen::DenseIndex dim_output, const std::string &function_name, const std::string &library_name)
CppAD::cg::ModelCSourceGen< Scalar > & codeGenerator ()
void compileAndLoadLib (const std::string &gcc_path)
void compileLib (const std::string &gcc_path="/usr/bin/gcc", const std::string &compile_options="-Ofast")
template<typename Vector>
void evalFunction (const Eigen::MatrixBase< Vector > &x)
template<typename Vector>
void evalJacobian (const Eigen::MatrixBase< Vector > &x)
bool existLib () const
Eigen::DenseIndex getInputDimension () const
 Dimension of the input vector.
Eigen::DenseIndex getOutputDimension () const
 Dimension of the output vector.
void initLib ()
void loadLib (const bool generate_if_not_exist=true, const std::string &gcc_path="/usr/bin/gcc", const std::string &compile_options="-Ofast")

Protected Attributes

ADContactDataVector ad_contact_datas
ADContactModelVector ad_contact_models
ADData ad_data
ADFun ad_fun
ADModel ad_model
ADConfigVectorType ad_q
ADTangentVectorType ad_tau
ADTangentVectorType ad_v
ADVectorXs ad_X
ADVectorXs ad_Y
MatrixXs dddq_dq
MatrixXs dddq_dtau
MatrixXs dddq_dv
MatrixXs dlambda_dq
MatrixXs dlambda_dtau
MatrixXs dlambda_dv
Eigen::DenseIndex nc
VectorXs x
VectorXs y
Protected Attributes inherited from CodeGenBase< _Scalar >
ADTangentVectorType ad_a
ADData ad_data
ADTangentVectorType ad_dq
ADFun ad_fun
ADModel ad_model
ADConfigVectorType ad_q
ADConfigVectorType ad_q_plus
ADTangentVectorType ad_v
ADVectorXs ad_X
ADVectorXs ad_Y
bool build_forward
 Options to generate or not the source code for the evaluation function.
bool build_jacobian
 Options to build or not the Jacobian of he function.
std::unique_ptr< CppAD::cg::ModelCSourceGen< Scalar > > cgen_ptr
std::unique_ptr< CppAD::cg::DynamicLib< Scalar > > dynamicLib_ptr
std::unique_ptr< CppAD::cg::DynamicModelLibraryProcessor< Scalar > > dynamicLibManager_ptr
const std::string function_name
 Name of the function.
std::unique_ptr< CppAD::cg::GenericModel< Scalar > > generatedFun_ptr
RowMatrixXs jac
std::unique_ptr< CppAD::cg::ModelLibraryCSourceGen< Scalar > > libcgen_ptr
const std::string library_name
 Name of the library.
VectorXs y

Detailed Description

template<typename _Scalar>
struct pinocchio::CodeGenConstraintDynamicsDerivatives< _Scalar >

Definition at line 689 of file code-generator-algo.hpp.

Member Typedef Documentation

◆ ADConfigVectorType

template<typename _Scalar>
typedef Base::ADConfigVectorType ADConfigVectorType

Definition at line 697 of file code-generator-algo.hpp.

◆ ADConstraintDataAllocator

template<typename _Scalar>
typedef Eigen::aligned_allocator<ADContactData> ADConstraintDataAllocator

Definition at line 714 of file code-generator-algo.hpp.

◆ ADConstraintModelAllocator

template<typename _Scalar>
typedef Eigen::aligned_allocator<ADContactModel> ADConstraintModelAllocator

Definition at line 711 of file code-generator-algo.hpp.

◆ ADContactData

template<typename _Scalar>
typedef pinocchio::RigidConstraintDataTpl<ADScalar, Base::Options> ADContactData

Definition at line 713 of file code-generator-algo.hpp.

◆ ADContactDataVector

template<typename _Scalar>
typedef std::vector<ADContactData, ADConstraintDataAllocator> ADContactDataVector

Definition at line 715 of file code-generator-algo.hpp.

◆ ADContactModel

template<typename _Scalar>
typedef pinocchio::RigidConstraintModelTpl<ADScalar, Base::Options> ADContactModel

Definition at line 710 of file code-generator-algo.hpp.

◆ ADContactModelVector

template<typename _Scalar>
typedef std::vector<ADContactModel, ADConstraintModelAllocator> ADContactModelVector

Definition at line 712 of file code-generator-algo.hpp.

◆ ADData

template<typename _Scalar>
typedef Base::ADData ADData

Definition at line 717 of file code-generator-algo.hpp.

◆ ADMatrixXs

template<typename _Scalar>
typedef ADData::MatrixXs ADMatrixXs

Definition at line 718 of file code-generator-algo.hpp.

◆ ADScalar

template<typename _Scalar>
typedef Base::ADScalar ADScalar

Definition at line 693 of file code-generator-algo.hpp.

◆ ADTangentVectorType

template<typename _Scalar>
typedef Base::ADTangentVectorType ADTangentVectorType

Definition at line 698 of file code-generator-algo.hpp.

◆ Base

template<typename _Scalar>
typedef CodeGenBase<_Scalar> Base

Definition at line 691 of file code-generator-algo.hpp.

◆ ConstraintDataAllocator

template<typename _Scalar>
typedef Eigen::aligned_allocator<ContactData> ConstraintDataAllocator

Definition at line 707 of file code-generator-algo.hpp.

◆ ConstraintModelAllocator

template<typename _Scalar>
typedef Eigen::aligned_allocator<ContactModel> ConstraintModelAllocator

Definition at line 704 of file code-generator-algo.hpp.

◆ ContactData

template<typename _Scalar>
typedef pinocchio::RigidConstraintDataTpl<Scalar, Base::Options> ContactData

Definition at line 706 of file code-generator-algo.hpp.

◆ ContactDataVector

template<typename _Scalar>
typedef std::vector<ContactData, ConstraintDataAllocator> ContactDataVector

Definition at line 708 of file code-generator-algo.hpp.

◆ ContactModel

template<typename _Scalar>
typedef pinocchio::RigidConstraintModelTpl<Scalar, Base::Options> ContactModel

Definition at line 703 of file code-generator-algo.hpp.

◆ ContactModelVector

template<typename _Scalar>
typedef std::vector<ContactModel, ConstraintModelAllocator> ContactModelVector

Definition at line 705 of file code-generator-algo.hpp.

◆ MatrixXs

template<typename _Scalar>
typedef Base::MatrixXs MatrixXs

Definition at line 699 of file code-generator-algo.hpp.

◆ Model

template<typename _Scalar>
typedef Base::Model Model

Definition at line 695 of file code-generator-algo.hpp.

◆ Scalar

template<typename _Scalar>
typedef Base::Scalar Scalar

Definition at line 692 of file code-generator-algo.hpp.

◆ VectorXs

template<typename _Scalar>
typedef Base::VectorXs VectorXs

Definition at line 701 of file code-generator-algo.hpp.

Constructor & Destructor Documentation

◆ CodeGenConstraintDynamicsDerivatives()

template<typename _Scalar>
CodeGenConstraintDynamicsDerivatives(const Model &model,
const ContactModelVector &contact_models,
const std::string &function_name = "partial_constraintDynamics",
const std::string &library_name = "cg_partial_constraintDynamics_eval" )
inline

Definition at line 734 of file code-generator-algo.hpp.

◆ ~CodeGenConstraintDynamicsDerivatives()

template<typename _Scalar>
virtual ~CodeGenConstraintDynamicsDerivatives()
inlinevirtual

Definition at line 780 of file code-generator-algo.hpp.

Member Function Documentation

◆ buildMap()

template<typename _Scalar>
void buildMap()
inlinevirtual

build the mapping Y = f(X)

Implements CodeGenBase< _Scalar >.

Definition at line 784 of file code-generator-algo.hpp.

◆ constraintDim()

template<typename _Scalar>
Eigen::DenseIndex constraintDim(const ContactModelVector &contact_models)const
inline

Definition at line 721 of file code-generator-algo.hpp.

◆ evalFunction()

template<typename _Scalar>
template<typename ConfigVectorType, typename TangentVector1, typename TangentVector2>
void evalFunction(const Eigen::MatrixBase< ConfigVectorType > &q,
const Eigen::MatrixBase< TangentVector1 > &v,
const Eigen::MatrixBase< TangentVector2 > &tau )
inline

Definition at line 820 of file code-generator-algo.hpp.

Member Data Documentation

◆ ad_contact_datas

template<typename _Scalar>
ADContactDataVector ad_contact_datas
protected

Definition at line 862 of file code-generator-algo.hpp.

◆ ad_contact_models

template<typename _Scalar>
ADContactModelVector ad_contact_models
protected

Definition at line 861 of file code-generator-algo.hpp.

◆ ad_data

template<typename _Scalar>
ADData ad_data
protected

Definition at line 182 of file code-generator-base.hpp.

◆ ad_fun

template<typename _Scalar>
ADFun ad_fun
protected

Definition at line 196 of file code-generator-base.hpp.

◆ ad_model

template<typename _Scalar>
ADModel ad_model
protected

Definition at line 181 of file code-generator-base.hpp.

◆ ad_q

template<typename _Scalar>
ADConfigVectorType ad_q
protected

Definition at line 868 of file code-generator-algo.hpp.

◆ ad_tau

template<typename _Scalar>
ADTangentVectorType ad_tau
protected

Definition at line 869 of file code-generator-algo.hpp.

◆ ad_v

template<typename _Scalar>
ADTangentVectorType ad_v
protected

Definition at line 869 of file code-generator-algo.hpp.

◆ ad_X

template<typename _Scalar>
ADVectorXs ad_X
protected

Definition at line 195 of file code-generator-base.hpp.

◆ ad_Y

template<typename _Scalar>
ADVectorXs ad_Y
protected

Definition at line 195 of file code-generator-base.hpp.

◆ dddq_dq

template<typename _Scalar>
MatrixXs dddq_dq
protected

Definition at line 865 of file code-generator-algo.hpp.

◆ dddq_dtau

template<typename _Scalar>
MatrixXs dddq_dtau
protected

Definition at line 865 of file code-generator-algo.hpp.

◆ dddq_dv

template<typename _Scalar>
MatrixXs dddq_dv
protected

Definition at line 865 of file code-generator-algo.hpp.

◆ dlambda_dq

template<typename _Scalar>
MatrixXs dlambda_dq
protected

Definition at line 866 of file code-generator-algo.hpp.

◆ dlambda_dtau

template<typename _Scalar>
MatrixXs dlambda_dtau
protected

Definition at line 866 of file code-generator-algo.hpp.

◆ dlambda_dv

template<typename _Scalar>
MatrixXs dlambda_dv
protected

Definition at line 866 of file code-generator-algo.hpp.

◆ nc

template<typename _Scalar>
Eigen::DenseIndex nc
protected

Definition at line 860 of file code-generator-algo.hpp.

◆ x

template<typename _Scalar>
VectorXs x
protected

Definition at line 864 of file code-generator-algo.hpp.

◆ y

template<typename _Scalar>
VectorXs y
protected

Definition at line 201 of file code-generator-base.hpp.


The documentation for this struct was generated from the following file: