Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

ClodBuster.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: ClodBuster.hh,v 1.9 2004/08/12 00:16:04 inspectorg Exp $
00025  */
00026 
00027 #ifndef CLODBUSTER_HH
00028 #define CLODBUSTER_HH
00029 
00030 #include "Model.hh"
00031 
00032 // Forward declarations
00033 class Body;
00034 class HingeJoint;
00035 class Geom;
00036 //class SphereGeom;
00037 //class GeomData;
00038 
00039 typedef struct gz_position gz_position_t;
00040 
00041 
00042 class ClodBuster : public Model
00043 {
00044   // Construct, destructor
00045   public: ClodBuster( World *world );
00046   public: virtual ~ClodBuster();
00047 
00048   // Load the model
00049   public: virtual int Load( WorldFile *file, WorldFileNode *node );
00050 
00051   // Initialize the model
00052   public: virtual int Init( WorldFile *file, WorldFileNode *node );
00053 
00054   // Finalize the model
00055   public: virtual int Fini();
00056 
00057   // Update the model state
00058   public: virtual void Update( double step );
00059 
00060   // Update the odometry
00061   private: void UpdateOdometry( double step );
00062 
00063   // Load ODE stuff
00064   private: int OdeLoad( WorldFile *file, WorldFileNode *node );
00065 
00066   // Initialize ODE
00067   private: int OdeInit( WorldFile *file, WorldFileNode *node );
00068 
00069   // Finalize ODE
00070   private: int OdeFini();
00071 
00072   // Initialize the external interface
00073   private: int IfaceInit();
00074 
00075   // Finalize the external interface
00076   private: int IfaceFini();
00077 
00078   // Get commands from the external interface
00079   private: void IfaceGetCmd();
00080   
00081   // Update the data in the external interface
00082   private: void IfacePutData();
00083   
00084   // Robot parameters
00085   private: double wheelSep, wheelDiam;
00086   
00087   // ODE components
00088   private: Body *body;
00089   private: Geom *bodyGeoms[4];
00090   private: Body *tires[4];
00091   private: Body *stubs[4];
00092   private: HingeJoint *wjoints[4];
00093   private: HingeJoint *sjoints[4];
00094  
00095  // External interface
00096  private: gz_position_t *iface;
00097 
00098   // Wheel speeds (left and right wheels are paired)
00099   private: double wheelSpeed[2];
00100 
00101   // Odometric pose estimate
00102   private: double odomPose[3];
00103   // Encoder counts
00104   private: double encoders[2];
00105   private: bool raw_encoder_position;
00106 };
00107 
00108 #endif


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