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
991af777
Commit
991af777
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
parent
66aa1f18
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
+24
-17
24 additions, 17 deletions
src/test/gtest_processorIMU_jacobians.cpp
with
24 additions
and
17 deletions
src/test/gtest_processorIMU_jacobians.cpp
+
24
−
17
View file @
991af777
...
@@ -30,31 +30,29 @@
...
@@ -30,31 +30,29 @@
using
namespace
wolf
;
using
namespace
wolf
;
// A new one of these is created for each test
// A new one of these is created for each test
class
ProcessorIMU_jacobians
:
public
testing
::
Test
class
ProcessorIMU_jacobians
_bias
:
public
testing
::
Test
{
{
public:
public:
TimeStamp
t
;
TimeStamp
t
;
Eigen
::
Vector6s
data_
;
Eigen
::
Vector6s
data_
;
struct
IMU_jac_bias
bias_jac
;
struct
IMU_jac_bias
bias_jac
;
Eigen
::
Matrix
<
wolf
::
Scalar
,
9
,
1
>
Delta_noise
;
Eigen
::
Matrix
<
wolf
::
Scalar
,
9
,
1
>
delta_noise
;
void
remapJacDeltas_quat0
(
IMU_jac_deltas
&
_jac_delta
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_Dq0
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_dq0
){
void
remapJacDeltas_quat0
(
IMU_jac_deltas
&
_jac_delta
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_Dq0
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_dq0
){
new
(
&
_Dq0
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
Delta0_
.
data
()
+
6
);
new
(
&
_Dq0
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
Delta0_
.
data
()
+
6
);
new
(
&
_dq0
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
delta0_
.
data
()
+
6
);
new
(
&
_dq0
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
delta0_
.
data
()
+
6
);
}
}
void
remapJacDeltas_quat
(
IMU_jac_deltas
&
_jac_delta
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_Dq
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_dq
,
const
int
&
place
){
void
remapJacDeltas_quat
(
IMU_jac_deltas
&
_jac_delta
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_Dq
,
Eigen
::
Map
<
Eigen
::
Quaternions
>&
_dq
,
const
int
&
place
){
assert
(
place
<
_jac_delta
.
Delta_noisy_vect_
.
size
());
assert
(
place
<
_jac_delta
.
Delta_noisy_vect_
.
size
());
new
(
&
_Dq
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
Delta_noisy_vect_
(
place
).
data
()
+
6
);
new
(
&
_Dq
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
Delta_noisy_vect_
(
place
).
data
()
+
6
);
new
(
&
_dq
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
delta_noisy_vect_
(
place
).
data
()
+
6
);
new
(
&
_dq
)
Eigen
::
Map
<
const
Eigen
::
Quaternions
>
(
_jac_delta
.
delta_noisy_vect_
(
place
).
data
()
+
6
);
}
}
virtual
void
SetUp
()
virtual
void
SetUp
()
{
{
//SetUp for
//SetUp for
jacobians wrt bias testing
wolf
::
Scalar
deg_to_rad
=
M_PI
/
180.0
;
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
;
data_
<<
10
,
0.5
,
3
,
100
*
deg_to_rad
,
110
*
deg_to_rad
,
30
*
deg_to_rad
;
...
@@ -101,7 +99,16 @@ class ProcessorIMU_jacobians : public testing::Test
...
@@ -101,7 +99,16 @@ class ProcessorIMU_jacobians : public testing::Test
}
}
};
};
TEST_F
(
ProcessorIMU_jacobians
,
Dummy
)
// A new one of these is created for each test
class
ProcessorIMU_jacobians_bias
:
public
testing
::
Test
{
public:
TimeStamp
t
;
Eigen
::
Vector6s
data_
;
}
TEST_F
(
ProcessorIMU_jacobians_bias
,
Dummy
)
{
{
ASSERT_TRUE
(
data_
.
size
()
==
6
);
ASSERT_TRUE
(
data_
.
size
()
==
6
);
}
}
...
...
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