Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
test-hpp
Commits
ec1750f6
Commit
ec1750f6
authored
May 15, 2015
by
Florent Lamiraux
Browse files
Fix compilation warnings in 64bit.
parent
d8b94049
Changes
4
Show whitespace changes
Inline
Side-by-side
tests/interbody-distance-time-of-computation.cc.in
View file @
ec1750f6
...
@@ -51,8 +51,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_time_of_computation)
...
@@ -51,8 +51,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_time_of_computation)
using hpp::model::Device;
using hpp::model::Device;
using hpp::model::Joint;
using hpp::model::Joint;
using hpp::model::Body;
using hpp::model::Body;
typedef hpp::model::ObjectVector_t ObjectVector_t;
typedef hpp::model::JointVector_t JointVector_t;
typedef std::vector<double> vector_t;
typedef std::vector<double> vector_t;
std::ifstream fileConfig;
std::ifstream fileConfig;
vector_t::size_type configSize;
vector_t::size_type configSize;
...
@@ -99,7 +97,8 @@ BOOST_AUTO_TEST_CASE (interbody_distances_time_of_computation)
...
@@ -99,7 +97,8 @@ BOOST_AUTO_TEST_CASE (interbody_distances_time_of_computation)
humanoidRobot->computeDistances ();
humanoidRobot->computeDistances ();
}
}
gettimeofday (&t1, NULL);
gettimeofday (&t1, NULL);
double t = (t1.tv_sec - t0.tv_sec) + 1e-6*(t1.tv_usec - t0.tv_usec + 0.);
double t = (double)(t1.tv_sec - t0.tv_sec) +
1e-6*(double)(t1.tv_usec - t0.tv_usec);
std::cout << "Time for 1000 self-collision tests in seconds: "
std::cout << "Time for 1000 self-collision tests in seconds: "
<< t << std::endl;
<< t << std::endl;
}
}
...
...
tests/interbody-distances-capsule.cc.in
View file @
ec1750f6
...
@@ -182,8 +182,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_capsule)
...
@@ -182,8 +182,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_capsule)
using hpp::model::Device;
using hpp::model::Device;
using hpp::model::Joint;
using hpp::model::Joint;
using hpp::model::Body;
using hpp::model::Body;
typedef hpp::model::ObjectVector_t ObjectVector_t;
typedef hpp::model::JointVector_t JointVector_t;
typedef std::vector<double> vector_t;
typedef std::vector<double> vector_t;
std::ifstream fileConfig;
std::ifstream fileConfig;
std::ofstream fileHrp2;
std::ofstream fileHrp2;
...
...
tests/interbody-distances-mesh.cc.in
View file @
ec1750f6
...
@@ -109,8 +109,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_mesh)
...
@@ -109,8 +109,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_mesh)
using hpp::model::Device;
using hpp::model::Device;
using hpp::model::Joint;
using hpp::model::Joint;
using hpp::model::Body;
using hpp::model::Body;
typedef hpp::model::ObjectVector_t ObjectVector_t;
typedef hpp::model::JointVector_t JointVector_t;
typedef std::vector<double> vector_t;
typedef std::vector<double> vector_t;
std::ifstream fileConfig;
std::ifstream fileConfig;
std::ofstream fileHrp2;
std::ofstream fileHrp2;
...
@@ -179,13 +177,13 @@ BOOST_AUTO_TEST_CASE (interbody_distances_mesh)
...
@@ -179,13 +177,13 @@ BOOST_AUTO_TEST_CASE (interbody_distances_mesh)
<< it->fcl.nearest_points [1][1] << ",\t"
<< it->fcl.nearest_points [1][1] << ",\t"
<< it->fcl.nearest_points [1][2] << ",\t");
<< it->fcl.nearest_points [1][2] << ",\t");
std::pair <std::string, std::string> key (body1, body2);
std::pair <std::string, std::string> key (body1, body2);
InterDistances_t::iterator it = interDistances.find (key);
InterDistances_t::iterator it
Inter
= interDistances.find (key);
// Check that pair of bodies is in map
// Check that pair of bodies is in map
if (it == interDistances.end ()) {
if (it
Inter
== interDistances.end ()) {
throw std::runtime_error ("pair (" + body1 + "," + body2 +
throw std::runtime_error ("pair (" + body1 + "," + body2 +
") is not in " + filename);
") is not in " + filename);
}
}
Distance_t distanceFile = it->second;
Distance_t distanceFile = it
Inter
->second;
hppDout (info, "Checking pair " << body1 << ", " << body2);
hppDout (info, "Checking pair " << body1 << ", " << body2);
distance.checkClose (distanceFile);
distance.checkClose (distanceFile);
}
}
...
...
tests/projection.cc
View file @
ec1750f6
...
@@ -485,7 +485,7 @@ namespace svd {
...
@@ -485,7 +485,7 @@ namespace svd {
}
}
}
}
unsigned
in
t
project
(
SVDTest
*
cp
,
ResultVector
&
results
)
size_
t
project
(
SVDTest
*
cp
,
ResultVector
&
results
)
{
{
MESSAGE_INF
(
"Start "
<<
results
.
size
()
<<
" projections..."
);
MESSAGE_INF
(
"Start "
<<
results
.
size
()
<<
" projections..."
);
size_t
failCount
=
0
;
size_t
failCount
=
0
;
...
@@ -518,7 +518,7 @@ namespace svd {
...
@@ -518,7 +518,7 @@ namespace svd {
shootConfig
(
results
,
&
bcs
);
shootConfig
(
results
,
&
bcs
);
for
(
size_t
i
=
0
;
i
<
cp
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
cp
.
size
();
i
++
)
{
unsigned
in
t
f
=
project
(
cp
[
i
],
results
);
std
::
size_
t
f
=
project
(
cp
[
i
],
results
);
if
(
f
>
0
)
{
if
(
f
>
0
)
{
MESSAGE_ERR
(
"----------------------------------------------------------"
);
MESSAGE_ERR
(
"----------------------------------------------------------"
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment