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"
26 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
28 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
29 const DataTpl<Scalar, Options, JointCollectionTpl> & origin,
30 DataTpl<Scalar, Options, JointCollectionTpl> & dest,
41 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
49 typedef typename Model::JointIndex JointIndex;
51 PINOCCHIO_CHECK_INPUT_ARGUMENT(kinematic_level >=
POSITION);
53 for (JointIndex jid = 1; jid < (JointIndex)model.njoints; ++jid)
55 dest.oMi[jid] = origin.oMi[jid];
58 dest.v[jid] = origin.v[jid];
62 dest.a[jid] = origin.a[jid];
63 dest.a_gf[jid] = origin.a_gf[jid];
64 dest.f[jid] = origin.f[jid];
KinematicLevel
List of Kinematics Level supported by Pinocchio.
Main pinocchio namespace.
void copy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &origin, DataTpl< Scalar, Options, JointCollectionTpl > &dest, KinematicLevel kinematic_level)
Copy part of the data from origin to dest. Template parameter can be used to select at which differen...