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
3e8cb2a7
Commit
3e8cb2a7
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
redesign
parent
414e8cbc
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_feature_imu.cpp
+15
-17
15 additions, 17 deletions
src/test/gtest_feature_imu.cpp
with
15 additions
and
17 deletions
src/test/gtest_feature_imu.cpp
+
15
−
17
View file @
3e8cb2a7
...
@@ -20,6 +20,11 @@ class FeatureIMU_test : public testing::Test
...
@@ -20,6 +20,11 @@ class FeatureIMU_test : public testing::Test
wolf
::
ProblemPtr
wolf_problem_ptr_
;
wolf
::
ProblemPtr
wolf_problem_ptr_
;
wolf
::
TimeStamp
ts
;
wolf
::
TimeStamp
ts
;
wolf
::
CaptureIMUPtr
imu_ptr
;
wolf
::
CaptureIMUPtr
imu_ptr
;
Eigen
::
VectorXs
state_vec
;
Eigen
::
VectorXs
delta_preint
;
Eigen
::
Matrix
<
wolf
::
Scalar
,
9
,
9
>
delta_preint_cov
;
std
::
shared_ptr
<
wolf
::
FeatureIMU
>
feat_imu
;
wolf
::
FrameIMUPtr
last_frame
;
//a new of this will be created for each new test
//a new of this will be created for each new test
virtual
void
SetUp
()
virtual
void
SetUp
()
...
@@ -68,7 +73,17 @@ class FeatureIMU_test : public testing::Test
...
@@ -68,7 +73,17 @@ class FeatureIMU_test : public testing::Test
// process data in capture
// process data in capture
sensor_ptr
->
process
(
imu_ptr
);
sensor_ptr
->
process
(
imu_ptr
);
//create FrameIMU
ts
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getBuffer
().
get
().
back
().
ts_
;
state_vec
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getCurrentState
();
last_frame
=
std
::
make_shared
<
FrameIMU
>
(
KEY_FRAME
,
ts
,
state_vec
);
wolf_problem_ptr_
->
getTrajectoryPtr
()
->
addFrame
(
last_frame
);
//create a feature
delta_preint_cov
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getCurrentDeltaPreintCov
();
delta_preint
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getMotion
().
delta_integr_
;
feat_imu
=
std
::
make_shared
<
FeatureIMU
>
(
delta_preint
,
delta_preint_cov
);
feat_imu
->
setCapturePtr
(
imu_ptr
);
}
}
...
@@ -90,23 +105,6 @@ TEST_F(FeatureIMU_test, test0)
...
@@ -90,23 +105,6 @@ TEST_F(FeatureIMU_test, test0)
{
{
// set variables
// set variables
using
namespace
wolf
;
using
namespace
wolf
;
Eigen
::
VectorXs
state_vec
;
Eigen
::
VectorXs
delta_preint
;
//FrameIMUPtr last_frame;
Eigen
::
Matrix
<
wolf
::
Scalar
,
9
,
9
>
delta_preint_cov
;
//create the constraint
//create FrameIMU
ts
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getBuffer
().
get
().
back
().
ts_
;
state_vec
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getCurrentState
();
FrameIMUPtr
last_frame
=
std
::
make_shared
<
FrameIMU
>
(
KEY_FRAME
,
ts
,
state_vec
);
wolf_problem_ptr_
->
getTrajectoryPtr
()
->
addFrame
(
last_frame
);
//create a feature
delta_preint_cov
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getCurrentDeltaPreintCov
();
delta_preint
=
wolf_problem_ptr_
->
getProcessorMotionPtr
()
->
getMotion
().
delta_integr_
;
std
::
shared_ptr
<
FeatureIMU
>
feat_imu
=
std
::
make_shared
<
FeatureIMU
>
(
delta_preint
,
delta_preint_cov
);
feat_imu
->
setCapturePtr
(
imu_ptr
);
//create a constraintIMU
//create a constraintIMU
//ConstraintIMUPtr constraint_imu = std::make_shared<ConstraintIMU>(feat_imu, last_frame);
//ConstraintIMUPtr constraint_imu = std::make_shared<ConstraintIMU>(feat_imu, last_frame);
...
...
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