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
e970b211
Commit
e970b211
authored
5 years ago
by
Médéric Fourmy
Browse files
Options
Downloads
Patches
Plain Diff
Solved wrong size jacobian vector bug due to fix() + removed std couts
parent
2da7e787
No related branches found
No related tags found
1 merge request
!339
Adapting to multiple processor motion 285
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/core/factor/factor_block_difference.h
+18
-23
18 additions, 23 deletions
include/core/factor/factor_block_difference.h
with
18 additions
and
23 deletions
include/core/factor/factor_block_difference.h
+
18
−
23
View file @
e970b211
...
...
@@ -37,12 +37,12 @@ class FactorBlockDifference : public FactorAnalytic
*
*/
FactorBlockDifference
(
StateBlockPtr
_sb1_ptr
,
StateBlockPtr
_sb2_ptr
,
FrameBasePtr
_frame_other
=
nullptr
,
CaptureBasePtr
_cap_other
=
nullptr
,
FeatureBasePtr
_feat_other
=
nullptr
,
LandmarkBasePtr
_lmk_other
=
nullptr
,
const
StateBlockPtr
&
_sb1_ptr
,
const
StateBlockPtr
&
_sb2_ptr
,
const
FrameBasePtr
&
_frame_other
=
nullptr
,
const
CaptureBasePtr
&
_cap_other
=
nullptr
,
const
FeatureBasePtr
&
_feat_other
=
nullptr
,
const
LandmarkBasePtr
&
_lmk_other
=
nullptr
,
unsigned
int
_start_idx1
=
0
,
int
_size1
=
-
1
,
unsigned
int
_start_idx2
=
0
,
...
...
@@ -153,16 +153,13 @@ inline void FactorBlockDifference::evaluateJacobians(const std::vector<Eigen::Ma
assert
(
getMeasurementSquareRootInformationUpper
().
cols
()
==
J_res_sb1_
.
rows
()
&&
"Wrong jacobian sb1 or covariance size"
);
assert
(
getMeasurementSquareRootInformationUpper
().
cols
()
==
J_res_sb2_
.
rows
()
&&
"Wrong jacobian sb2 or covariance size"
);
std
::
cout
<<
"
\n
evaluateJacobians"
<<
std
::
endl
;
std
::
cout
<<
getMeasurementSquareRootInformationUpper
().
rows
()
<<
" "
<<
getMeasurementSquareRootInformationUpper
().
cols
()
<<
std
::
endl
;
std
::
cout
<<
J_res_sb1_
.
rows
()
<<
" "
<<
J_res_sb1_
.
cols
()
<<
std
::
endl
;
std
::
cout
<<
J_res_sb2_
.
rows
()
<<
" "
<<
J_res_sb2_
.
cols
()
<<
std
::
endl
;
std
::
cout
<<
_jacobians
[
0
].
rows
()
<<
" "
<<
_jacobians
[
0
].
cols
()
<<
std
::
endl
;
std
::
cout
<<
_jacobians
[
1
].
rows
()
<<
" "
<<
_jacobians
[
1
].
cols
()
<<
std
::
endl
;
// normalized jacobian
_jacobians
[
0
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb1_
;
_jacobians
[
1
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb2_
;
if
(
_jacobians
[
0
].
size
()
>
0
){
_jacobians
[
0
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb1_
;
}
if
(
_jacobians
[
1
].
size
()
>
0
){
_jacobians
[
1
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb2_
;
}
}
inline
void
FactorBlockDifference
::
evaluateJacobians
(
const
std
::
vector
<
Eigen
::
Map
<
const
Eigen
::
VectorXd
>>&
_st_vector
,
...
...
@@ -179,15 +176,13 @@ inline void FactorBlockDifference::evaluateJacobians(const std::vector<Eigen::Ma
assert
(
getMeasurementSquareRootInformationUpper
().
cols
()
==
J_res_sb1_
.
rows
()
&&
"Wrong jacobian sb1 or covariance size"
);
assert
(
getMeasurementSquareRootInformationUpper
().
cols
()
==
J_res_sb2_
.
rows
()
&&
"Wrong jacobian sb2 or covariance size"
);
std
::
cout
<<
"
\n
evaluateJacobians"
<<
std
::
endl
;
std
::
cout
<<
getMeasurementSquareRootInformationUpper
().
rows
()
<<
" "
<<
getMeasurementSquareRootInformationUpper
().
cols
()
<<
std
::
endl
;
std
::
cout
<<
J_res_sb1_
.
rows
()
<<
" "
<<
J_res_sb1_
.
cols
()
<<
std
::
endl
;
std
::
cout
<<
J_res_sb2_
.
rows
()
<<
" "
<<
J_res_sb2_
.
cols
()
<<
std
::
endl
;
std
::
cout
<<
_jacobians
[
0
].
rows
()
<<
" "
<<
_jacobians
[
0
].
cols
()
<<
std
::
endl
;
std
::
cout
<<
_jacobians
[
1
].
rows
()
<<
" "
<<
_jacobians
[
1
].
cols
()
<<
std
::
endl
;
// normalized jacobian
_jacobians
[
0
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb1_
;
_jacobians
[
1
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb2_
;
if
(
_jacobians
[
0
].
size
()
>
0
){
_jacobians
[
0
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb1_
;
}
if
(
_jacobians
[
1
].
size
()
>
0
){
_jacobians
[
1
]
=
getMeasurementSquareRootInformationUpper
()
*
J_res_sb2_
;
}
}
inline
void
FactorBlockDifference
::
evaluatePureJacobians
(
std
::
vector
<
Eigen
::
MatrixXd
>&
_pure_jacobians
)
const
...
...
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