|
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
sonar.hGo to the documentation of this file.00001 00002 /************************************************************************** 00003 * Desc: Sensor models for the sonar sensor. 00004 * Author: Andrew Howard 00005 * Date: 15 Dec 2002 00006 * CVS: $Id: sonar.h,v 1.2 2003/05/08 17:22:19 inspectorg Exp $ 00007 *************************************************************************/ 00008 00009 #ifndef SONAR_H 00010 #define SONAR_H 00011 00012 #include "../pf/pf.h" 00013 #include "../map/map.h" 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 #define SONAR_MAX_RANGES 32 00020 00021 // Model information 00022 typedef struct 00023 { 00024 // Pointer to the map 00025 map_t *map; 00026 00027 // Pose of sonars relative to robot 00028 int pose_count; 00029 pf_vector_t poses[SONAR_MAX_RANGES]; 00030 00031 // Covariance in the range reading 00032 double range_cov; 00033 00034 // Probability of spurious range readings 00035 double range_bad; 00036 00037 // Maximum valid range value 00038 double range_max; 00039 00040 // Pre-computed sonar sensor model 00041 int lut_size; 00042 double lut_res; 00043 double *lut_probs; 00044 00045 // Sonar range values 00046 int range_count; 00047 double ranges[SONAR_MAX_RANGES]; 00048 00049 } sonar_t; 00050 00051 00052 // Create an sensor model 00053 sonar_t *sonar_alloc(map_t *map, int pose_count, pf_vector_t *poses); 00054 00055 // Free an sensor model 00056 void sonar_free(sonar_t *sensor); 00057 00058 // Clear all existing range readings 00059 void sonar_clear_ranges(sonar_t *sensor); 00060 00061 // Set the sonar range readings that will be used. 00062 void sonar_add_range(sonar_t *sensor, double range); 00063 00064 // The sensor model function 00065 double sonar_sensor_model(sonar_t *sensor, pf_vector_t pose); 00066 00067 00068 #ifdef __cplusplus 00069 } 00070 #endif 00071 00072 #endif 00073 Generated on Tue May 3 14:15:36 2005 for Player by 1.3.6 |