Skip to content
Snippets Groups Projects
Commit 031e1429 authored by olivier stasse's avatar olivier stasse
Browse files

Add test stress on Herdt WPG.

This test covers more widely some functionnalities of the Herdt PG.
The results should be checked again. Some asymmetries arise and
are too important to be explained only by the constraints.
parent c3864c02
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@
/* \file This file tests A. Herdt's walking algorithm for
* automatic foot placement giving an instantaneous CoM velocity reference.
*/
#include "Debug.hh"
#include "CommonTools.hh"
#include "TestObject.hh"
......@@ -85,14 +86,23 @@ protected:
void startTurningLeft(PatternGeneratorInterface &aPGI)
{
{
istringstream strm2(":setVelReference 0.2 0.0 0.2");
istringstream strm2(":setVelReference 0.2 0.0 6.0832");
aPGI.ParseCmd(strm2);
}
}
void startTurningRight(PatternGeneratorInterface &aPGI)
{
{
istringstream strm2(":setVelReference 0.2 0.0 -0.2");
//istringstream strm2(":setVelReference 0.2 0.0 -0.2");
istringstream strm2(":setVelReference 0.2 0.0 -6.0832");
aPGI.ParseCmd(strm2);
}
}
void startTurningLeftOnSpot(PatternGeneratorInterface &aPGI)
{
{
istringstream strm2(":setVelReference 0.0 0.0 10.0");
aPGI.ParseCmd(strm2);
}
}
......@@ -100,7 +110,7 @@ protected:
void startTurningRightOnSpot(PatternGeneratorInterface &aPGI)
{
{
istringstream strm2(":setVelReference 0.0 0.0 -0.2");
istringstream strm2(":setVelReference 0.0 0.0 -10.");
aPGI.ParseCmd(strm2);
}
}
......@@ -162,22 +172,28 @@ protected:
localeventHandler_t Handler ;
};
#define localNbOfEvents 8
#define localNbOfEvents 12
struct localEvent events [localNbOfEvents] =
{ { 5*200,&TestHerdt2010::startTurningLeft},
{10*200,&TestHerdt2010::startTurningRight},
{15*200,&TestHerdt2010::startTurningRightOnSpot},
{20*200,&TestHerdt2010::stop},
{25*200,&TestHerdt2010::walkSidewards},
{30*200,&TestHerdt2010::walkForward},
{35*200,&TestHerdt2010::stop},
{40*200,&TestHerdt2010::stopOnLineWalking}};
{ { 5*200,&TestHerdt2010::walkForward},
{10*200,&TestHerdt2010::walkSidewards},
{25*200,&TestHerdt2010::startTurningRightOnSpot},
{35*200,&TestHerdt2010::walkForward},
{45*200,&TestHerdt2010::startTurningLeftOnSpot},
{55*200,&TestHerdt2010::walkForward},
{65*200,&TestHerdt2010::startTurningRightOnSpot},
{75*200,&TestHerdt2010::walkForward},
{85*200,&TestHerdt2010::startTurningLeft},
{95*200,&TestHerdt2010::startTurningRight},
{105*200,&TestHerdt2010::stop},
{110*200,&TestHerdt2010::stopOnLineWalking}};
ODEBUG3("NbOfIt: " << m_OneStep.NbOfIt);
// Test when triggering event.
for(unsigned int i=0;i<localNbOfEvents;i++)
{
if ( m_OneStep.NbOfIt==events[i].time)
{
ODEBUG3("********* GENERATE EVENT ***********");
(this->*(events[i].Handler))(*m_PGI);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment