Commit 5d545a0f authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[tests] Add Phase during dumping the files.

parent 377d8ebf
......@@ -404,4 +404,24 @@ void DumpReferencesObjects::fillInTestsFormat2(
fillFileWithSubsamplingAndClose(aSetOfFillingFileArgs, vec_db,
m_prevTorquesF2);
// Store the phase.
prefix = aTestName + "Phase";
prepareFile(aof, prefix, anOneStep);
vec_db.resize(3);
vec_db[0] = 0;
if (anOneStep.m_LeftFootPosition.stepType==-1)
vec_db[0] = 1.0;
else if (anOneStep.m_RightFootPosition.stepType==-1)
vec_db[0] =-1.0;
vec_db[1] = 0;
vec_db[2] = 0;
if (m_prevPhase.size()!=3)
m_prevPhase.resize(3);
aof.unsetf(std::ios::floatfield );
aof.precision(1);
fillFileWithSubsamplingAndClose(aSetOfFillingFileArgs, vec_db,
m_prevPhase);
}
......@@ -68,7 +68,7 @@ public:
m_prevRightAnkledOrientation, m_prevRightAnkleddOrientation;
std::vector<double> m_prevZMPlocal, m_prevZMPlocalF2, m_prevZMPRef,
m_prevTorquesF2;
m_prevTorquesF2, m_prevPhase;
Eigen::Vector3d m_AnklePositionRight, m_AnklePositionLeft;
/// Add time or not in the dump file
......
Markdown is supported
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