amcl_odom.h
Go 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 library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Lesser General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2.1 of the License, or (at your option) any later version.
00009  *
00010  *  This library 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 GNU
00013  *  Lesser General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Lesser General Public
00016  *  License along with this library; 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 4135 2007-08-23 19:58:48Z gerkey $
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 namespace amcl
00036 {
00037 
00038 typedef enum
00039 {
00040   ODOM_MODEL_DIFF,
00041   ODOM_MODEL_OMNI,
00042   ODOM_MODEL_DIFF_CORRECTED,
00043   ODOM_MODEL_OMNI_CORRECTED
00044 } odom_model_t;
00045 
00046 // Odometric sensor data
00047 class AMCLOdomData : public AMCLSensorData
00048 {
00049   // Odometric pose
00050   public: pf_vector_t pose;
00051 
00052   // Change in odometric pose
00053   public: pf_vector_t delta;
00054 };
00055 
00056 
00057 // Odometric sensor model
00058 class AMCLOdom : public AMCLSensor
00059 {
00060   // Default constructor
00061   public: AMCLOdom();
00062 
00063   public: void SetModelDiff(double alpha1, 
00064                             double alpha2, 
00065                             double alpha3, 
00066                             double alpha4);
00067 
00068   public: void SetModelOmni(double alpha1, 
00069                             double alpha2, 
00070                             double alpha3, 
00071                             double alpha4,
00072                             double alpha5);
00073 
00074   public: void SetModel( odom_model_t type,
00075                          double alpha1,
00076                          double alpha2,
00077                          double alpha3,
00078                          double alpha4,
00079                          double alpha5 = 0 );
00080 
00081   // Update the filter based on the action model.  Returns true if the filter
00082   // has been updated.
00083   public: virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data);
00084 
00085   // Current data timestamp
00086   private: double time;
00087   
00088   // Model type
00089   private: odom_model_t model_type;
00090 
00091   // Drift parameters
00092   private: double alpha1, alpha2, alpha3, alpha4, alpha5;
00093 };
00094 
00095 
00096 }
00097 
00098 #endif


amcl
Author(s): Brian P. Gerkey, contradict@gmail.com
autogenerated on Thu Aug 27 2015 14:07:48