Gazebo logo

Blimp.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 PennBlimp
00022  * Author: Pranav Srivastava
00023  * Date: 14 Sep 2003
00024  * CVS: $Id: Blimp.hh,v 1.9 2004/09/08 21:32:52 section314 Exp $
00025  */
00026 
00027 #ifndef BLIMP_HH
00028 #define BLIMP_HH
00029 
00030 #include "Model.hh"
00031 
00032 // Forward declarations
00033 class Body;
00034 class SliderJoint;
00035 class Geom;
00036 
00037 //typedef struct _gz_position_t gz_position_t;
00038 
00039 
00040 class Blimp : public Model
00041 {
00042   // Construct, destructor
00043   public: Blimp( World *world );
00044   public: virtual ~Blimp();
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   // Get commands from the external interface
00082      //  private: void Iface3dGetCmd();
00083   
00084   // Update the data in the external interface
00085   //private: void Iface3dPutData();
00086   // Robot parameters
00087   private: double total_mass;
00088   
00089   // ODE components
00090   // don't think i need so many.. just one body the capped cylinder..and maybe a fixed joint to hold up the blimp gondola underneath.
00091   private: Body *body,*counter,*counter2;
00092   private: SliderJoint *counterJoint,*counterJoint2;
00093   private: Geom *bodyGeoms[8];
00094 
00095   // External interface
00096   private: gz_position_t *iface;
00097      //private: gz_position3d_t *iface3d;
00098   private: bool is3d;
00099   private: bool first_run; // just so that i can get everything that is a child and retain its pointer.
00100 
00101   // moving the blimp in 3d.
00102   private: double xspeed,yspeed,zspeed,rollspeed,yawspeed,pitchspeed;
00103 
00104   // true position .. is there an odometric thing for position in the sky??
00105 private: double xpos,ypos,zpos,roll,pitch,yaw;
00106 
00107 };
00108 
00109 #endif

Last updated 12 September 2005 21:38:45