amcl_laser.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00021
00022
00023
00024
00025
00026
00028
00029 #ifndef AMCL_LASER_H
00030 #define AMCL_LASER_H
00031
00032 #include "amcl_sensor.h"
00033 #include "map/map.h"
00034 #include "models/laser.h"
00035
00036
00037 class AMCLLaserData : public AMCLSensorData
00038 {
00039 public:
00040 AMCLLaserData () {ranges=NULL;};
00041 virtual ~AMCLLaserData() {delete [] ranges;};
00042
00043 public: int range_count;
00044 public: double range_max;
00045 public: double (*ranges)[2];
00046 };
00047
00048
00049
00050 class AMCLLaser : public AMCLSensor
00051 {
00052
00053 public: AMCLLaser(AdaptiveMCL & aAMCL, player_devaddr_t addr);
00054
00055
00056 public: virtual int Load(ConfigFile* cf, int section);
00057
00058
00059 public: virtual int Unload(void);
00060
00061
00062 public: virtual int Setup(void);
00063
00064
00065 public: virtual int Shutdown(void);
00066
00067
00068 public: virtual int ProcessMessage(QueuePointer &resp_queue,
00069 player_msghdr * hdr,
00070 void * data);
00071
00072
00073
00074
00075
00076 public: virtual bool UpdateSensor(pf_t *pf, AMCLSensorData *data);
00077
00078
00079 private: static double SensorModel(AMCLLaserData *data,
00080 pf_sample_set_t* set);
00081
00082
00083 private: int SetupMap(void);
00084
00085
00086 private: player_devaddr_t laser_addr;
00087 private: player_devaddr_t map_addr;
00088 private: Device *laser_dev;
00089
00090
00091 private: double time;
00092
00093
00094 private: map_t *map;
00095
00096
00097 private: pf_vector_t laser_pose;
00098
00099
00100 private: int max_beams;
00101
00102
00103 private: double range_var;
00104
00105
00106 private: double range_bad;
00107
00108 #ifdef INCLUDE_RTKGUI
00109
00110 private: virtual void SetupGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
00111
00112
00113 private: virtual void ShutdownGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
00114
00115
00116 public: virtual void UpdateGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig, AMCLSensorData *data);
00117
00118
00119 private: rtk_fig_t *fig, *map_fig;
00120 #endif
00121 };
00122
00123
00124
00125
00126 #endif
Last updated 12 September 2005 21:38:45
|