Introduction | Files | Utilities | Gallery | ToDo list

lodo.h

Go to the documentation of this file.
00001 /* 00002 LODO library: laser-stabilized odometry 00003 Copyright (C) 2004 Andrew Howard ahoward@usc.edu 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00099 #ifndef LODO_H 00100 #define LODO_H 00101 00102 #ifdef __cplusplus 00103 extern "C" 00104 { 00105 #endif 00106 00107 #include <gsl/gsl_min.h> 00108 #include "slap.h" 00109 00110 00112 #define LODO_MAX_RANGES 401 00113 00114 00116 typedef struct 00117 { 00119 pose2_t opose; 00120 00122 pose2_t cpose; 00123 00125 double ranges[LODO_MAX_RANGES]; 00126 00127 } lodo_scan_t; 00128 00129 00131 typedef struct 00132 { 00134 vector3_t local; 00135 00137 vector3_t polar; 00138 00139 } lodo_map_point_t; 00140 00141 00143 typedef struct 00144 { 00146 int ni; 00147 00148 } lodo_scan_point_t; 00149 00150 00152 typedef struct 00153 { 00155 int num_ranges; 00156 00158 double range_max; 00159 00161 double range_start; 00162 00164 double range_step; 00165 00167 pose2_t laser_pose; 00168 00170 double max_error; 00171 00173 int pef_num_ranges, pef_num_bearings; 00174 00176 double pef_range_start, pef_range_step; 00177 00181 double pef_bearing_start, pef_bearing_step; 00182 00184 int pef_size; 00185 int *pef; 00186 00189 double fit_interval; 00190 00193 double fit_err_thresh; 00194 00197 double fit_outlier_dist; 00198 00201 double fit_outlier_frac; 00202 00204 double odom_dist, odom_turn; 00205 00207 double map_dist_interval, map_turn_interval; 00208 00210 double map_last_dist, map_last_turn; 00211 00213 int map_scan_count, max_map_scans; 00214 lodo_scan_t *map_scans; 00215 00217 int scan_count; 00218 lodo_scan_t scan; 00219 00221 lodo_scan_point_t scan_points[LODO_MAX_RANGES]; 00222 00224 int num_map_points, max_map_points; 00225 lodo_map_point_t *map_points; 00226 00228 gsl_min_fminimizer *mini; 00229 00231 double fit_correct; 00232 00234 int fit_valid; 00235 00237 int fit_add; 00238 00239 } lodo_t; 00240 00241 00250 lodo_t *lodo_alloc(int num_ranges, double range_max, double range_res, 00251 double range_start, double range_step); 00252 00254 void lodo_free(lodo_t *self); 00255 00262 pose2_t lodo_add_scan(lodo_t *self, pose2_t odom_pose, int num_ranges, double *ranges); 00263 00266 void lodo_project_map(lodo_t *self); 00267 00270 void lodo_project_map_free(lodo_t *self, lodo_scan_t *scan_m, 00271 matrix33_t Pd, matrix33_t Pm); 00272 00275 double lodo_correct(lodo_t *self); 00276 00279 double lodo_test_offset(lodo_t *self, double offset, double *outliers); 00280 00282 void lodo_print_map(lodo_t *self); 00283 00285 void lodo_print_pef(lodo_t *self); 00286 00288 void lodo_print_err(lodo_t *self); 00289 00291 void lodo_draw_scan(lodo_t *self, lodo_scan_t *scan); 00292 00294 void lodo_draw_map(lodo_t *self); 00295 00296 #ifdef __cplusplus 00297 } 00298 #endif 00299 00300 #endif

Generated on Tue Dec 14 14:37:39 2004 for Simple map utilities by doxygen 1.3.8