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
dcb7a4c8
Commit
dcb7a4c8
authored
8 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Using new method point()
parent
31c9833f
No related branches found
No related tags found
1 merge request
!101
Visual SLAM starts to work.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/examples/test_simple_AHP.cpp
+5
-3
5 additions, 3 deletions
src/examples/test_simple_AHP.cpp
with
5 additions
and
3 deletions
src/examples/test_simple_AHP.cpp
+
5
−
3
View file @
dcb7a4c8
...
...
@@ -156,6 +156,7 @@ int main(int argc, char** argv)
std
::
shared_ptr
<
LandmarkAHP
>
lmk_1
=
std
::
make_shared
<
LandmarkAHP
>
(
lmk_hmg_c
,
kf_1
,
camera
,
desc
);
problem
->
addLandmark
(
lmk_1
);
lmk_1
->
setStatus
(
LANDMARK_FIXED
);
std
::
cout
<<
"Landmark 1: "
<<
lmk_1
->
point
().
transpose
()
<<
std
::
endl
;
// Constraints------------------
ConstraintAHP
::
Ptr
ctr_0
=
ConstraintAHP
::
create
(
feat_0
,
kf_2
,
lmk_1
);
...
...
@@ -206,6 +207,7 @@ int main(int argc, char** argv)
pnt_hmg_0
<<
dir_0
,
1
/
unknown_distance
;
LandmarkAHP
::
Ptr
lmk_2
(
std
::
make_shared
<
LandmarkAHP
>
(
pnt_hmg_0
,
kf_2
,
camera
,
desc
)
);
problem
->
addLandmark
(
lmk_2
);
std
::
cout
<<
"Landmark 2: "
<<
lmk_2
->
point
().
transpose
()
<<
std
::
endl
;
// New constraints from kf3 and kf4
ConstraintAHP
::
Ptr
ctr_3
=
ConstraintAHP
::
create
(
feat_3
,
kf_3
,
lmk_2
);
...
...
@@ -246,11 +248,11 @@ int main(int argc, char** argv)
std
::
cout
<<
summary
.
FullReport
()
<<
std
::
endl
;
// Test of convergence over the lmk params
bool
pass
=
(
lmk_2
->
getP
oint
3D
()
-
lmk_1
->
getP
oint
3D
()).
isMuchSmallerThan
(
1
,
Constants
::
EPS
);
bool
pass
=
(
lmk_2
->
p
oint
()
-
lmk_1
->
p
oint
()).
isMuchSmallerThan
(
1
,
Constants
::
EPS
);
std
::
cout
<<
"Landmark 2 below should have converged to Landmark 1:"
<<
std
::
endl
;
std
::
cout
<<
"Landmark 1: "
<<
lmk_1
->
getP
oint
3D
().
transpose
()
<<
std
::
endl
;
std
::
cout
<<
"Landmark 2: "
<<
lmk_2
->
getP
oint
3D
().
transpose
()
<<
std
::
endl
;
std
::
cout
<<
"Landmark 1: "
<<
lmk_1
->
p
oint
().
transpose
()
<<
std
::
endl
;
std
::
cout
<<
"Landmark 2: "
<<
lmk_2
->
p
oint
().
transpose
()
<<
std
::
endl
;
std
::
cout
<<
"Landmark convergence test "
<<
(
pass
?
"PASSED"
:
"FAILED"
)
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
...
...
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