Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

WheelChair.hh

Go to the documentation of this file.
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: Model for a ClodBuster
00022  * Author: Pranav Srivastava
00023  * Date: 4 Sep 2003 
00024  * CVS: $Id: WheelChair.hh,v 1.12 2004/11/12 18:00:46 natepak Exp $
00025  */ 
00026 
00027 #ifndef WHEELCHAIR_HH
00028 #define WHEELCHAIR_HH
00029 
00030 #include "Model.hh"
00031 
00032 // Forward declarations
00033 class Body;
00034 class Hinge2Joint;
00035 class Geom;
00036 class SphereGeom;
00037 class GeomData;
00038 
00039 
00040 class WheelChair : public Model
00041 {
00042   // Construct, destructor
00043   public: WheelChair( World *world );
00044   public: virtual ~WheelChair();
00045 
00046   // Load the model
00047   public: virtual int Load( WorldFile *file, WorldFileNode *node );
00048 
00049   // Initialize the model
00050   public: virtual int Init( WorldFile *file, WorldFileNode *node );
00051 
00052   // Finalize the model
00053   public: virtual int Fini();
00054 
00055   // Update the model state
00056   public: virtual void Update( double step );
00057 
00058   // Update the odometry
00059   private: void UpdateOdometry( double step );
00060 
00061   // Load ODE stuff
00062   private: int OdeLoad( WorldFile *file, WorldFileNode *node );
00063 
00064   // Initialize ODE
00065   private: int OdeInit( WorldFile *file, WorldFileNode *node );
00066 
00067   // Finalize ODE
00068   private: int OdeFini();
00069 
00070   // Initialize the external interface
00071   private: int IfaceInit();
00072 
00073   // Finalize the external interface
00074   private: int IfaceFini();
00075 
00076   // Get commands from the external interface
00077   private: void IfaceGetCmd();
00078   
00079   // Update the data in the external interface
00080   private: void IfacePutData();
00081   
00082   // Robot parameters
00083 private: double wheelSep,wheelDiam;
00084   
00085   // ODE components
00086   private: Body *body;
00087   private: Geom *bodyGeoms[8];
00088   private: Body *tires[4];
00089   private: Hinge2Joint *joints[4];
00090 
00091   // External interface
00092   private: gz_position_t *iface;
00093 
00094   // Wheel speeds (left and right wheels are paired)
00095   private: double wheelSpeed[2];
00096 
00097   // Odometric pose estimate
00098   private: double odomPose[3];
00099 };
00100 
00101 #endif


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:08 2005 for Gazebo by doxygen 1.4.2