Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
d9d338fe
Commit
d9d338fe
authored
6 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Update SE3.h
parent
56f9c4cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!242
Feature/proc motion
Pipeline
#2471
passed
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/SE3.h
+40
-28
40 additions, 28 deletions
src/SE3.h
with
40 additions
and
28 deletions
src/SE3.h
+
40
−
28
View file @
d9d338fe
...
@@ -415,30 +415,42 @@ inline Matrix<typename D1::Scalar, 6, 6> Q_helper(const MatrixBase<D1>& v, const
...
@@ -415,30 +415,42 @@ inline Matrix<typename D1::Scalar, 6, 6> Q_helper(const MatrixBase<D1>& v, const
{
{
typedef
typename
D1
::
Scalar
T
;
typedef
typename
D1
::
Scalar
T
;
Matrix
<
T
,
3
,
3
>
vx
=
skew
(
v
);
Matrix
<
T
,
3
,
3
>
V
=
skew
(
v
);
Matrix
<
T
,
3
,
3
>
wx
=
skew
(
w
);
Matrix
<
T
,
3
,
3
>
W
=
skew
(
w
);
Matrix
<
T
,
3
,
3
>
wxvx
=
wx
*
vx
;
Matrix
<
T
,
3
,
3
>
VW
=
V
*
W
;
Matrix
<
T
,
3
,
3
>
vxwx
=
wxvx
.
transpose
();
Matrix
<
T
,
3
,
3
>
WV
=
VW
.
transpose
();
// Note on this change wrt. Barfoot: it happens that V*W = (W*V).transpose() !!!
Matrix
<
T
,
3
,
3
>
wxwx
=
wx
*
wx
;
Matrix
<
T
,
3
,
3
>
WVW
=
WV
*
W
;
Matrix
<
T
,
3
,
3
>
wxvxwx
=
wx
*
vx
*
wx
;
Matrix
<
T
,
3
,
3
>
VWW
=
VW
*
W
;
T
th
=
wx
.
norm
();
T
th_2
=
w
.
squaredNorm
();
T
th_2
=
th
*
th
;
T
th_3
=
th_2
*
th
;
T
A
(
T
(
0.5
)),
B
,
C
,
D
;
T
th_4
=
th_2
*
th_2
;
T
th_5
=
th_3
*
th_2
;
// Small angle approximation
T
sin_th
=
sin
(
th
);
if
(
th_2
<=
T
(
1e-8
))
T
cos_th
=
cos
(
th
);
{
T
A
=
(
th
-
sin_th
)
/
th_3
;
B
=
Scalar
(
1.
/
6.
)
+
Scalar
(
1.
/
120.
)
*
th_2
;
T
B
=
(
T
(
1.0
)
-
th_2
/
T
(
2.0
)
-
cos_th
)
/
th_4
;
C
=
-
Scalar
(
1.
/
24.
)
+
Scalar
(
1.
/
720.
)
*
th_2
;
T
C
=
(
th
-
sin_th
-
th_3
/
T
(
6.0
))
/
th_5
;
D
=
-
Scalar
(
1.
/
60.
);
}
Matrix
<
T
,
3
,
3
>
Q
else
=
T
(
0.5
)
*
vx
{
+
A
*
(
wxvx
+
vxwx
+
wxvxwx
)
T
th
=
sqrt
(
th_2
);
-
B
*
(
wxwx
*
vx
+
vxwx
*
wx
-
T
(
3.0
)
*
wxvxwx
)
T
th_3
=
th_2
*
th
;
-
(
B
-
T
(
3.0
)
*
C
)
*
wxvx
*
wxwx
;
T
th_4
=
th_2
*
th_2
;
// - T(0.5) * (B - T(3.0)*C) * (wxvx*wxwx + wxwx*vxwx);
T
th_5
=
th_3
*
th_2
;
T
sin_th
=
sin
(
th
);
T
cos_th
=
cos
(
th
);
B
=
(
th
-
sin_th
)
/
th_3
;
C
=
(
T
(
1.0
)
-
th_2
/
T
(
2.0
)
-
cos_th
)
/
th_4
;
D
=
(
th
-
sin_th
-
th_3
/
T
(
6.0
))
/
th_5
;
}
Matrix
<
T
,
3
,
3
>
Q
;
Q
.
noalias
()
=
+
A
*
V
+
B
*
(
WV
+
VW
+
WVW
)
-
C
*
(
VWW
-
VWW
.
transpose
()
-
Scalar
(
3
)
*
WVW
)
// Note on this change wrt. Barfoot: it happens that V*W*W = -(W*W*V).transpose() !!!
-
D
*
WVW
*
W
;
// Note on this change wrt. Barfoot: it happens that W*V*W*W = W*W*V*W !!!
return
Q
;
return
Q
;
}
}
...
@@ -454,10 +466,10 @@ inline Matrix<typename D1::Scalar, 6, 6> jac_SE3_left(const MatrixBase<D1>& tang
...
@@ -454,10 +466,10 @@ inline Matrix<typename D1::Scalar, 6, 6> jac_SE3_left(const MatrixBase<D1>& tang
Matrix
<
T
,
3
,
3
>
Q
=
Q_helper
(
v
,
w
);
Matrix
<
T
,
3
,
3
>
Q
=
Q_helper
(
v
,
w
);
Matrix
<
T
,
6
,
6
>
Jl_SE3
;
Matrix
<
T
,
6
,
6
>
Jl_SE3
;
Jl_SE3
.
top
l
eft
(
3
,
3
)
=
Jl
;
Jl_SE3
.
top
L
eft
Corner
(
3
,
3
)
=
Jl
;
Jl_SE3
.
bottom
r
ight
(
3
,
3
)
=
Jl
;
Jl_SE3
.
bottom
R
ight
Corner
(
3
,
3
)
=
Jl
;
Jl_SE3
.
top
r
ight
(
3
,
3
)
=
Q
;
Jl_SE3
.
top
R
ight
Corner
(
3
,
3
)
=
Q
;
Jl_SE3
.
bottom
l
eft
(
3
,
3
)
.
setZero
();
Jl_SE3
.
bottom
L
eft
Corner
(
3
,
3
)
.
setZero
();
}
}
template
<
typename
D1
>
template
<
typename
D1
>
...
...
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