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
0996f6d6
Commit
0996f6d6
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
minor changes
parent
1375b42c
No related branches found
No related tags found
1 merge request
!243
Constraint prior sensor params
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/gtest_constraint_absolute.cpp
+6
-6
6 additions, 6 deletions
src/test/gtest_constraint_absolute.cpp
with
6 additions
and
6 deletions
src/test/gtest_constraint_absolute.cpp
+
6
−
6
View file @
0996f6d6
...
...
@@ -33,11 +33,11 @@ Eigen::Matrix<wolf::Scalar, 9, 9> data_cov = 0.2 * Eigen::Matrix<Scalar,9,9>::Id
Vector10s
x0
=
pose9toPose10
(
pose
+
Vector9s
::
Random
()
*
0.25
);
// Problem and solver
ProblemPtr
problem
=
Problem
::
create
(
"POV 3D"
);
CeresManager
ceres_mgr
(
problem
);
ProblemPtr
problem
_ptr
=
Problem
::
create
(
"POV 3D"
);
CeresManager
ceres_mgr
(
problem
_ptr
);
// Two frames
FrameBasePtr
frm0
=
problem
->
emplaceFrame
(
KEY_FRAME
,
problem
->
zeroState
(),
TimeStamp
(
0
));
FrameBasePtr
frm0
=
problem
_ptr
->
emplaceFrame
(
KEY_FRAME
,
problem
_ptr
->
zeroState
(),
TimeStamp
(
0
));
// Capture, feature and constraint
CaptureBasePtr
cap0
=
frm0
->
addCapture
(
std
::
make_shared
<
CaptureMotion
>
(
"IMU ABS"
,
0
,
nullptr
,
pose10
,
10
,
9
,
nullptr
));
...
...
@@ -53,7 +53,7 @@ TEST(ConstraintBlockAbs, ctr_block_abs_p)
FeatureBasePtr
fea0
=
cap0
->
addFeature
(
std
::
make_shared
<
FeatureBase
>
(
"POSITION"
,
pose10
.
head
<
3
>
(),
data_cov
.
topLeftCorner
<
3
,
3
>
()));
fea0
->
addConstraint
(
std
::
make_shared
<
ConstraintBlockAbsolute
>
(
fea0
->
getFramePtr
()
->
getPPtr
()));
ASSERT_TRUE
(
problem
->
check
(
0
));
ASSERT_TRUE
(
problem
_ptr
->
check
(
0
));
// Unfix frame 0, perturb frm0
frm0
->
unfix
();
...
...
@@ -87,7 +87,7 @@ TEST(ConstraintBlockAbs, ctr_block_abs_v)
FeatureBasePtr
fea0
=
cap0
->
addFeature
(
std
::
make_shared
<
FeatureBase
>
(
"VELOCITY"
,
pose10
.
tail
<
3
>
(),
data_cov
.
bottomRightCorner
<
3
,
3
>
()));
fea0
->
addConstraint
(
std
::
make_shared
<
ConstraintBlockAbsolute
>
(
fea0
->
getFramePtr
()
->
getVPtr
()));
ASSERT_TRUE
(
problem
->
check
(
0
));
ASSERT_TRUE
(
problem
_ptr
->
check
(
0
));
// Unfix frame 0, perturb frm0
frm0
->
unfix
();
...
...
@@ -105,7 +105,7 @@ TEST(ConstraintQuatAbs, ctr_block_abs_o)
FeatureBasePtr
fea0
=
cap0
->
addFeature
(
std
::
make_shared
<
FeatureBase
>
(
"QUATERNION"
,
pose10
.
segment
<
4
>
(
3
),
data_cov
.
block
<
3
,
3
>
(
3
,
3
)));
fea0
->
addConstraint
(
std
::
make_shared
<
ConstraintQuaternionAbsolute
>
(
fea0
->
getFramePtr
()
->
getOPtr
()));
ASSERT_TRUE
(
problem
->
check
(
0
));
ASSERT_TRUE
(
problem
_ptr
->
check
(
0
));
// Unfix frame 0, perturb frm0
frm0
->
unfix
();
...
...
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