Commit 5f3a5388 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

[Minor] Rename ref into model in Data constructor

parent 0042976e
......@@ -237,58 +237,58 @@ namespace se3
}
inline Data::Data (const Model & ref)
inline Data::Data (const Model & model)
:joints(0)
,a((std::size_t)ref.njoint)
,a_gf((std::size_t)ref.njoint)
,v((std::size_t)ref.njoint)
,f((std::size_t)ref.njoint)
,oMi((std::size_t)ref.njoint)
,liMi((std::size_t)ref.njoint)
,tau(ref.nv)
,nle(ref.nv)
,oMf((std::size_t)ref.nFrames)
,Ycrb((std::size_t)ref.njoint)
,M(ref.nv,ref.nv)
,ddq(ref.nv)
,Yaba((std::size_t)ref.njoint)
,u(ref.nv)
,Ag(6,ref.nv)
,Fcrb((std::size_t)ref.njoint)
,lastChild((std::size_t)ref.njoint)
,nvSubtree((std::size_t)ref.njoint)
,U(ref.nv,ref.nv)
,D(ref.nv)
,tmp(ref.nv)
,parents_fromRow((std::size_t)ref.nv)
,nvSubtree_fromRow((std::size_t)ref.nv)
,J(6,ref.nv)
,iMf((std::size_t)ref.njoint)
,com((std::size_t)ref.njoint)
,vcom((std::size_t)ref.njoint)
,acom((std::size_t)ref.njoint)
,mass((std::size_t)ref.njoint)
,Jcom(3,ref.nv)
,a((std::size_t)model.njoint)
,a_gf((std::size_t)model.njoint)
,v((std::size_t)model.njoint)
,f((std::size_t)model.njoint)
,oMi((std::size_t)model.njoint)
,liMi((std::size_t)model.njoint)
,tau(model.nv)
,nle(model.nv)
,oMf((std::size_t)model.nFrames)
,Ycrb((std::size_t)model.njoint)
,M(model.nv,model.nv)
,ddq(model.nv)
,Yaba((std::size_t)model.njoint)
,u(model.nv)
,Ag(6,model.nv)
,Fcrb((std::size_t)model.njoint)
,lastChild((std::size_t)model.njoint)
,nvSubtree((std::size_t)model.njoint)
,U(model.nv,model.nv)
,D(model.nv)
,tmp(model.nv)
,parents_fromRow((std::size_t)model.nv)
,nvSubtree_fromRow((std::size_t)model.nv)
,J(6,model.nv)
,iMf((std::size_t)model.njoint)
,com((std::size_t)model.njoint)
,vcom((std::size_t)model.njoint)
,acom((std::size_t)model.njoint)
,mass((std::size_t)model.njoint)
,Jcom(3,model.nv)
,JMinvJt()
,llt_JMinvJt()
,lambda_c()
,sDUiJt(ref.nv,ref.nv)
,torque_residual(ref.nv)
,dq_after(ref.nv)
,sDUiJt(model.nv,model.nv)
,torque_residual(model.nv)
,dq_after(model.nv)
,impulse_c()
{
/* Create data strcture associated to the joints */
for(Model::Index i=0;i<(Model::JointIndex)(ref.njoint);++i)
joints.push_back(CreateJointData::run(ref.joints[i]));
for(Model::Index i=0;i<(Model::JointIndex)(model.njoint);++i)
joints.push_back(CreateJointData::run(model.joints[i]));
/* Init for CRBA */
M.fill(0);
for(Model::Index i=0;i<(Model::Index)(ref.njoint);++i ) { Fcrb[i].resize(6,ref.nv); }
computeLastChild(ref);
for(Model::Index i=0;i<(Model::Index)(model.njoint);++i ) { Fcrb[i].resize(6,model.nv); }
computeLastChild(model);
/* Init for Cholesky */
U.setIdentity();
computeParents_fromRow(ref);
computeParents_fromRow(model);
/* Init Jacobian */
J.setZero();
......@@ -298,7 +298,7 @@ namespace se3
a[0].setZero();
v[0].setZero();
a_gf[0] = -ref.gravity;
a_gf[0] = -model.gravity;
f[0].setZero();
oMi[0].setIdentity();
liMi[0].setIdentity();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment