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
a0128e70
Commit
a0128e70
authored
8 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Algo] Update the frame algo to use M.isIdentity()
parent
fcb402de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/algorithm/frames.hpp
+9
-17
9 additions, 17 deletions
src/algorithm/frames.hpp
with
9 additions
and
17 deletions
src/algorithm/frames.hpp
+
9
−
17
View file @
a0128e70
...
...
@@ -62,7 +62,7 @@ namespace se3
*
* @warning The function computeJacobians should have been called first
*/
template
<
bool
local
F
rame
>
template
<
bool
local
_f
rame
>
inline
void
getFrameJacobian
(
const
Model
&
model
,
const
Data
&
data
,
const
Model
::
FrameIndex
frame_id
,
...
...
@@ -84,14 +84,10 @@ namespace se3
{
const
Frame
&
frame
=
model
.
frames
[
i
];
const
Model
::
JointIndex
&
parent
=
frame
.
parent
;
if
(
frame
.
placement
==
SE3
::
Identity
())
{
if
(
frame
.
placement
.
isIdentity
())
data
.
oMf
[
i
]
=
data
.
oMi
[
parent
];
}
else
{
data
.
oMf
[
i
]
=
(
data
.
oMi
[
parent
]
*
frame
.
placement
);
}
data
.
oMf
[
i
]
=
data
.
oMi
[
parent
]
*
frame
.
placement
;
}
}
...
...
@@ -112,8 +108,8 @@ namespace se3
const
Model
::
FrameIndex
frame_id
,
Data
::
Matrix6x
&
J
)
{
assert
(
J
.
row
s
()
==
data
.
J
.
rows
()
);
assert
(
J
.
cols
()
==
data
.
J
.
cols
()
);
assert
(
J
.
col
s
()
==
model
.
nv
);
assert
(
data
.
J
.
cols
()
==
model
.
nv
);
const
Model
::
JointIndex
&
parent
=
model
.
frames
[
frame_id
].
parent
;
const
SE3
&
oMframe
=
data
.
oMf
[
frame_id
];
...
...
@@ -122,19 +118,15 @@ namespace se3
const
int
colRef
=
nv
(
model
.
joints
[
parent
])
+
idx_v
(
model
.
joints
[
parent
])
-
1
;
// Lever between the joint center and the frame center expressed in the global frame
const
SE3
::
Vector3
lever
(
data
.
oMi
[
parent
].
rotation
()
*
(
frame
.
placement
.
translation
())
)
;
const
SE3
::
Vector3
lever
(
data
.
oMi
[
parent
].
rotation
()
*
frame
.
placement
.
translation
());
getJacobian
<
local
F
rame
>
(
model
,
data
,
parent
,
J
);
getJacobian
<
local
_f
rame
>
(
model
,
data
,
parent
,
J
);
if
(
frame
.
placement
==
SE3
::
Identity
())
{
// do nothing
}
else
if
(
!
frame
.
placement
.
isIdentity
())
{
for
(
int
j
=
colRef
;
j
>=
0
;
j
=
data
.
parents_fromRow
[(
size_t
)
j
])
{
if
(
!
local
F
rame
)
if
(
!
local
_f
rame
)
J
.
col
(
j
).
topRows
<
3
>
()
-=
lever
.
cross
(
J
.
col
(
j
).
bottomRows
<
3
>
());
else
J
.
col
(
j
)
=
oMframe
.
actInv
(
Motion
(
data
.
J
.
col
(
j
))).
toVector
();
...
...
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