|
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
amcl_imu.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: IMU (compass) sensor model for AMCL 00023 // Author: Andrew Howard 00024 // Date: 17 Aug 2003 00025 // CVS: $Id: amcl_imu.h,v 1.2 2004/09/07 00:20:41 gerkey Exp $ 00026 // 00028 00029 #ifndef AMCL_IMU_H 00030 #define AMCL_IMU_H 00031 00032 #include "amcl_sensor.h" 00033 #include "models/imu.h" 00034 00035 // Imuetric sensor model 00036 class AMCLImu : public AMCLSensor 00037 { 00038 // Default constructor 00039 public: AMCLImu(); 00040 00041 // Load the model 00042 public: virtual int Load(ConfigFile* cf, int section); 00043 00044 // Unload the model 00045 public: virtual int Unload(void); 00046 00047 // Initialize the model 00048 public: virtual int Setup(void); 00049 00050 // Finalize the model 00051 public: virtual int Shutdown(void); 00052 00053 // Check for new sensor measurements 00054 private: virtual bool GetData(void); 00055 00056 // Update the filter based on the sensor model. Returns true if the 00057 // filter has been updated. 00058 public: virtual bool UpdateSensor(pf_t *pf); 00059 00060 // Device info 00061 private: int imu_index; 00062 private: Driver *device; 00063 00064 // Imuetry sensor/action model 00065 private: imu_model_t *model; 00066 00067 // Current data timestamp 00068 private: uint32_t tsec, tusec; 00069 00070 // Magnetic deviation 00071 private: double utm_mag_dev; 00072 00073 // Current IMU data 00074 private: double utm_head; 00075 00076 #ifdef INCLUDE_RTKGUI 00077 // Setup the GUI 00078 private: virtual void SetupGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig); 00079 00080 // Finalize the GUI 00081 private: virtual void ShutdownGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig); 00082 00083 // Draw sensor data 00084 private: virtual void UpdateGUI(rtk_canvas_t *canvas, rtk_fig_t *robot_fig); 00085 00086 // IMU figure 00087 private: rtk_fig_t *fig; 00088 #endif 00089 }; 00090 00091 00092 00093 00094 #endif Generated on Tue May 3 14:15:33 2005 for Player by 1.3.6 |