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
Stack Of Tasks
tsid
Commits
849fbd67
Commit
849fbd67
authored
Jun 15, 2017
by
jcarpent
Browse files
[All] Uniformize naming
parent
a6ec3039
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/tsid/math/utils.hpp
View file @
849fbd67
...
...
@@ -137,7 +137,7 @@ namespace tsid
int
&
rows
,
int
&
cols
);
template
<
typename
Derived
>
inline
bool
is
_f
inite
(
const
Eigen
::
MatrixBase
<
Derived
>&
x
)
inline
bool
is
F
inite
(
const
Eigen
::
MatrixBase
<
Derived
>&
x
)
{
return
(
(
x
-
x
).
array
()
==
(
x
-
x
).
array
()).
all
();
}
...
...
unittest/contacts.cpp
View file @
849fbd67
...
...
@@ -34,7 +34,7 @@ using namespace std;
BOOST_AUTO_TEST_SUITE
(
BOOST_TEST_MODULE
)
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
_f
inite(A), #A<<": "<<A)
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
F
inite(A), #A<<": "<<A)
const
string
romeo_model_path
=
TSID_SOURCE_DIR
"/models/romeo"
;
...
...
unittest/hqp_solvers.cpp
View file @
849fbd67
...
...
@@ -31,7 +31,7 @@
#include
<tsid/utils/statistics.hpp>
#define CHECK_LESS_THAN(A,B) BOOST_CHECK_MESSAGE(A<B, #A<<": "<<A<<">"<<B)
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
_f
inite(A), #A<<": "<<A)
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
F
inite(A), #A<<": "<<A)
BOOST_AUTO_TEST_SUITE
(
BOOST_TEST_MODULE
)
...
...
unittest/tasks.cpp
View file @
849fbd67
...
...
@@ -43,7 +43,7 @@ using namespace std;
using
namespace
Eigen
;
using
namespace
tsid
::
robots
;
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
_f
inite(A), #A<<": "<<A)
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
F
inite(A), #A<<": "<<A)
const
string
romeo_model_path
=
TSID_SOURCE_DIR
"/models/romeo"
;
...
...
@@ -95,13 +95,13 @@ BOOST_AUTO_TEST_CASE ( test_task_se3_equality )
BOOST_CHECK
(
constraint
.
rows
()
==
6
);
BOOST_CHECK
(
constraint
.
cols
()
==
robot
.
nv
());
REQUIRE_FINITE
(
constraint
.
matrix
());
BOOST_REQUIRE
(
is
_f
inite
(
constraint
.
vector
()));
BOOST_REQUIRE
(
is
F
inite
(
constraint
.
vector
()));
pseudoInverse
(
constraint
.
matrix
(),
Jpinv
,
1e-4
);
Vector
dv
=
Jpinv
*
constraint
.
vector
();
BOOST_REQUIRE
(
is
_f
inite
(
Jpinv
));
BOOST_REQUIRE
(
is
F
inite
(
Jpinv
));
BOOST_CHECK
(
MatrixXd
::
Identity
(
6
,
6
).
isApprox
(
constraint
.
matrix
()
*
Jpinv
));
if
(
!
is
_f
inite
(
dv
))
if
(
!
is
F
inite
(
dv
))
{
cout
<<
"Jpinv"
<<
Jpinv
.
transpose
()
<<
endl
;
cout
<<
"b"
<<
constraint
.
vector
().
transpose
()
<<
endl
;
...
...
@@ -110,12 +110,12 @@ BOOST_AUTO_TEST_CASE ( test_task_se3_equality )
v
+=
dt
*
dv
;
q
=
se3
::
integrate
(
robot
.
model
(),
q
,
dt
*
v
);
BOOST_REQUIRE
(
is
_f
inite
(
v
));
BOOST_REQUIRE
(
is
_f
inite
(
q
));
BOOST_REQUIRE
(
is
F
inite
(
v
));
BOOST_REQUIRE
(
is
F
inite
(
q
));
t
+=
dt
;
error
=
task
.
position_error
().
norm
();
BOOST_REQUIRE
(
is
_f
inite
(
task
.
position_error
()));
BOOST_REQUIRE
(
is
F
inite
(
task
.
position_error
()));
BOOST_CHECK
(
error
<=
error_past
);
error_past
=
error
;
...
...
@@ -173,23 +173,23 @@ BOOST_AUTO_TEST_CASE ( test_task_com_equality )
const
ConstraintBase
&
constraint
=
task
.
compute
(
t
,
q
,
v
,
data
);
BOOST_CHECK
(
constraint
.
rows
()
==
3
);
BOOST_CHECK
(
constraint
.
cols
()
==
robot
.
nv
());
BOOST_REQUIRE
(
is
_f
inite
(
constraint
.
matrix
()));
BOOST_REQUIRE
(
is
_f
inite
(
constraint
.
vector
()));
BOOST_REQUIRE
(
is
F
inite
(
constraint
.
matrix
()));
BOOST_REQUIRE
(
is
F
inite
(
constraint
.
vector
()));
pseudoInverse
(
constraint
.
matrix
(),
Jpinv
,
1e-5
);
Vector
dv
=
Jpinv
*
constraint
.
vector
();
BOOST_REQUIRE
(
is
_f
inite
(
Jpinv
));
BOOST_REQUIRE
(
is
F
inite
(
Jpinv
));
BOOST_CHECK
(
MatrixXd
::
Identity
(
constraint
.
rows
(),
constraint
.
rows
()).
isApprox
(
constraint
.
matrix
()
*
Jpinv
));
BOOST_REQUIRE
(
is
_f
inite
(
dv
));
BOOST_REQUIRE
(
is
F
inite
(
dv
));
v
+=
dt
*
dv
;
q
=
se3
::
integrate
(
robot
.
model
(),
q
,
dt
*
v
);
BOOST_REQUIRE
(
is
_f
inite
(
v
));
BOOST_REQUIRE
(
is
_f
inite
(
q
));
BOOST_REQUIRE
(
is
F
inite
(
v
));
BOOST_REQUIRE
(
is
F
inite
(
q
));
t
+=
dt
;
error
=
task
.
position_error
().
norm
();
BOOST_REQUIRE
(
is
_f
inite
(
task
.
position_error
()));
BOOST_REQUIRE
(
is
F
inite
(
task
.
position_error
()));
BOOST_CHECK
((
error
-
error_past
)
<=
1e-4
);
error_past
=
error
;
...
...
@@ -245,23 +245,23 @@ BOOST_AUTO_TEST_CASE ( test_task_joint_posture )
const
ConstraintBase
&
constraint
=
task
.
compute
(
t
,
q
,
v
,
data
);
BOOST_CHECK
(
constraint
.
rows
()
==
na
);
BOOST_CHECK
(
constraint
.
cols
()
==
robot
.
nv
());
BOOST_REQUIRE
(
is
_f
inite
(
constraint
.
matrix
()));
BOOST_REQUIRE
(
is
_f
inite
(
constraint
.
vector
()));
BOOST_REQUIRE
(
is
F
inite
(
constraint
.
matrix
()));
BOOST_REQUIRE
(
is
F
inite
(
constraint
.
vector
()));
pseudoInverse
(
constraint
.
matrix
(),
Jpinv
,
1e-5
);
Vector
dv
=
Jpinv
*
constraint
.
vector
();
BOOST_REQUIRE
(
is
_f
inite
(
Jpinv
));
BOOST_REQUIRE
(
is
F
inite
(
Jpinv
));
BOOST_CHECK
(
MatrixXd
::
Identity
(
na
,
na
).
isApprox
(
constraint
.
matrix
()
*
Jpinv
));
BOOST_REQUIRE
(
is
_f
inite
(
dv
));
BOOST_REQUIRE
(
is
F
inite
(
dv
));
v
+=
dt
*
dv
;
q
=
se3
::
integrate
(
robot
.
model
(),
q
,
dt
*
v
);
BOOST_REQUIRE
(
is
_f
inite
(
v
));
BOOST_REQUIRE
(
is
_f
inite
(
q
));
BOOST_REQUIRE
(
is
F
inite
(
v
));
BOOST_REQUIRE
(
is
F
inite
(
q
));
t
+=
dt
;
error
=
task
.
position_error
().
norm
();
BOOST_REQUIRE
(
is
_f
inite
(
task
.
position_error
()));
BOOST_REQUIRE
(
is
F
inite
(
task
.
position_error
()));
BOOST_CHECK
(
error
<=
error_past
);
error_past
=
error
;
...
...
unittest/tsid-formulation.cpp
View file @
849fbd67
...
...
@@ -45,7 +45,7 @@ using namespace tsid::robots;
using
namespace
std
;
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
_f
inite(A), #A<<": "<<A)
#define REQUIRE_FINITE(A) BOOST_REQUIRE_MESSAGE(is
F
inite(A), #A<<": "<<A)
#define CHECK_LESS_THAN(A,B) BOOST_CHECK_MESSAGE(A<B, #A<<": "<<A<<">"<<B)
#define REQUIRE_TASK_FINITE(task) REQUIRE_FINITE(task.getConstraint().matrix()); \
...
...
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