amcl_odom.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_ODOM_H
00030 #define AMCL_ODOM_H
00031
00032 #include "amcl_sensor.h"
00033 #include "pf/pf_pdf.h"
00034
00035
00036
00037 class AMCLOdomData : public AMCLSensorData
00038 {
00039
00040 public: pf_vector_t pose;
00041
00042
00043 public: pf_vector_t delta;
00044 };
00045
00046
00047
00048 class AMCLOdom : public AMCLSensor
00049 {
00050
00051 public: AMCLOdom(AdaptiveMCL & aAMCL, player_devaddr_t addr);
00052
00053
00054 public: virtual int Load(ConfigFile* cf, int section);
00055
00056
00057 public: virtual int Unload(void);
00058
00059
00060 public: virtual int Setup(void);
00061
00062
00063 public: virtual int Shutdown(void);
00064
00065
00066 public: virtual int ProcessMessage(MessageQueue * resp_queue,
00067 player_msghdr * hdr,
00068 void * data);
00069
00070
00071
00072
00073
00074 public: virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data);
00075
00076
00077 public: static void ActionModel(AMCLOdom *self, pf_sample_set_t* set);
00078
00079
00080 private: player_devaddr_t odom_addr;
00081 private: Device *odom_dev;
00082
00083
00084 private: double time;
00085
00086
00087 private: pf_matrix_t drift;
00088
00089
00090 private: pf_pdf_gaussian_t *action_pdf;
00091
00092 #ifdef INCLUDE_RTKGUI
00093
00094 private: virtual void SetupGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
00095
00096
00097 private: virtual void ShutdownGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig);
00098 #endif
00099 };
00100
00101
00102
00103
00104 #endif