Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrl-walkgen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Guilhem Saurel
jrl-walkgen
Commits
ee3e6e21
Commit
ee3e6e21
authored
14 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Change output of test results"
This reverts commit
2bf22e71
.
parent
80d0ecad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/TestHerdt2010.cpp
+12
-13
12 additions, 13 deletions
tests/TestHerdt2010.cpp
tests/TestObject.cpp
+38
-42
38 additions, 42 deletions
tests/TestObject.cpp
with
50 additions
and
55 deletions
tests/TestHerdt2010.cpp
+
12
−
13
View file @
ee3e6e21
...
...
@@ -46,20 +46,20 @@ public:
{
m_TestProfile
=
TestProfile
;
};
protected
:
void
startOnLineWalking
(
PatternGeneratorInterface
&
aPGI
)
{
CommonInitialization
(
aPGI
);
{
istringstream
strm2
(
":SetAlgoForZmpTrajectory Herdt"
);
aPGI
.
ParseCmd
(
strm2
);
}
{
istringstream
strm2
(
":singlesupporttime 0.7"
);
...
...
@@ -85,7 +85,7 @@ protected:
void
chooseTestProfile
()
{
switch
(
m_TestProfile
)
{
...
...
@@ -97,7 +97,7 @@ protected:
break
;
}
}
void
generateEvent
()
{
unsigned
int
StoppingTime
=
11
*
200
;
...
...
@@ -112,11 +112,10 @@ protected:
int
PerformTests
(
int
argc
,
char
*
argv
[])
{
const
unsigned
int
NbTests
=
1
;
std
::
string
TestNames
[
NbTests
]
=
{
"TestHerdt2010OnLine"
};
int
TestProfiles
[
NbTests
]
=
{
PROFIL_HERDT_ONLINE_WALKING
};
std
::
string
TestNames
[
1
]
=
{
"TestHerdt2010OnLine"
};
int
TestProfiles
[
1
]
=
{
PROFIL_HERDT_ONLINE_WALKING
};
for
(
unsigned
int
i
=
0
;
i
<
NbTests
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
1
;
i
++
)
{
TestHerdt2010
aTH2010
(
argc
,
argv
,
TestNames
[
i
],
...
...
@@ -125,11 +124,11 @@ int PerformTests(int argc, char *argv[])
{
if
(
!
aTH2010
.
doTest
(
std
::
cout
))
{
cout
<<
"
Test nb. "
<<
i
+
1
<<
" (of "
<<
NbTests
<<
" test(s)) failed!!!"
<<
endl
;
cout
<<
"
Failed test "
<<
i
<<
endl
;
return
-
1
;
}
else
cout
<<
"
Test nb. "
<<
i
+
1
<<
" (of "
<<
NbTests
<<
" test(s)) passed."
<<
endl
;
cout
<<
"
Passed test "
<<
i
<<
endl
;
}
catch
(
const
char
*
astr
)
{
cerr
<<
"Failed on following error "
<<
astr
<<
std
::
endl
;
...
...
This diff is collapsed.
Click to expand it.
tests/TestObject.cpp
+
38
−
42
View file @
ee3e6e21
...
...
@@ -46,8 +46,8 @@ namespace PatternGeneratorJRL
double
filterprecision
(
double
adb
)
{
if
(
fabs
(
adb
)
<
1e-7
)
return
0.0
;
return
0.0
;
double
ladb2
=
adb
*
1e7
;
double
lintadb2
=
trunc
(
ladb2
);
return
lintadb2
/
1e7
;
...
...
@@ -55,8 +55,8 @@ namespace PatternGeneratorJRL
TestObject
::
TestObject
(
int
argc
,
char
*
argv
[],
string
&
aTestName
,
int
lPGIInterface
)
string
&
aTestName
,
int
lPGIInterface
)
{
m_TestName
=
aTestName
;
m_PGIInterface
=
lPGIInterface
;
...
...
@@ -81,28 +81,28 @@ namespace PatternGeneratorJRL
/*! Extract options and fill in members. */
getOptions
(
argc
,
argv
,
VRMLPath
,
VRMLFileName
,
SpecificitiesFileName
,
LinkJointRank
,
InitConfig
,
m_TestProfile
);
VRMLPath
,
VRMLFileName
,
SpecificitiesFileName
,
LinkJointRank
,
InitConfig
,
m_TestProfile
);
// Instanciate and initialize.
string
RobotFileName
=
VRMLPath
+
VRMLFileName
;
bool
fileExist
=
false
;
{
std
::
ifstream
file
(
RobotFileName
.
c_str
());
fileExist
=
!
file
.
fail
();
std
::
ifstream
file
(
RobotFileName
.
c_str
());
fileExist
=
!
file
.
fail
();
}
if
(
!
fileExist
)
throw
std
::
string
(
"failed to open robot model"
);
throw
std
::
string
(
"failed to open robot model"
);
CreateAndInitializeHumanoidRobot
(
RobotFileName
,
SpecificitiesFileName
,
LinkJointRank
,
InitConfig
,
SpecificitiesFileName
,
LinkJointRank
,
InitConfig
,
m_HDR
,
m_DebugHDR
,
m_PGI
);
// Specify the walking mode: here the default one.
...
...
@@ -123,13 +123,13 @@ namespace PatternGeneratorJRL
{
if
(
m_HDR
!=
0
)
delete
m_HDR
;
delete
m_HDR
;
if
(
m_DebugHDR
!=
0
)
delete
m_DebugHDR
;
delete
m_DebugHDR
;
if
(
m_PGI
!=
0
)
delete
m_PGI
;
delete
m_PGI
;
}
...
...
@@ -137,23 +137,23 @@ namespace PatternGeneratorJRL
{
if
(
m_DebugZMP2
)
{
{
ofstream
aofzmpmb2
;
string
aFileName
=
m_TestName
;
aFileName
+=
"ZMPMBSTAGE2.dat"
;
aofzmpmb2
.
open
(
aFileName
.
c_str
(),
ofstream
::
out
);
}
}
if
(
m_DebugFGPI
)
{
{
ofstream
aof
;
string
aFileName
=
m_TestName
;
aFileName
+=
"TestFGPI_description.dat"
;
aof
.
open
(
aFileName
.
c_str
(),
ofstream
::
out
);
string
Titles
[
26
]
=
{
"Time"
,
{
"Time"
,
"Com X"
,
"Com Y"
,
"Com Z"
,
...
...
@@ -188,13 +188,13 @@ namespace PatternGeneratorJRL
aFileName
+=
"TestFGPI.dat"
;
aof
.
open
(
aFileName
.
c_str
(),
ofstream
::
out
);
aof
.
close
();
}
}
}
void
TestObject
::
fillInDebugFiles
(
)
{
if
(
m_DebugFGPI
)
{
{
ofstream
aof
;
string
aFileName
;
aFileName
=
m_TestName
;
...
...
@@ -225,16 +225,16 @@ namespace PatternGeneratorJRL
<<
filterprecision
(
m_OneStep
.
RightFootPosition
.
omega
)
<<
" "
<<
filterprecision
(
m_OneStep
.
RightFootPosition
.
omega2
)
<<
" "
<<
filterprecision
(
m_OneStep
.
ZMPTarget
(
0
)
*
cos
(
m_CurrentConfiguration
(
5
))
-
m_OneStep
.
ZMPTarget
(
1
)
*
sin
(
m_CurrentConfiguration
(
5
))
+
m_CurrentConfiguration
(
0
)
)
<<
" "
m_OneStep
.
ZMPTarget
(
1
)
*
sin
(
m_CurrentConfiguration
(
5
))
+
m_CurrentConfiguration
(
0
)
)
<<
" "
<<
filterprecision
(
m_OneStep
.
ZMPTarget
(
0
)
*
sin
(
m_CurrentConfiguration
(
5
))
+
m_OneStep
.
ZMPTarget
(
1
)
*
cos
(
m_CurrentConfiguration
(
5
))
+
m_CurrentConfiguration
(
1
)
)
<<
" "
m_OneStep
.
ZMPTarget
(
1
)
*
cos
(
m_CurrentConfiguration
(
5
))
+
m_CurrentConfiguration
(
1
)
)
<<
" "
<<
filterprecision
(
m_CurrentConfiguration
(
0
)
)
<<
" "
<<
filterprecision
(
m_CurrentConfiguration
(
1
)
)
<<
" "
<<
endl
;
aof
.
close
();
}
}
}
...
...
@@ -242,7 +242,7 @@ namespace PatternGeneratorJRL
{
bool
SameFile
=
false
;
if
(
m_DebugFGPI
)
{
{
SameFile
=
true
;
ifstream
alif
;
string
aFileName
;
...
...
@@ -270,18 +270,14 @@ namespace PatternGeneratorJRL
for
(
unsigned
int
i
=
0
;
i
<
70
;
i
++
)
{
if
(
fabs
(
LocalInput
[
i
]
-
ReferenceInput
[
i
])
>=
1e-5
)
{
cout
<<
"... failed with: "
<<
"LocalInput["
<<
i
<<
"]: "
<<
LocalInput
[
i
]
<<
" ReferenceInput["
<<
i
<<
"]: "
<<
ReferenceInput
[
i
]
<<
endl
;
return
false
;
}
ReferenceInput
[
i
])
>=
1e-6
)
return
false
;
}
}
alif
.
close
();
arif
.
close
();
}
}
return
SameFile
;
}
...
...
@@ -295,9 +291,9 @@ namespace PatternGeneratorJRL
prepareDebugFiles
();
for
(
unsigned
int
lNbIt
=
0
;
lNbIt
<
m_OuterLoopNbItMax
;
lNbIt
++
)
{
{
os
<<
"<===============================================================>"
<<
endl
;
os
<<
"
Test i
teration nb: "
<<
lNbIt
+
1
<<
endl
;
os
<<
"
I
teration nb: "
<<
lNbIt
<<
endl
;
m_clock
.
startPlanning
();
...
...
@@ -360,9 +356,9 @@ namespace PatternGeneratorJRL
}
os
<<
endl
<<
"End of
test
iteration "
<<
lNbIt
+
1
<<
endl
;
os
<<
endl
<<
"End of iteration "
<<
lNbIt
<<
endl
;
os
<<
"<===============================================================>"
<<
endl
;
}
}
string
lProfileOutput
=
m_TestName
;
lProfileOutput
+=
"TimeProfile.dat"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment