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
54d76b60
Commit
54d76b60
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
build gtest_frame_imu
parent
0e1c0f06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/CMakeLists.txt
+4
-0
4 additions, 0 deletions
src/test/CMakeLists.txt
src/test/gtest_frame_imu.cpp
+39
-0
39 additions, 0 deletions
src/test/gtest_frame_imu.cpp
with
43 additions
and
0 deletions
src/test/CMakeLists.txt
+
4
−
0
View file @
54d76b60
...
@@ -49,6 +49,10 @@ target_link_libraries(gtest_example ${PROJECT_NAME}) #
...
@@ -49,6 +49,10 @@ target_link_libraries(gtest_example ${PROJECT_NAME}) #
wolf_add_gtest
(
gtest_frame_base gtest_frame_base.cpp
)
wolf_add_gtest
(
gtest_frame_base gtest_frame_base.cpp
)
target_link_libraries
(
gtest_frame_base
${
PROJECT_NAME
}
)
target_link_libraries
(
gtest_frame_base
${
PROJECT_NAME
}
)
# FrameIMU class test
wolf_add_gtest
(
gtest_frame_imu gtest_frame_imu.cpp
)
target_link_libraries
(
gtest_frame_imu
${
PROJECT_NAME
}
)
# LocalParametrizationXxx classes test
# LocalParametrizationXxx classes test
wolf_add_gtest
(
gtest_local_param gtest_local_param.cpp
)
wolf_add_gtest
(
gtest_local_param gtest_local_param.cpp
)
target_link_libraries
(
gtest_local_param
${
PROJECT_NAME
}
)
target_link_libraries
(
gtest_local_param
${
PROJECT_NAME
}
)
...
...
This diff is collapsed.
Click to expand it.
src/test/gtest_frame_imu.cpp
+
39
−
0
View file @
54d76b60
/*
* gtest_frame_imu.cpp
*
* Created on: Jan 05, 2017
* Author: Dinesh Atchuthan
*/
#include
"utils_gtest.h"
#include
"../logging.h"
#include
"../frame_imu.h"
#include
"../capture_motion.h"
#include
<iostream>
using
namespace
Eigen
;
using
namespace
std
;
using
namespace
wolf
;
TEST
(
FrameIMU
,
Getters
)
{
TimeStamp
ts
(
0.1
);
Eigen
::
VectorXs
state0
(
16
);
state0
<<
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
.001
,
0
,
0
,
.002
;
FrameIMUPtr
F
=
make_shared
<
FrameIMU
>
(
KEY_FRAME
,
ts
,
state0
);
Eigen
::
Vector3s
acc_b
=
F
->
getAccBiasPtr
()
->
getVector
();
Eigen
::
Vector3s
gyro_b
=
F
->
getGyroBiasPtr
()
->
getVector
();
ASSERT_TRUE
((
state0
.
segment
(
10
,
3
)
-
acc_b
).
isMuchSmallerThan
(
1
,
wolf
::
Constants
::
EPS_SMALL
));
ASSERT_TRUE
((
state0
.
tail
(
3
)
-
gyro_b
).
isMuchSmallerThan
(
1
,
wolf
::
Constants
::
EPS_SMALL
));
}
int
main
(
int
argc
,
char
**
argv
)
{
testing
::
InitGoogleTest
(
&
argc
,
argv
);
return
RUN_ALL_TESTS
();
}
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