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,
32 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
33 PINOCCHIO_DEPRECATED
inline void 34 copy(
const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
35 const DataTpl<Scalar,Options,JointCollectionTpl> & origin,
36 DataTpl<Scalar,Options,JointCollectionTpl> & dest,
39 copy(model,origin,dest,static_cast<KinematicLevel>(kinematic_level));
50 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
58 typedef typename Model::JointIndex JointIndex;
60 PINOCCHIO_CHECK_INPUT_ARGUMENT(kinematic_level>=
POSITION);
62 for(JointIndex jid=1; jid<(JointIndex)model.
njoints; ++jid)
64 dest.oMi[jid] = origin.oMi [jid];
67 dest.v[jid] = origin.v [jid];
71 dest.a[jid] = origin.a [jid];
72 dest.a_gf[jid] = origin.a_gf[jid];
73 dest.f[jid] = origin.f [jid];
82 #endif // ifndef __pinocchio_copy_hpp__ 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...
KinematicLevel
List of Kinematics Level supported by Pinocchio.
Refers to the quantities related to the 2nd-order kinematics (joint accelerations, center of mass acceleration, etc.).
int njoints
Number of joints.
Refers to the quantities related to the 0-order kinematics (joint placements, center of mass position...
Main pinocchio namespace.
Refers to the quantities related to the 1st-order kinematics (joint velocities, center of mass veloci...