3 #include "../csm/csm_all.h" 7 int main(
int argc,
const char*argv[]) {
12 const char * filename = argv[1];
13 file = fopen(filename,
"r");
15 fprintf(stderr,
"Could not open '%s'.\n", filename);
47 int num_matchings = 0;
48 int num_iterations = 0;
49 clock_t start = clock();
52 printf(
"Could not read first scan.\n");
56 gsl_vector *u = gsl_vector_alloc(3);
57 gsl_vector *x_old = gsl_vector_alloc(3);
58 gsl_vector *x_new = gsl_vector_alloc(3);
75 clock_t end = clock();
76 float seconds = (end-start)/((
float)CLOCKS_PER_SEC);
78 sm_debug(
"sm0: CPU time = %f (seconds) (start=%d end=%d)\n", seconds,(
int)start,(
int)end);
79 sm_debug(
"sm0: Total number of matchings = %d\n", num_matchings);
80 sm_debug(
"sm0: Total number of iterations = %d\n", num_iterations);
81 sm_debug(
"sm0: Avg. iterations per matching = %f\n", num_iterations/((
float)num_matchings));
82 sm_debug(
"sm0: Avg. seconds per matching = %f\n", seconds/num_matchings);
83 sm_debug(
"sm0: that is, %d matchings per second\n", (
int)floor(num_matchings/seconds));
84 sm_debug(
"sm0: Avg. seconds per iteration = %f (note: very imprecise)\n", seconds/num_iterations);
86 sm_debug(
"sm0: Avg. comparisons per ray = %f \n",
92 gsl_vector_free(x_old);
93 gsl_vector_free(x_new);
double max_angular_correction_deg
void copy_from_array(gsl_vector *v, double *x)
int orientation_neighbourhood
double clustering_threshold
int main(int argc, const char *argv[])
double max_linear_correction
LDP ld_read_smart(FILE *)
double outliers_adaptive_mult
double restart_threshold_mean_error
double max_correspondence_dist
void pose_diff(const gsl_vector *pose2, const gsl_vector *pose1, gsl_vector *res)
void sm_debug(const char *msg,...)
int do_compute_covariance
double outliers_adaptive_order
void sm_gpm(struct sm_params *input, struct sm_result *output)
void vector_to_array(const gsl_vector *v, double *x)