diff --git a/src/multibody/model.hpp b/src/multibody/model.hpp index a2377d27ff16d71aa043630d51fe02efc336f3d4..8157d6ee7b9b7900eab4d8a8ad74d8748bdcc293 100644 --- a/src/multibody/model.hpp +++ b/src/multibody/model.hpp @@ -362,9 +362,6 @@ namespace se3 typedef SE3::Vector3 Vector3; public: - /// \brief A const reference to the reference model. - const Model & model; - /// \brief Vector of se3::JointData associated to the se3::JointModel stored in model, encapsulated in JointDataAccessor. JointDataVector joints; diff --git a/src/multibody/model.hxx b/src/multibody/model.hxx index 8f95be2297f547849a32fbab69f5f7593e6332ef..eb4efeaf90979f12d4901f41e9235450d539700c 100644 --- a/src/multibody/model.hxx +++ b/src/multibody/model.hxx @@ -238,8 +238,7 @@ namespace se3 inline Data::Data (const Model & ref) - :model(ref) - ,joints(0) + :joints(0) ,a((std::size_t)ref.njoint) ,a_gf((std::size_t)ref.njoint) ,v((std::size_t)ref.njoint) @@ -275,16 +274,16 @@ namespace se3 ,lambda_c() ,sDUiJt(ref.nv,ref.nv) ,torque_residual(ref.nv) - ,dq_after(model.nv) + ,dq_after(ref.nv) ,impulse_c() { /* Create data strcture associated to the joints */ - for(Model::Index i=0;i<(Model::JointIndex)(model.njoint);++i) - joints.push_back(CreateJointData::run(model.joints[i])); + for(Model::Index i=0;i<(Model::JointIndex)(ref.njoint);++i) + joints.push_back(CreateJointData::run(ref.joints[i])); /* Init for CRBA */ M.fill(0); - for(Model::Index i=0;i<(Model::Index)(ref.njoint);++i ) { Fcrb[i].resize(6,model.nv); } + for(Model::Index i=0;i<(Model::Index)(ref.njoint);++i ) { Fcrb[i].resize(6,ref.nv); } computeLastChild(ref); /* Init for Cholesky */ @@ -299,7 +298,7 @@ namespace se3 a[0].setZero(); v[0].setZero(); - a_gf[0] = -model.gravity; + a_gf[0] = -ref.gravity; f[0].setZero(); oMi[0].setIdentity(); liMi[0].setIdentity();