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
6c0bf3ed
Commit
6c0bf3ed
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
get data for jac with pertubations
parent
54fd8154
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
src/test/gtest_processorIMU_jacobians.cpp
+21
-19
21 additions, 19 deletions
src/test/gtest_processorIMU_jacobians.cpp
with
21 additions
and
19 deletions
src/test/gtest_processorIMU_jacobians.cpp
+
21
−
19
View file @
6c0bf3ed
...
...
@@ -30,14 +30,18 @@
using
namespace
wolf
;
// A new one of these is created for each test
class
ProcessorIMU_jacobians
_bias
:
public
testing
::
Test
class
ProcessorIMU_jacobians
:
public
testing
::
Test
{
public:
TimeStamp
t
;
Eigen
::
Vector6s
data_
;
struct
IMU_jac_bias
bias_jac
;
Eigen
::
Matrix
<
wolf
::
Scalar
,
10
,
1
>
Delta0
;
wolf
::
Scalar
ddelta_bias
;
wolf
::
Scalar
dt
;
Eigen
::
Matrix
<
wolf
::
Scalar
,
9
,
1
>
Delta_noise
;
Eigen
::
Matrix
<
wolf
::
Scalar
,
9
,
1
>
delta_noise
;
struct
IMU_jac_bias
bias_jac
;
struct
IMU_jac_deltas
deltas_jac
;
void
remapJacDeltas_quat0
(
IMU_jac_deltas
&
_jac_delta
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_Dq0
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_dq0
){
...
...
@@ -54,7 +58,7 @@ class ProcessorIMU_jacobians_bias : public testing::Test
virtual
void
SetUp
()
{
//SetUp for jacobians
wrt bias testing
//SetUp for jacobians
wolf
::
Scalar
deg_to_rad
=
M_PI
/
180.0
;
data_
<<
10
,
0.5
,
3
,
100
*
deg_to_rad
,
110
*
deg_to_rad
,
30
*
deg_to_rad
;
...
...
@@ -83,8 +87,15 @@ class ProcessorIMU_jacobians_bias : public testing::Test
std
::
cout
<<
"
\n
input Delta0 : "
<<
Delta0
<<
std
::
endl
;
std
::
cout
<<
"
\n
rotation vector we start with :
\n
"
<<
ang
<<
std
::
endl
;
//get data to compute jacobians
struct
IMU_jac_bias
bias_jac_c
=
processor_imu
.
finite_diff_ab
(
dt
,
data_
,
ddelta_bias
,
Delta0
);
bias_jac
.
copyfrom
(
bias_jac_c
);
Delta_noise
<<
0.00000001
,
0.00000001
,
0.00000001
,
0.0001
,
0.0001
,
0.0001
,
0.00000001
,
0.00000001
,
0.00000001
;
delta_noise
<<
0.00000001
,
0.00000001
,
0.00000001
,
0.0001
,
0.0001
,
0.0001
,
0.00000001
,
0.00000001
,
0.00000001
;
struct
IMU_jac_deltas
deltas_jac_c
=
processor_imu
.
finite_diff_noise
(
dt
,
data_
,
Delta_noise
,
delta_noise
,
Delta0
);
deltas_jac
=
deltas_jac_c
;
}
virtual
void
TearDown
()
...
...
@@ -101,17 +112,8 @@ class ProcessorIMU_jacobians_bias : public testing::Test
}
};
// A new one of these is created for each test
class
ProcessorIMU_jacobians_noise
:
public
testing
::
Test
{
public:
TimeStamp
t
;
Eigen
::
Vector6s
data_
;
};
///BIAS TESTS
/* IMU_jac_deltas struct form :
contains vectors of size 7 :
Elements at place 0 are those not affected by the bias noise that we add (da_bx,..., dw_bx,... ).
...
...
@@ -142,7 +144,7 @@ class ProcessorIMU_jacobians_noise : public testing::Test
Then at first step, dR.tr() = Id, dDq_dwb = 0_{3x3}, which boils down to dDq_dwb_ = Jr(wdt)*dt
*/
TEST_F
(
ProcessorIMU_jacobians
_bias
,
dDp_dab
)
TEST_F
(
ProcessorIMU_jacobians
,
dDp_dab
)
{
using
namespace
wolf
;
Eigen
::
Matrix3s
dDp_dab
;
...
...
@@ -154,7 +156,7 @@ TEST_F(ProcessorIMU_jacobians_bias, dDp_dab)
"
\n
dDp_dab_a - dDp_dab_ :
\n
"
<<
bias_jac
.
dDp_dab_
-
dDp_dab
<<
std
::
endl
;
}
TEST_F
(
ProcessorIMU_jacobians
_bias
,
dDv_dab
)
TEST_F
(
ProcessorIMU_jacobians
,
dDv_dab
)
{
using
namespace
wolf
;
Eigen
::
Matrix3s
dDv_dab
;
...
...
@@ -166,7 +168,7 @@ TEST_F(ProcessorIMU_jacobians_bias, dDv_dab)
"
\n
dDv_dab_a - dDv_dab_ :
\n
"
<<
bias_jac
.
dDv_dab_
-
dDv_dab
<<
std
::
endl
;
}
TEST_F
(
ProcessorIMU_jacobians
_bias
,
dDp_dwb
)
TEST_F
(
ProcessorIMU_jacobians
,
dDp_dwb
)
{
using
namespace
wolf
;
Eigen
::
Matrix3s
dDp_dwb
;
...
...
@@ -178,7 +180,7 @@ TEST_F(ProcessorIMU_jacobians_bias, dDp_dwb)
"
\n
dDp_dwb_a - dDv_dab_ :
\n
"
<<
bias_jac
.
dDp_dwb_
-
dDp_dwb
<<
std
::
endl
;
}
TEST_F
(
ProcessorIMU_jacobians
_bias
,
dDv_dwb_
)
TEST_F
(
ProcessorIMU_jacobians
,
dDv_dwb_
)
{
using
namespace
wolf
;
Eigen
::
Matrix3s
dDv_dwb
;
...
...
@@ -190,7 +192,7 @@ TEST_F(ProcessorIMU_jacobians_bias, dDv_dwb_)
"
\n
dDv_dwb_a - dDv_dwb_ :
\n
"
<<
bias_jac
.
dDv_dwb_
-
dDv_dwb
<<
std
::
endl
;
}
TEST_F
(
ProcessorIMU_jacobians
_bias
,
dDq_dab
)
TEST_F
(
ProcessorIMU_jacobians
,
dDq_dab
)
{
using
namespace
wolf
;
Eigen
::
Map
<
Eigen
::
Quaternions
>
q_in_1
(
NULL
),
q_in_2
(
NULL
);
...
...
@@ -205,7 +207,7 @@ TEST_F(ProcessorIMU_jacobians_bias, dDq_dab)
EXPECT_TRUE
(
dDq_dab
.
isZero
(
wolf
::
Constants
::
EPS
))
<<
"
\t\t
dDq_dab_ jacobian is not Zero :"
<<
dDq_dab
<<
std
::
endl
;
}
TEST_F
(
ProcessorIMU_jacobians
_bias
,
dDq_dwb
)
TEST_F
(
ProcessorIMU_jacobians
,
dDq_dwb
)
{
using
namespace
wolf
;
Eigen
::
Map
<
Eigen
::
Quaternions
>
q_in_1
(
NULL
),
q_in_2
(
NULL
);
...
...
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