Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
plugins
imu
Commits
77acba5c
Commit
77acba5c
authored
5 years ago
by
Médéric Fourmy
Browse files
Options
Downloads
Patches
Plain Diff
Exp Log IMU Lie test passing
parent
40f18270
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/IMU/math/IMU_tools_Lie.h
+6
-9
6 additions, 9 deletions
include/IMU/math/IMU_tools_Lie.h
with
6 additions
and
9 deletions
include/IMU/math/IMU_tools_Lie.h
+
6
−
9
View file @
77acba5c
...
@@ -382,7 +382,7 @@ inline Matrix<typename D1::Scalar, 11, 1> betweenStates(const MatrixBase<D1>& x1
...
@@ -382,7 +382,7 @@ inline Matrix<typename D1::Scalar, 11, 1> betweenStates(const MatrixBase<D1>& x1
template
<
typename
D1
,
typename
D2
,
typename
D3
>
template
<
typename
D1
,
typename
D2
,
typename
D3
>
inline
void
QandPmat
(
const
MatrixBase
<
D1
>&
th
,
MatrixBase
<
D2
>&
Q
,
MatrixBase
<
D3
>&
P
){
inline
void
QandPmat
(
const
MatrixBase
<
D1
>&
th
,
MatrixBase
<
D2
>&
Q
,
MatrixBase
<
D3
>&
P
){
// See equations 29-31 humanoids fourmy 19
// See equations 29-31 humanoids fourmy 19
// th = omega * dt
// th = omega * dt
is elt of the IMU Lie group tangent space
MatrixSizeCheck
<
3
,
1
>::
check
(
th
);
MatrixSizeCheck
<
3
,
1
>::
check
(
th
);
MatrixSizeCheck
<
3
,
3
>::
check
(
Q
);
MatrixSizeCheck
<
3
,
3
>::
check
(
Q
);
MatrixSizeCheck
<
3
,
3
>::
check
(
P
);
MatrixSizeCheck
<
3
,
3
>::
check
(
P
);
...
@@ -399,7 +399,7 @@ inline void QandPmat(const MatrixBase<D1>& th, MatrixBase<D2>& Q, MatrixBase<D3>
...
@@ -399,7 +399,7 @@ inline void QandPmat(const MatrixBase<D1>& th, MatrixBase<D2>& Q, MatrixBase<D3>
Matrix
<
typename
D1
::
Scalar
,
3
,
1
>
u
=
th
/
thn
;
Matrix
<
typename
D1
::
Scalar
,
3
,
1
>
u
=
th
/
thn
;
Matrix
<
typename
D1
::
Scalar
,
3
,
3
>
ux
=
skew
(
u
);
Matrix
<
typename
D1
::
Scalar
,
3
,
3
>
ux
=
skew
(
u
);
Q
=
Id
+
Q
=
Id
+
((
1
-
cos
(
thn
))
/
thn
)
*
ux
+
((
1
-
cos
(
thn
))
/
thn
)
*
ux
+
((
thn
-
sin
(
thn
))
/
(
thn
*
thn
))
*
(
ux
*
ux
);
+
((
thn
-
sin
(
thn
))
/
(
thn
*
thn
))
*
(
ux
*
ux
);
...
@@ -429,13 +429,9 @@ Matrix<typename Derived::Scalar, 11, 1> exp_IMU(const MatrixBase<Derived>& d_in)
...
@@ -429,13 +429,9 @@ Matrix<typename Derived::Scalar, 11, 1> exp_IMU(const MatrixBase<Derived>& d_in)
Matrix
<
typename
Derived
::
Scalar
,
3
,
3
>
Q
;
Matrix
<
typename
Derived
::
Scalar
,
3
,
3
>
Q
;
Matrix
<
typename
Derived
::
Scalar
,
3
,
3
>
P
;
Matrix
<
typename
Derived
::
Scalar
,
3
,
3
>
P
;
QandPmat
(
do_in
,
Q
,
P
);
QandPmat
(
do_in
,
Q
,
P
);
std
::
cout
<<
"Q"
<<
std
::
endl
;
std
::
cout
<<
Q
<<
std
::
endl
;
std
::
cout
<<
"P"
<<
std
::
endl
;
std
::
cout
<<
P
<<
std
::
endl
;
dp
=
Q
*
dp_in
+
P
*
dv_in
*
dt_in
;
dp
=
Q
*
dp_in
+
P
*
dv_in
*
dt_in
;
dv
=
Q
*
d
p
_in
;
dv
=
Q
*
d
v
_in
;
dq
=
exp_q
(
do_in
);
dq
=
exp_q
(
do_in
);
dt
=
dt_in
;
dt
=
dt_in
;
...
@@ -451,7 +447,7 @@ Matrix<typename Derived::Scalar, 10, 1> log_IMU(const MatrixBase<Derived>& delta
...
@@ -451,7 +447,7 @@ Matrix<typename Derived::Scalar, 10, 1> log_IMU(const MatrixBase<Derived>& delta
Map
<
const
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dp_in
(
&
delta_in
(
0
)
);
Map
<
const
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dp_in
(
&
delta_in
(
0
)
);
Map
<
const
Quaternion
<
typename
Derived
::
Scalar
>
>
dq_in
(
&
delta_in
(
3
)
);
Map
<
const
Quaternion
<
typename
Derived
::
Scalar
>
>
dq_in
(
&
delta_in
(
3
)
);
Map
<
const
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dv_in
(
&
delta_in
(
7
)
);
Map
<
const
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dv_in
(
&
delta_in
(
7
)
);
const
typename
Derived
::
Scalar
&
dt_in
=
delta_in
(
9
);
const
typename
Derived
::
Scalar
&
dt_in
=
delta_in
(
10
);
Map
<
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dp_ret
(
&
ret
(
0
)
);
Map
<
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dp_ret
(
&
ret
(
0
)
);
Map
<
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
do_ret
(
&
ret
(
3
)
);
Map
<
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
do_ret
(
&
ret
(
3
)
);
Map
<
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dv_ret
(
&
ret
(
6
)
);
Map
<
Matrix
<
typename
Derived
::
Scalar
,
3
,
1
>
>
dv_ret
(
&
ret
(
6
)
);
...
@@ -468,6 +464,7 @@ Matrix<typename Derived::Scalar, 10, 1> log_IMU(const MatrixBase<Derived>& delta
...
@@ -468,6 +464,7 @@ Matrix<typename Derived::Scalar, 10, 1> log_IMU(const MatrixBase<Derived>& delta
dv_ret
=
Qinv
*
dv_in
;
dv_ret
=
Qinv
*
dv_in
;
dt_ret
=
dt_in
;
dt_ret
=
dt_in
;
std
::
cout
<<
"Log ret"
<<
ret
.
transpose
()
<<
std
::
endl
;
return
ret
;
return
ret
;
}
}
...
...
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