Go to the documentation of this file.
4 #include "../csm_all.h"
7 options_double(
ops,
"hsm_linear_cell_size", &
p->linear_cell_size, 0.03,
"HSM: Size of a rho cell");
8 options_double(
ops,
"hsm_angular_cell_size_deg", &
p->angular_cell_size_deg, 1.0,
"HSM: Size of angualar cell (deg)");
9 options_int(
ops,
"hsm_num_angular_hypotheses", &
p->num_angular_hypotheses, 8,
"HSM: Number of angular hypotheses.");
10 options_double(
ops,
"hsm_xc_directions_min_distance_deg", &
p->xc_directions_min_distance_deg, 10.0,
"HSM: Min distance between directions for cross corr (deg)");
11 options_int(
ops,
"hsm_xc_ndirections", &
p->xc_ndirections, 3,
"HSM: Number of directions for cross corr (deg)");
12 options_double(
ops,
"hsm_angular_hyp_min_distance_deg", &
p->angular_hyp_min_distance_deg, 10.0,
"HSM: Min distance between different angular hypotheses (deg)");
14 options_int(
ops,
"hsm_linear_xc_max_npeaks", &
p->linear_xc_max_npeaks, 5,
"HSM: Number of peaks per direction for linear translation");
15 options_double(
ops,
"hsm_linear_xc_peaks_min_distance", &
p->linear_xc_peaks_min_distance, 5.0,
"HSM: Min distance between different peaks in linear correlation");
26 if(!(max_reading>0)) {
31 p->max_norm =
norm_d(base) + max_reading;
38 for(
int i=0; i<ld->
nrays; i++) {
46 sm_debug(
"Computed HT with %d points.\n", np);
59 params->first_guess[0]=0.2;
67 if(has_true1 && has_true2) {
68 params->hsm.debug_true_x_valid = 1;
77 params->hsm.debug_true_x_valid = 0;
80 double zero[3] = {0,0,0};
86 sm_error(
"Could not compute buffers (too few points?).\n");
118 sm_error(
"HSM did not produce any result.\n");
int any_nan(const double *d, int n)
void sm_debug(const char *msg,...)
void hsm_compute_spectrum(hsm_buffer b)
double max_in_array(const double *v, int n)
INLINE int ld_valid_ray(LDP ld, int i)
double *restrict readings
void options_double(struct option *, const char *name, double *p, double def_value, const char *desc)
const char * friendly_pose(const double *pose)
void pose_diff_d(const double pose2[3], const double pose1[3], double res[3])
void hsm_match(struct hsm_params *p, hsm_buffer b1, hsm_buffer b2)
void options_int(struct option *, const char *name, int *p, int def_value, const char *desc)
hsm_buffer hsm_buffer_alloc(struct hsm_params *p)
int hsm_compute_ht_for_scan(LDP ld, struct hsm_params *p, const double base[3], hsm_buffer *b)
void sm_info(const char *msg,...)
double norm_d(const double p[2])
void hsm_add_options(struct option *ops, struct hsm_params *p)
void hsm_buffer_free(hsm_buffer b)
void sm_error(const char *msg,...)
void ld_compute_cartesian(LDP ld)
void oplus_d(const double x1[3], const double x2[3], double res[3])
void hsm_compute_ht_point(hsm_buffer b, double x0, double y0, double weight)
void sm_hsm(struct sm_params *params, struct sm_result *res)
void hsm_compute_ht_base(hsm_buffer b, const double base_pose[3])
csm
Author(s): Andrea Censi
autogenerated on Wed Aug 17 2022 02:50:33