Gazebo

Sensor.hh

00001 /*
00002  *  Gazebo - Outdoor Multi-Robot Simulator
00003  *  Copyright (C) 2003  
00004  *     Nate Koenig & Andrew Howard
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 /* Desc: Base class for all sensors
00022  * Author: Nathan Koenig
00023  * Date: 25 May 2007
00024  * SVN: $Id: Sensor.hh 156 2007-11-26 20:26:57Z natepak $
00025  */
00026 
00027 #ifndef SENSOR_HH
00028 #define SENSOR_HH
00029 
00030 #include "Entity.hh"
00031 #include "UpdateParams.hh"
00032 
00033 namespace gazebo
00034 {
00035   class XMLConfigNode;
00036   class Body;
00037   class Controller;
00038 
00042   
00044   class Sensor : public Entity
00045   {
00047     public: Sensor(Body *body);
00048   
00050     public: virtual ~Sensor();
00051   
00054     public: virtual void Load(XMLConfigNode *node);
00055   
00057     public: void Init();
00058   
00060     public: void Update(UpdateParams &params);
00061   
00063     public: void Fini();
00064 
00066     public: void SetActive(bool value);
00067 
00069     protected: virtual void LoadChild(XMLConfigNode * /*node*/) {};
00070   
00072     protected: virtual void InitChild() {};
00073   
00075     protected: virtual void UpdateChild(UpdateParams & /*param*/) {};
00076   
00078     protected: virtual void FiniChild() {};
00079   
00082     private: void LoadController(XMLConfigNode *node);
00083   
00085     protected: Body *body;
00086 
00088     protected: Controller *controller;
00089 
00091     protected: bool active;
00092   };
00093   
00095 }
00096 #endif

Last updated Aug 04 2007