Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
labrobotica
algorithms
csm
Commits
00ebdd3e
Commit
00ebdd3e
authored
15 years ago
by
Andrea Censi
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
e770b01d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/matlab/icp/icp_covariance.m
+24
-2
24 additions, 2 deletions
misc/matlab/icp/icp_covariance.m
with
24 additions
and
2 deletions
misc/matlab/icp/icp_covariance.m
+
24
−
2
View file @
00ebdd3e
function
res
=
icp_covariance
(
params
,
current_estimate
,
P
,
valids
,
jindexes
)
function
res
=
icp_covariance
(
params
,
current_estimate
,
P
,
valids
,
jindexes
)
% res = icp_covariance(params, current_estimate, P, valids, jindexes)
%
% Compute the covariance of the ICP estimate.
%
% params.laser_sens laser data structure describing sensor scan
% params.laser_ref laser data structure describing reference scan
%
% Fields used:
% laser_*.nrays number of rays
% laser_*.points 2xnrays vector of readings in cartesian coordinates
%
% params.sigma sigma of noise on readings
% current_estimate solution found by ICP: pose of laser_sens in laser_ref reference frame
% valids nrays x 1 vector: valids(i) == 1 if the i-th point in laser_sens has valid correspondences
% jindexes nrays x 2 correspondences: jindexes(i,1), jindexes(i,2) are the indices
% of the closest points in laser_ref of the i-th point in laser_sens
%
% P unused (probably legacy from some old code)
%
k
=
1
;
k
=
1
;
Etot
=
0
;
Etot
=
0
;
...
@@ -21,8 +40,11 @@ function res = icp_covariance(params, current_estimate, P, valids, jindexes)
...
@@ -21,8 +40,11 @@ function res = icp_covariance(params, current_estimate, P, valids, jindexes)
dgE_di
=
zeros
(
3
,
params
.
laser_sens
.
nrays
);
dgE_di
=
zeros
(
3
,
params
.
laser_sens
.
nrays
);
dgE_dj
=
zeros
(
3
,
params
.
laser_ref
.
nrays
);
dgE_dj
=
zeros
(
3
,
params
.
laser_ref
.
nrays
);
% let's iterate on the "valid" points of laser_sens
for
a
=
find
(
valids
)
for
a
=
find
(
valids
)
% index of point in laser_sens
i
=
a
;
i
=
a
;
% indices of the two corresponding points in laser_ref
j1
=
jindexes
(
i
,
1
);
j1
=
jindexes
(
i
,
1
);
j2
=
jindexes
(
i
,
2
);
j2
=
jindexes
(
i
,
2
);
...
@@ -124,9 +146,9 @@ function res = icp_covariance(params, current_estimate, P, valids, jindexes)
...
@@ -124,9 +146,9 @@ function res = icp_covariance(params, current_estimate, P, valids, jindexes)
res
.
sm_cov_bengtsson_improved
=
s2
*
inv
(
MMtot
);
res
.
sm_cov_bengtsson_improved
=
s2
*
inv
(
MMtot
);
fprintf
(
'
ECCOLE:
improved:'
);
fprintf
(
'
Bengtsson,
improved:'
);
res
.
sm_cov_bengtsson_improved
res
.
sm_cov_bengtsson_improved
fprintf
(
'
ECCOLE:
original:'
)
fprintf
(
'
Bengtsson,
original:'
)
res
.
sm_cov_bengtsson
res
.
sm_cov_bengtsson
%res
%res
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