odometry.h
00001 /*
00002  *  Player - One Hell of a Robot Server
00003  *  Copyright (C) 2003
00004  *     Andrew Howard
00005  *     Brian Gerkey    
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 
00023 
00024 /**************************************************************************
00025  * Desc: Sensor/action models for odometry.
00026  * Author: Andrew Howard
00027  * Date: 15 Dec 2002
00028  * CVS: $Id: odometry.h 8108 2009-07-23 23:03:37Z thjc $
00029  *************************************************************************/
00030 
00031 #ifndef ODOMETRY_H
00032 #define ODOMETRY_H
00033 
00034 #include "../pf/pf.h"
00035 #include "../pf/pf_pdf.h"
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041   
00042 // Model information
00043 typedef struct
00044 {
00045   // PDF used for initialization
00046   pf_pdf_gaussian_t *init_pdf;
00047 
00048   // PDF used to generate action samples
00049   pf_pdf_gaussian_t *action_pdf;
00050 
00051 } odometry_t;
00052 
00053 
00054 // Create an sensor model
00055 odometry_t *odometry_alloc();
00056 
00057 // Free an sensor model
00058 void odometry_free(odometry_t *sensor);
00059 
00060 // Prepare to initialize the distribution
00061 void odometry_init_init(odometry_t *self, pf_vector_t mean, pf_matrix_t cov);
00062 
00063 // Finish initializing the distribution
00064 void odometry_init_term(odometry_t *self);
00065 
00066 // Initialize the distribution
00067 pf_vector_t odometry_init_model(odometry_t *self);
00068 
00069 // Prepare to update the distribution using the action model.
00070 void odometry_action_init(odometry_t *self, pf_vector_t old_pose, pf_vector_t new_pose);
00071 
00072 // Finish updating the distrubiotn using the action model
00073 void odometry_action_term(odometry_t *self);
00074 
00075 // The action model function
00076 pf_vector_t odometry_action_model(odometry_t *self, pf_vector_t pose);
00077 
00078 
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082 
00083 #endif
00084 

Last updated 12 September 2005 21:38:45