Commit 9a0216d6 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

ContactSequence::have{COM, AM, ZMP}trajectories now check the dimension of the curves

parent 82adf61b
......@@ -415,6 +415,18 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
std::cout << "CoM acceleration trajectory not defined for phase : " << i << std::endl;
return false;
}
if(phase.m_c->dim() != 3){
std::cout<<"CoM trajectory is not of dimension 3 for phase : " << i << std::endl;
return false;
}
if(phase.m_dc->dim() != 3){
std::cout<<"CoM velocity trajectory is not of dimension 3 for phase : " << i << std::endl;
return false;
}
if(phase.m_ddc->dim() != 3){
std::cout<<"CoM acceleration trajectory is not of dimension 3 for phase : " << i << std::endl;
return false;
}
if (phase.m_c->min() != phase.timeInitial()) {
std::cout << "CoM trajectory do not start at t_init for phase : " << i << std::endl;
return false;
......@@ -508,6 +520,14 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
std::cout << "AM velocity trajectory not defined for phase : " << i << std::endl;
return false;
}
if(phase.m_L->dim() != 3){
std::cout<<"AM trajectory is not of dimension 3 for phase : " << i << std::endl;
return false;
}
if(phase.m_dL->dim() != 3){
std::cout<<"AM derivative trajectory is not of dimension 3 for phase : " << i << std::endl;
return false;
}
if (phase.m_L->min() != phase.timeInitial()) {
std::cout << "AM trajectory do not start at t_init for phase : " << i << std::endl;
return false;
......@@ -829,6 +849,10 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
std::cout << "ZMP trajectory not defined for phase : " << i << std::endl;
return false;
}
if(phase.m_zmp->dim() != 3){
std::cout<<"ZMP trajectory is not of dimension 3 for phase : " << i << std::endl;
return false;
}
if (phase.m_zmp->min() != phase.timeInitial()) {
std::cout << "ZMP trajectory do not start at t_init for phase : " << i << std::endl;
return false;
......
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