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
5c1c2847
Commit
5c1c2847
authored
18 years ago
by
Andrea Censi
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
e2df0a9c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sm/lib/gpc/gpc_utils.c
+4
-2
4 additions, 2 deletions
sm/lib/gpc/gpc_utils.c
sm/src/icp/icp_loop.c
+5
-2
5 additions, 2 deletions
sm/src/icp/icp_loop.c
with
9 additions
and
4 deletions
sm/lib/gpc/gpc_utils.c
+
4
−
2
View file @
5c1c2847
...
...
@@ -43,6 +43,8 @@ double m_det(const gsl_matrix*A) {
int
sign
;
gsl_linalg_LU_decomp
(
m
,
perm
,
&
sign
);
double
det
=
gsl_linalg_LU_det
(
m
,
sign
);
gsl_permutation_free
(
perm
);
gsl_matrix_free
(
m
);
return
det
;
}
...
...
@@ -63,12 +65,12 @@ double poly_greatest_real_root(unsigned int n, double*a) {
double
lambda
=
0
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
n
-
1
;
i
++
)
{
printf
(
"z%d = %+.18f %+.18f
\n
"
,
i
,
z
[
2
*
i
],
z
[
2
*
i
+
1
]);
//
printf ("z%d = %+.18f %+.18f\n", i, z[2*i], z[2*i+1]);
// XXX ==0 is bad
if
(
(
z
[
2
*
i
+
1
]
==
0
)
&&
(
z
[
2
*
i
]
>
lambda
))
lambda
=
z
[
2
*
i
];
}
printf
(
"lambda = %+.18f
\n
"
,
lambda
);
//
printf ("lambda = %+.18f \n", lambda);
return
lambda
;
}
...
...
This diff is collapsed.
Click to expand it.
sm/src/icp/icp_loop.c
+
5
−
2
View file @
5c1c2847
...
...
@@ -136,7 +136,10 @@ void sm_icp(struct sm_params*params, struct sm_result*res) {
res
->
error
=
best_error
;
res
->
iterations
=
iterations
;
res
->
nvalid
=
nvalid
;
gsl_vector_free
(
x_new
);
gsl_vector_free
(
x_old
);
gsl_vector_free
(
best_x
);
egsl_pop
();
}
...
...
@@ -191,7 +194,7 @@ void icp_loop(struct sm_params*params, const gsl_vector*start, gsl_vector*x_new,
break
;
}
//
kill_outliers_double(params, x_old);
kill_outliers_double
(
params
,
x_old
);
int
num_corr2
=
ld_num_valid_correspondences
(
laser_sens
);
double
error
=
0
;
...
...
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