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_t;
00043 
00044 // Odometric sensor data
00045 class AMCLOdomData : public AMCLSensorData
00046 {
00047   // Odometric pose
00048   public: pf_vector_t pose;
00049 
00050   // Change in odometric pose
00051   public: pf_vector_t delta;
00052 };
00053 
00054 
00055 // Odometric sensor model
00056 class AMCLOdom : public AMCLSensor
00057 {
00058   // Default constructor
00059   public: AMCLOdom();
00060 
00061   public: void SetModelDiff(double alpha1, 
00062                             double alpha2, 
00063                             double alpha3, 
00064                             double alpha4);
00065 
00066   public: void SetModelOmni(double alpha1, 
00067                             double alpha2, 
00068                             double alpha3, 
00069                             double alpha4,
00070                             double alpha5);
00071 
00072   // Update the filter based on the action model.  Returns true if the filter
00073   // has been updated.
00074   public: virtual bool UpdateAction(pf_t *pf, AMCLSensorData *data);
00075 
00076   // Current data timestamp
00077   private: double time;
00078   
00079   // Model type
00080   private: odom_model_t model_type;
00081 
00082   // Drift parameters
00083   private: double alpha1, alpha2, alpha3, alpha4, alpha5;
00084 };
00085 
00086 
00087 }
00088 
00089 #endif


amcl
Author(s): Brian P. Gerkey
autogenerated on Sat Dec 28 2013 17:14:46