Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
laser_scan_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
labrobotica
algorithms
laser_scan_utils
Commits
b9d651b2
Commit
b9d651b2
authored
10 months ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
icp more outputs
parent
cf76a0ff
No related branches found
No related tags found
No related merge requests found
Pipeline
#18682
passed
10 months ago
Stage: license
Stage: none
Stage: csm
Stage: falko
Stage: csm_falko
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/laser_scan_utils/icp.h
+3
-1
3 additions, 1 deletion
include/laser_scan_utils/icp.h
src/icp.cpp
+5
-3
5 additions, 3 deletions
src/icp.cpp
with
8 additions
and
4 deletions
include/laser_scan_utils/icp.h
+
3
−
1
View file @
b9d651b2
...
...
@@ -39,6 +39,8 @@ namespace laserscanutils
Eigen
::
Matrix3s
res_covar
;
// Covariance of the transformation
int
nvalid
;
// Number of valid correspondences in the match
double
error
;
// Total correspondence error
double
mean_error
;
// Average error (total error / nvalid)
double
points_ratio
;
// Ratio of valid correspondences of totall amount of points
unsigned
int
attempts
;
// Number of ICP calls to obtain a valid result (<= params.icp_attempts)
};
...
...
@@ -124,7 +126,7 @@ namespace laserscanutils
double
cov_max_eigv_factor
;
// Factor multiplying the direction of the max eigenvalue of the cov output of csm
// Attempts ------------------------------------------------------------------
unsigned
int
icp_attempts
;
// number of icp attempts if result fails (not valid or error > restart_threshold_mean_error)
unsigned
int
icp_attempts
;
// number of icp attempts if result fails (not valid or error > restart_threshold_mean_error)
double
perturbation_new_attempts
;
// perturbation noise amplitude applied to initial guess in new attempts
void
print
()
const
...
...
This diff is collapsed.
Click to expand it.
src/icp.cpp
+
5
−
3
View file @
b9d651b2
...
...
@@ -178,6 +178,8 @@ icpOutput ICP::align(const LaserScan &_current_ls,
{
result
.
nvalid
=
csm_output
.
nvalid
;
result
.
error
=
csm_output
.
error
;
result
.
mean_error
=
csm_output
.
error
/
csm_output
.
nvalid
;
result
.
points_ratio
=
((
double
)
csm_output
.
nvalid
)
/
((
double
)
num_rays
);
result
.
res_transf
(
0
)
=
csm_output
.
x
[
0
];
result
.
res_transf
(
1
)
=
csm_output
.
x
[
1
];
result
.
res_transf
(
2
)
=
csm_output
.
x
[
2
];
...
...
@@ -218,13 +220,13 @@ icpOutput ICP::align(const LaserScan &_current_ls,
{
std
::
cout
<<
"Invalid result, trying again!"
<<
std
::
endl
;
}
if
(
_icp_params
.
verbose
and
result
.
error
>
_icp_params
.
restart_threshold_mean_error
and
result
.
attempts
<
_icp_params
.
icp_attempts
)
if
(
_icp_params
.
verbose
and
result
.
mean_
error
>
_icp_params
.
restart_threshold_mean_error
and
result
.
attempts
<
_icp_params
.
icp_attempts
)
{
std
::
cout
<<
"Error too big: "
<<
result
.
error
std
::
cout
<<
"Error too big: "
<<
result
.
mean_
error
<<
" ( should be < "
<<
_icp_params
.
restart_threshold_mean_error
<<
"). Trying again!"
<<
std
::
endl
;
}
}
while
((
not
result
.
valid
or
result
.
error
>
_icp_params
.
restart_threshold_mean_error
)
and
}
while
((
not
result
.
valid
or
result
.
mean_
error
>
_icp_params
.
restart_threshold_mean_error
)
and
result
.
attempts
<
_icp_params
.
icp_attempts
);
return
result
;
...
...
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