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
fdfc6963
Commit
fdfc6963
authored
8 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
[WIP] debug test, seems a Jac issue
parent
88d9c7bd
No related branches found
No related tags found
1 merge request
!101
Visual SLAM starts to work.
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/constraint_AHP.h
+13
-12
13 additions, 12 deletions
src/constraint_AHP.h
src/examples/test_simple_AHP.cpp
+129
-243
129 additions, 243 deletions
src/examples/test_simple_AHP.cpp
with
142 additions
and
255 deletions
src/constraint_AHP.h
+
13
−
12
View file @
fdfc6963
...
...
@@ -140,23 +140,21 @@ class ConstraintAHP : public ConstraintSparse<2, 3, 4, 3, 4, 4>
const
T
*
const
_anchor_frame_o
,
const
T
*
const
_lmk_hmg
,
T
*
_residuals
)
const
{
std
::
cout
<<
"operator"
<<
std
::
endl
;
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
1
>
u
(
2
)
;
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
1
>
expected
(
2
)
;
expectation
(
_current_frame_p
,
_current_frame_o
,
_anchor_frame_p
,
_anchor_frame_o
,
_lmk_hmg
,
u
.
data
())
;
// ==================================================
_anchor_frame_o
,
_lmk_hmg
,
expected
.
data
())
;
// std::cout << "\nCONSTRAINT INFO" << std::endl;
WOLF_DEBUG_HERE
Eigen
::
Matrix
<
T
,
2
,
1
>
feature_pos
=
getMeasurement
().
cast
<
T
>
();
Eigen
::
Matrix
<
T
,
2
,
1
>
measured
=
getMeasurement
().
cast
<
T
>
();
Eigen
::
Map
<
Eigen
::
Matrix
<
T
,
2
,
1
>
>
residuals
map
(
_residuals
);
Eigen
::
Map
<
Eigen
::
Matrix
<
T
,
2
,
1
>
>
residuals
(
_residuals
);
// std::cout << "SquareRootInformation: " <<
getMeasurementSquareRootInformation()
<< std::endl
;
residuals
=
getMeasurementSquareRootInformation
()
.
cast
<
T
>
()
*
(
expected
-
measured
)
;
residualsmap
=
getMeasurementSquareRootInformation
().
cast
<
T
>
()
*
(
u
-
feature_pos
);
// debug info:
Eigen
::
Map
<
const
Eigen
::
Matrix
<
T
,
4
,
1
>
>
landmark
(
_lmk_hmg
);
std
::
cout
<<
"
\n
LANDMARK L"
<<
getLandmarkOtherPtr
()
->
id
()
<<
":
\n\t
"
<<
landmark
[
0
]
<<
"
\n\t
"
<<
landmark
[
1
]
<<
"
\n\t
"
<<
landmark
[
2
]
<<
"
\n\t
"
<<
landmark
[
3
]
<<
std
::
endl
;
std
::
cout
<<
"
\n
RESIDUALS c"
<<
id
()
<<
":
\n\t
"
<<
residuals
[
0
]
<<
"
\n\t
"
<<
residuals
[
1
]
<<
std
::
endl
;
std
::
cout
<<
"
\n
RESIDUALS:
\n\t
"
<<
residualsmap
[
0
]
<<
"
\n\t
"
<<
residualsmap
[
1
]
<<
std
::
endl
;
WOLF_DEBUG_HERE
return
true
;
}
...
...
@@ -169,8 +167,11 @@ class ConstraintAHP : public ConstraintSparse<2, 3, 4, 3, 4, 4>
static
ConstraintAHP
::
Ptr
create
(
FeatureBasePtr
_ftr_ptr
,
FrameBasePtr
_frm_current_ptr
,
LandmarkAHP
::
Ptr
_lmk_ahp_ptr
)
{
// construct constraint
Ptr
ctr_ahp
=
std
::
make_shared
<
ConstraintAHP
>
(
_ftr_ptr
,
_frm_current_ptr
,
_lmk_ahp_ptr
);
_ftr_ptr
->
addConstraint
(
ctr_ahp
);
// link it to wolf tree
// _ftr_ptr->addConstraint(ctr_ahp);
ctr_ahp
->
setFrameOtherPtr
(
_lmk_ahp_ptr
->
getAnchorFrame
());
_lmk_ahp_ptr
->
getAnchorFrame
()
->
addConstrainedBy
(
ctr_ahp
);
_lmk_ahp_ptr
->
addConstrainedBy
(
ctr_ahp
);
...
...
This diff is collapsed.
Click to expand it.
src/examples/test_simple_AHP.cpp
+
129
−
243
View file @
fdfc6963
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