Commit c67c0abc authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

add method ContactSequence::concatenateWrenchTrajectory

parent 105b42b0
......@@ -181,6 +181,9 @@ struct ContactSequencePythonVisitor : public bp::def_visitor<ContactSequencePyth
.def("concatenateZMPtrajectories", &CS::concatenateZMPtrajectories,
"Return a piecewise curve wchich is the concatenation of the m_zmp curves"
" for each contact phases in the sequence.")
.def("concatenateWrenchTrajectories", &CS::concatenateWrenchTrajectories,
"Return a piecewise curve wchich is the concatenation of the m_wrench curves"
" for each contact phases in the sequence.")
.def("concatenateQtrajectories", &CS::concatenateQtrajectories,
"Return a piecewise curve wchich is the concatenation of the m_q curves"
" for each contact phases in the sequence.")
......
......@@ -941,6 +941,19 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
return res;
}
/**
* @brief concatenateWrenchTrajectories Return a piecewise curve which is the concatenation
* of the m_wrench curves for each contact phases in the sequence.
* @return
*/
piecewise_t concatenateWrenchTrajectories() const {
piecewise_t res = piecewise_t();
for(const ContactPhase& phase : m_contact_phases){
res.add_curve_ptr(phase.m_wrench);
}
return res;
}
/**
* @brief concatenateQtrajectories Return a piecewise curve which is the concatenation
* of the m_q curves for each contact phases in the sequence.
......
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