5 #ifndef __pinocchio_copy_hpp__ 6 #define __pinocchio_copy_hpp__ 8 #include "pinocchio/multibody/model.hpp" 9 #include "pinocchio/multibody/data.hpp" 10 #include "pinocchio/algorithm/check.hpp" 25 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
27 copy(
const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
28 const DataTpl<Scalar,Options,JointCollectionTpl> & origin,
29 DataTpl<Scalar,Options,JointCollectionTpl> & dest,
40 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
48 typedef typename Model::JointIndex JointIndex;
50 for(JointIndex jid=1; jid<(JointIndex)model.
njoints; ++jid)
52 PINOCCHIO_CHECK_INPUT_ARGUMENT(LEVEL>=0);
54 dest.oMi[jid] = origin.oMi [jid];
57 dest.v[jid] = origin.v [jid];
61 dest.a[jid] = origin.a [jid];
62 dest.a_gf[jid] = origin.a_gf[jid];
63 dest.f[jid] = origin.f [jid];
72 #endif // ifndef __pinocchio_copy_hpp__
void copy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &origin, DataTpl< Scalar, Options, JointCollectionTpl > &dest, int LEVEL)
Copy part of the data from origin to dest. Template parameter can be used to select at which differen...
int njoints
Number of joints.
Main pinocchio namespace.