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
024d3436
Commit
024d3436
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-FactorDist3D' into devel
parents
0b5aa500
739a52e6
No related branches found
No related tags found
No related merge requests found
Pipeline
#3381
passed
6 years ago
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/core/factor/factor_autodiff_distance_3D.h
+6
-1
6 additions, 1 deletion
include/core/factor/factor_autodiff_distance_3D.h
with
6 additions
and
1 deletion
include/core/factor/factor_autodiff_distance_3D.h
+
6
−
1
View file @
024d3436
...
...
@@ -50,7 +50,12 @@ class FactorAutodiffDistance3D : public FactorAutodiff<FactorAutodiffDistance3D,
Map
<
const
Matrix
<
T
,
3
,
1
>>
pos2
(
_pos2
);
Map
<
Matrix
<
T
,
1
,
1
>>
res
(
_residual
);
Matrix
<
T
,
1
,
1
>
dist_exp
(
sqrt
(
(
pos2
-
pos1
).
squaredNorm
()
)
);
// If pos2 and pos1 are the same, undefined behavior when computing the jacobian
T
norm_squared
=
(
pos2
-
pos1
).
squaredNorm
();
if
(
norm_squared
<
(
T
)
1e-8
){
norm_squared
+=
(
T
)
1e-8
;
}
Matrix
<
T
,
1
,
1
>
dist_exp
(
sqrt
(
norm_squared
)
);
Matrix
<
T
,
1
,
1
>
dist_meas
(
getMeasurement
().
cast
<
T
>
()
);
Matrix
<
T
,
1
,
1
>
sqrt_info_upper
=
getMeasurementSquareRootInformationUpper
().
cast
<
T
>
();
...
...
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