laser_data.h
Go to the documentation of this file.
1 #ifndef H_LASER_DATA
2 #define H_LASER_DATA
3 
4 #include <sys/time.h>
5 #include <stdio.h>
6 
7 #include "restrict.h"
8 
9 struct correspondence;
10 
11 typedef struct {
12  double p[2];
13  double rho, phi;
14 } point2d;
15 
16 struct laser_data {
17  int nrays;
18  double min_theta;
19  double max_theta;
20 
21  double * restrict theta;
22 
23  int * restrict valid;
24  double * restrict readings;
25 
27 
28  double * restrict alpha;
29  double * restrict cov_alpha;
31 
33 
34  double * restrict true_alpha;
35 
37 
38  double true_pose[3];
39  double odometry[3];
40  double estimate[3];
41 
42 
48 
50  struct timeval tv;
51  char hostname[32];
52 
53 
54  /* Jump tables needed by find_correspondences_tricks(). */
55  int * restrict up_bigger,
57  * restrict down_bigger,
58  * restrict down_smaller;
59 };
60 
63  int valid;
65  int j1;
67  int j2;
69  enum { corr_pp = 0, corr_pl = 1} type;
71  double dist2_j1;
72 };
73 
74 typedef struct laser_data* LDP;
75 
77 LDP ld_alloc_new(int nrays);
78 
80 void ld_free(LDP);
81 
83 void ld_alloc(LDP, int nrays);
84 
86 void ld_dealloc(LDP);
87 
89 void ld_compute_cartesian(LDP);
90 
92 void ld_compute_world_coords(LDP, const double *pose);
93 
95 void ld_create_jump_tables(LDP);
96 
98 unsigned int ld_corr_hash(LDP);
99 
102 
104 int ld_valid_fields(LDP);
105 
107 void ld_simple_clustering(LDP ld, double threshold);
108 
110 void ld_compute_orientation(LDP ld, int size_neighbourhood, double sigma);
111 
112 
113 
114 
121 LDP ld_read_smart(FILE*);
122 
126 LDP ld_read_smart_string(const char*);
127 
128 
133 int ld_read_next_laser_carmen(FILE*, LDP*ld);
134 
136 LDP ld_from_carmen_string(const char*line);
137 
139 int ld_read_all(FILE*file, LDP **array, int*num);
140 
142 int ld_read_some_scans(FILE*file, LDP **array, int*num, int interval);
143 
145 void ld_write_as_carmen(LDP ld, FILE * stream);
146 
148 void ld_write_format(LDP ld, FILE*stream, const char * out_format);
149 
150 
151 void possible_interval(
152  const double *p_i_w, LDP laser_sens,
153  double max_angular_correction_deg, double max_linear_correction, int*from, int*to, int*start_cell);
154 
155 
156 #include "laser_data_inline.h"
157 
158 #endif
159 
double dist2_j1
Definition: laser_data.h:71
LDP ld_from_carmen_string(const char *line)
double *restrict cov_alpha
Definition: laser_data.h:29
int *restrict valid
Definition: laser_data.h:23
void ld_create_jump_tables(LDP)
point2d *restrict points
Definition: laser_data.h:44
struct laser_data * LDP
Definition: laser_data.h:74
double max_theta
Definition: laser_data.h:19
double min_theta
Definition: laser_data.h:18
double rho
Definition: laser_data.h:13
double *restrict readings_sigma
Definition: laser_data.h:32
void ld_compute_world_coords(LDP, const double *pose)
Definition: laser_data.c:133
int *restrict cluster
Definition: laser_data.h:26
double *restrict theta
Definition: laser_data.h:21
void ld_compute_orientation(LDP ld, int size_neighbourhood, double sigma)
Definition: orientation.c:14
void ld_free(LDP)
Definition: laser_data.c:87
void ld_compute_cartesian(LDP)
Definition: laser_data.c:118
enum correspondence::@5 type
void ld_write_as_carmen(LDP ld, FILE *stream)
LDP ld_read_smart_string(const char *)
unsigned int ld_corr_hash(LDP)
Definition: laser_data.c:267
LDP ld_read_smart(FILE *)
void possible_interval(const double *p_i_w, LDP laser_sens, double max_angular_correction_deg, double max_linear_correction, int *from, int *to, int *start_cell)
Definition: math_utils.c:10
double *restrict true_alpha
Definition: laser_data.h:34
int *restrict *restrict up_smaller
Definition: laser_data.h:55
double *restrict readings
Definition: laser_data.h:24
#define restrict
Definition: restrict.h:17
int ld_read_all(FILE *file, LDP **array, int *num)
struct @0 p
void ld_simple_clustering(LDP ld, double threshold)
Definition: clustering.c:11
int ld_num_valid_correspondences(LDP)
Definition: laser_data.c:168
void ld_alloc(LDP, int nrays)
Definition: laser_data.c:34
int *restrict alpha_valid
Definition: laser_data.h:30
int ld_read_next_laser_carmen(FILE *, LDP *ld)
point2d *restrict points_w
Definition: laser_data.h:47
int ld_valid_fields(LDP)
Definition: laser_data.c:179
LDP ld_alloc_new(int nrays)
Definition: laser_data.c:12
void ld_dealloc(LDP)
struct correspondence *restrict corr
Definition: laser_data.h:36
int ld_read_some_scans(FILE *file, LDP **array, int *num, int interval)
double *restrict alpha
Definition: laser_data.h:28
double interval
Definition: ld_resample.c:12
void ld_write_format(LDP ld, FILE *stream, const char *out_format)


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23