|
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
amcl_odom.hGo to the documentation of this file.00001 /* 00002 * Player - One Hell of a Robot Server 00003 * Copyright (C) 2000 Brian Gerkey et al. 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (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 */ 00021 // 00022 // Desc: Odometry sensor model for AMCL 00023 // Author: Andrew Howard 00024 // Date: 17 Aug 2003 00025 // CVS: $Id: amcl_odom.h,v 1.5 2004/11/12 20:02:14 gerkey Exp $ 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 // Odometric sensor data 00037 class AMCLOdomData : public AMCLSensorData 00038 { 00039 // Odometric pose 00040 public: pf_vector_t pose; 00041 00042 // Change in odometric pose 00043 public: pf_vector_t delta; 00044 }; 00045 00046 00047 // Odometric sensor model 00048 class AMCLOdom : public AMCLSensor 00049 { 00050 // Default constructor 00051 public: AMCLOdom(player_device_id_t id); 00052 00053 // Load the model 00054 public: virtual int Load(ConfigFile* cf, int section); 00055 00056 // Unload the model 00057 public: virtual int Unload(void); 00058 00059 // Initialize the model 00060 public: virtual int Setup(void); 00061 00062 // Finalize the model 00063 public: virtual int Shutdown(void); 00064 00065 // Check for new sensor measurements 00066 private: virtual AMCLSensorData *GetData(void); 00067 00068 // Update the filter based on the action model. Returns true if the filter 00069 // has been updated. 00070 public: virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data); 00071 00072 // The action model callback (static method) 00073 public: static pf_vector_t ActionModel(AMCLOdom *self, pf_vector_t pose); 00074 00075 // Device info 00076 private: player_device_id_t odom_id; 00077 private: Driver *driver; 00078 00079 // Current data timestamp 00080 private: struct timeval time; 00081 00082 // Drift model 00083 private: pf_matrix_t drift; 00084 00085 // PDF used to generate action samples 00086 private: pf_pdf_gaussian_t *action_pdf; 00087 00088 #ifdef INCLUDE_RTKGUI 00089 // Setup the GUI 00090 private: virtual void SetupGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig); 00091 00092 // Finalize the GUI 00093 private: virtual void ShutdownGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig); 00094 #endif 00095 }; 00096 00097 00098 00099 00100 #endif Generated on Tue May 3 14:15:33 2005 for Player by 1.3.6 |