Go to the documentation of this file.
23 int main(
int argc,
const char ** argv)
25 using namespace Eigen;
30 const int NBT = 1000 * 100;
33 std::cout <<
"(the time score in debug mode is not relevant) " << std::endl;
46 const std::string ff_option = argv[2];
47 if (ff_option ==
"-no-ff")
59 const std::string RA =
"RARM_LINK6";
60 const std::string LA =
"LARM_LINK6";
61 const std::string RF =
"RLEG_LINK6";
62 const std::string LF =
"LLEG_LINK6";
79 contact_models_6D.push_back(ci_RF_6D);
85 contact_models_6D6D.push_back(ci_RF_6D);
86 contact_models_6D6D.push_back(ci_LF_6D);
96 std::cout <<
"nq = " <<
model.nq << std::endl;
97 std::cout <<
"nv = " <<
model.nv << std::endl;
98 std::cout <<
"--" << std::endl;
101 VectorXd qmax = Eigen::VectorXd::Ones(
model.nq);
110 for (
size_t i = 0;
i < NBT; ++
i)
113 qdots[
i] = Eigen::VectorXd::Random(
model.nv);
114 qddots[
i] = Eigen::VectorXd::Random(
model.nv);
116 Eigen::ArrayXd r_coeffs = (Eigen::ArrayXd::Random(NBT) + 1.) / 2.;
123 model,
data,
qs[_smooth], qdots[_smooth], contact_models_empty, contact_data_empty,
126 std::cout <<
"impulseDynamics {} = \t\t";
127 timer.
toc(std::cout, NBT);
134 model,
data,
qs[_smooth], qdots[_smooth], contact_models_6D, contact_data_6D,
137 std::cout <<
"impulseDynamics {6D} = \t\t";
138 timer.
toc(std::cout, NBT);
145 model,
data,
qs[_smooth], qdots[_smooth], contact_models_6D6D, contact_data_6D6D,
148 std::cout <<
"impulseDynamics {6D,6D} = \t\t";
149 timer.
toc(std::cout, NBT);
151 Eigen::MatrixXd
J(Eigen::MatrixXd::Zero(12,
model.nv));
160 std::cout <<
"constrained impulseDynamics {6D,6D} = \t\t";
161 timer.
toc(std::cout, NBT);
163 std::cout <<
"--" << std::endl;
RigidConstraintDataTpl< context::Scalar, context::Options > RigidConstraintData
ContactCholeskyDecompositionTpl< context::Scalar, context::Options > ContactCholeskyDecomposition
void getFrameJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex joint_id, const SE3Tpl< Scalar, Options > &placement, const ReferenceFrame reference_frame, const Eigen::MatrixBase< Matrix6xLike > &J)
Returns the jacobian of the frame given by its relative placement w.r.t. a joint frame,...
void humanoidRandom(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a humanoid kinematic tree with 6-DOF limbs and random joint placements.
JointModelFreeFlyerTpl< Scalar > JointModelFreeFlyer
const DataTpl< Scalar, Options, JointCollectionTpl >::MatrixXs & crba(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Convention convention=Convention::LOCAL)
Computes the upper triangular part of the joint space inertia matrix M by using the Composite Rigid B...
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
@ CONTACT_6D
Point contact model.
PINOCCHIO_COMPILER_DIAGNOSTIC_POP typedef std::size_t Index
int main(int argc, const char **argv)
Structure containing all the settings parameters for the proximal algorithms.
void initConstraintDynamics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const std::vector< RigidConstraintModelTpl< Scalar, Options >, Allocator > &contact_models)
Init the forward dynamics data according to the contact information contained in contact_models.
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel(const std::string &filename, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, const std::string &rootJointName, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
Build the model from a URDF file with a particular joint as root of the model tree inside the model g...
#define PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(T)
const PINOCCHIO_DEPRECATED DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & impulseDynamics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v_before, const Eigen::MatrixBase< ConstraintMatrixType > &J, const Scalar r_coeff=0., const Scalar inv_damping=0.)
Compute the impulse dynamics with contact constraints. Internally, pinocchio::crba is called.
Main pinocchio namespace.
#define PINOCCHIO_MODEL_DIR
pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:12