Fawkes API
Fawkes Development Version
|
00001 /*************************************************************************** 00002 * amcl_odom.h: Odometry sensor model for AMCL 00003 * 00004 * Created: Thu May 24 18:51:17 2012 00005 * Copyright 2000 Brian Gerkey 00006 * 2000 Kasper Stoy 00007 * 2012 Tim Niemueller [www.niemueller.de] 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * Read the full text in the LICENSE.GPL file in the doc directory. 00021 */ 00022 00023 /* From: 00024 * Player - One Hell of a Robot Server (LGPL) 00025 * Copyright (C) 2000 Brian Gerkey & Kasper Stoy 00026 * gerkey@usc.edu kaspers@robotics.usc.edu 00027 */ 00028 /////////////////////////////////////////////////////////////////////////// 00029 // Desc: Odometry sensor model for AMCL 00030 // Author: Andrew Howard 00031 // Date: 17 Aug 2003 00032 /////////////////////////////////////////////////////////////////////////// 00033 00034 #ifndef AMCL_ODOM_H 00035 #define AMCL_ODOM_H 00036 00037 #include "amcl_sensor.h" 00038 #include "../pf/pf_pdf.h" 00039 00040 /// @cond EXTERNAL 00041 00042 namespace amcl 00043 { 00044 00045 typedef enum 00046 { 00047 ODOM_MODEL_DIFF, 00048 ODOM_MODEL_OMNI 00049 } odom_model_t; 00050 00051 // Odometric sensor data 00052 class AMCLOdomData : public AMCLSensorData 00053 { 00054 // Odometric pose 00055 public: pf_vector_t pose; 00056 00057 // Change in odometric pose 00058 public: pf_vector_t delta; 00059 }; 00060 00061 00062 // Odometric sensor model 00063 class AMCLOdom : public AMCLSensor 00064 { 00065 // Default constructor 00066 public: AMCLOdom(); 00067 00068 public: void SetModelDiff(double alpha1, 00069 double alpha2, 00070 double alpha3, 00071 double alpha4); 00072 00073 public: void SetModelOmni(double alpha1, 00074 double alpha2, 00075 double alpha3, 00076 double alpha4, 00077 double alpha5); 00078 00079 // Update the filter based on the action model. Returns true if the filter 00080 // has been updated. 00081 public: virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data); 00082 00083 // Current data timestamp 00084 private: double time; 00085 00086 // Model type 00087 private: odom_model_t model_type; 00088 00089 // Drift parameters 00090 private: double alpha1, alpha2, alpha3, alpha4, alpha5; 00091 }; 00092 00093 00094 } 00095 00096 /// @endcond 00097 00098 #endif