Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
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
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
467702c7
Commit
467702c7
authored
8 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[C++] Update checker to new naming convention
parent
14b6d3be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/algorithm/aba.hxx
+1
-1
1 addition, 1 deletion
src/algorithm/aba.hxx
src/algorithm/check.hxx
+23
-23
23 additions, 23 deletions
src/algorithm/check.hxx
src/algorithm/crba.hxx
+3
-3
3 additions, 3 deletions
src/algorithm/crba.hxx
with
27 additions
and
27 deletions
src/algorithm/aba.hxx
+
1
−
1
View file @
467702c7
...
@@ -226,7 +226,7 @@ namespace se3
...
@@ -226,7 +226,7 @@ namespace se3
// The second test is overconstraining.
// The second test is overconstraining.
inline
bool
ABAChecker
::
checkModel_impl
(
const
Model
&
model
)
const
inline
bool
ABAChecker
::
checkModel_impl
(
const
Model
&
model
)
const
{
{
for
(
JointIndex
j
=
1
;
int
(
j
)
<
model
.
njoint
;
j
++
)
for
(
JointIndex
j
=
1
;
int
(
j
)
<
model
.
njoint
s
;
j
++
)
if
(
(
model
.
inertias
[
j
].
mass
()
<
1e-5
)
if
(
(
model
.
inertias
[
j
].
mass
()
<
1e-5
)
||
(
model
.
inertias
[
j
].
inertia
().
data
()[
0
]
<
1e-5
)
||
(
model
.
inertias
[
j
].
inertia
().
data
()[
0
]
<
1e-5
)
||
(
model
.
inertias
[
j
].
inertia
().
data
()[
3
]
<
1e-5
)
||
(
model
.
inertias
[
j
].
inertia
().
data
()[
3
]
<
1e-5
)
...
...
This diff is collapsed.
Click to expand it.
src/algorithm/check.hxx
+
23
−
23
View file @
467702c7
...
@@ -50,7 +50,7 @@ namespace se3
...
@@ -50,7 +50,7 @@ namespace se3
// Check the validity of the kinematic tree defined by parents.
// Check the validity of the kinematic tree defined by parents.
inline
bool
ParentChecker
::
checkModel_impl
(
const
Model
&
model
)
const
inline
bool
ParentChecker
::
checkModel_impl
(
const
Model
&
model
)
const
{
{
for
(
JointIndex
j
=
1
;(
int
)
j
<
model
.
njoint
;
++
j
)
for
(
JointIndex
j
=
1
;(
int
)
j
<
model
.
njoint
s
;
++
j
)
if
(
model
.
parents
[
j
]
>=
j
)
return
false
;
if
(
model
.
parents
[
j
]
>=
j
)
return
false
;
return
true
;
return
true
;
...
@@ -64,23 +64,23 @@ namespace se3
...
@@ -64,23 +64,23 @@ namespace se3
// TODO impulse_c
// TODO impulse_c
// They are not check neither
// They are not check neither
CHECK_DATA
(
(
int
)
data
.
joints
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
joints
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
a
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
a
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
a_gf
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
a_gf
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
v
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
v
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
f
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
f
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
oMi
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
oMi
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
liMi
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
liMi
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
Ycrb
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
Ycrb
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
Yaba
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
Yaba
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
Fcrb
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
Fcrb
.
size
()
==
model
.
njoint
s
);
BOOST_FOREACH
(
const
Data
::
Matrix6x
&
F
,
data
.
Fcrb
)
CHECK_DATA
(
F
.
cols
()
==
model
.
nv
);
BOOST_FOREACH
(
const
Data
::
Matrix6x
&
F
,
data
.
Fcrb
)
CHECK_DATA
(
F
.
cols
()
==
model
.
nv
);
CHECK_DATA
(
(
int
)
data
.
iMf
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
iMf
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
iMf
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
iMf
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
com
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
com
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
vcom
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
vcom
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
acom
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
acom
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
mass
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
mass
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
data
.
tau
.
size
()
==
model
.
nv
);
CHECK_DATA
(
data
.
tau
.
size
()
==
model
.
nv
);
CHECK_DATA
(
data
.
nle
.
size
()
==
model
.
nv
);
CHECK_DATA
(
data
.
nle
.
size
()
==
model
.
nv
);
...
@@ -99,17 +99,17 @@ namespace se3
...
@@ -99,17 +99,17 @@ namespace se3
CHECK_DATA
(
data
.
dq_after
.
size
()
==
model
.
nv
);
CHECK_DATA
(
data
.
dq_after
.
size
()
==
model
.
nv
);
//CHECK_DATA( data.impulse_c.size()== model.nv );
//CHECK_DATA( data.impulse_c.size()== model.nv );
CHECK_DATA
(
(
int
)
data
.
oMf
.
size
()
==
model
.
n
F
rames
);
CHECK_DATA
(
(
int
)
data
.
oMf
.
size
()
==
model
.
n
f
rames
);
CHECK_DATA
(
(
int
)
data
.
lastChild
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
lastChild
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
nvSubtree
.
size
()
==
model
.
njoint
);
CHECK_DATA
(
(
int
)
data
.
nvSubtree
.
size
()
==
model
.
njoint
s
);
CHECK_DATA
(
(
int
)
data
.
parents_fromRow
.
size
()
==
model
.
nv
);
CHECK_DATA
(
(
int
)
data
.
parents_fromRow
.
size
()
==
model
.
nv
);
CHECK_DATA
(
(
int
)
data
.
nvSubtree_fromRow
.
size
()
==
model
.
nv
);
CHECK_DATA
(
(
int
)
data
.
nvSubtree_fromRow
.
size
()
==
model
.
nv
);
for
(
JointIndex
j
=
1
;
int
(
j
)
<
model
.
njoint
;
++
j
)
for
(
JointIndex
j
=
1
;
int
(
j
)
<
model
.
njoint
s
;
++
j
)
{
{
JointIndex
c
=
data
.
lastChild
[
j
];
JointIndex
c
=
data
.
lastChild
[
j
];
CHECK_DATA
((
int
)
c
<
model
.
njoint
);
CHECK_DATA
((
int
)
c
<
model
.
njoint
s
);
int
nv
=
model
.
joints
[
j
].
nv
();
int
nv
=
model
.
joints
[
j
].
nv
();
for
(
JointIndex
d
=
j
+
1
;
d
<=
c
;
++
d
)
// explore all descendant
for
(
JointIndex
d
=
j
+
1
;
d
<=
c
;
++
d
)
// explore all descendant
{
{
...
@@ -118,7 +118,7 @@ namespace se3
...
@@ -118,7 +118,7 @@ namespace se3
}
}
CHECK_DATA
(
nv
==
data
.
nvSubtree
[
j
]);
CHECK_DATA
(
nv
==
data
.
nvSubtree
[
j
]);
for
(
JointIndex
d
=
c
+
1
;(
int
)
d
<
model
.
njoint
;
++
d
)
for
(
JointIndex
d
=
c
+
1
;(
int
)
d
<
model
.
njoint
s
;
++
d
)
CHECK_DATA
(
(
model
.
parents
[
d
]
<
j
)
||
(
model
.
parents
[
d
]
>
c
)
);
CHECK_DATA
(
(
model
.
parents
[
d
]
<
j
)
||
(
model
.
parents
[
d
]
>
c
)
);
int
row
=
model
.
joints
[
j
].
idx_v
();
int
row
=
model
.
joints
[
j
].
idx_v
();
...
...
This diff is collapsed.
Click to expand it.
src/algorithm/crba.hxx
+
3
−
3
View file @
467702c7
...
@@ -240,7 +240,7 @@ namespace se3
...
@@ -240,7 +240,7 @@ namespace se3
{
{
inline
bool
isDescendant
(
const
Model
&
model
,
const
JointIndex
j
,
const
JointIndex
root
)
inline
bool
isDescendant
(
const
Model
&
model
,
const
JointIndex
j
,
const
JointIndex
root
)
{
{
if
(
int
(
j
)
>=
model
.
njoint
)
return
false
;
if
(
int
(
j
)
>=
model
.
njoint
s
)
return
false
;
if
(
j
==
0
)
return
root
==
0
;
if
(
j
==
0
)
return
root
==
0
;
return
(
j
==
root
)
||
isDescendant
(
model
,
model
.
parents
[
j
],
root
);
return
(
j
==
root
)
||
isDescendant
(
model
,
model
.
parents
[
j
],
root
);
}
}
...
@@ -252,11 +252,11 @@ namespace se3
...
@@ -252,11 +252,11 @@ namespace se3
// immediately after i in the "parents" map, i.e. forall joint i, the interval i+1..n-1
// immediately after i in the "parents" map, i.e. forall joint i, the interval i+1..n-1
// can be separated in two intervals [i+1..k] and [k+1..n-1], where any [i+1..k] is a descendant
// can be separated in two intervals [i+1..k] and [k+1..n-1], where any [i+1..k] is a descendant
// of i and none of [k+1..n-1] is a descendant of i.
// of i and none of [k+1..n-1] is a descendant of i.
for
(
JointIndex
i
=
1
;
int
(
i
)
<
model
.
njoint
-
1
;
++
i
)
// no need to check joints 0 and N-1
for
(
JointIndex
i
=
1
;
int
(
i
)
<
model
.
njoint
s
-
1
;
++
i
)
// no need to check joints 0 and N-1
{
{
JointIndex
k
=
i
+
1
;
JointIndex
k
=
i
+
1
;
while
(
internal
::
isDescendant
(
model
,
k
,
i
))
++
k
;
while
(
internal
::
isDescendant
(
model
,
k
,
i
))
++
k
;
for
(
;
int
(
k
)
<
model
.
njoint
;
++
k
)
for
(
;
int
(
k
)
<
model
.
njoint
s
;
++
k
)
if
(
internal
::
isDescendant
(
model
,
k
,
i
)
)
return
false
;
if
(
internal
::
isDescendant
(
model
,
k
,
i
)
)
return
false
;
}
}
return
true
;
return
true
;
...
...
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