Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

SonyVID30.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: A Sony VID30 PTZ camera model
00022  * Author: Nate Koenig
00023  * Date: 16 July 2003
00024  * CVS: $Id: SonyVID30.hh,v 1.24 2004/11/13 00:37:22 inspectorg Exp $
00025  */
00026 
00027 #ifndef SONYVID30_HH
00028 #define SONYVID30_HH
00029 
00030 #include "Body.hh"
00031 #include "Model.hh"
00032 
00033 // Forward declarations
00034 class Camera;
00035 class FrustrumGeom;
00036 class HingeJoint;
00037 
00038 
00039 class SonyVID30 : public Model
00040 {
00041   // Constructor, destructor
00042   public: SonyVID30( World *world );
00043   public: virtual ~SonyVID30();
00044   
00045   // Load the model
00046   public: virtual int Load( WorldFile *file, WorldFileNode *node );
00047 
00048   // Initialize the model
00049   public: virtual int Init( WorldFile *file, WorldFileNode *node );
00050 
00051   // Finalize the model
00052   public: virtual int Fini();
00053 
00054   // Update the model state
00055   public: virtual void Update( double step );
00056 
00057   // Load ODE stuff
00058   private: int OdeLoad( WorldFile *file, WorldFileNode *node );
00059 
00060   // Update the data in the external interface
00061   private: void PutPtzData();
00062   private: void PutCameraData();
00063   private: void GetPtzCmd();
00064 
00065   // ODE objects
00066   private: Body *body;
00067   private: Body *middle;
00068   private: Body *head;
00069   private: Geom *bodyGeoms[8];
00070   private: Geom *lensGeom;
00071   private: HingeJoint *panJoint;
00072   private: HingeJoint *tiltJoint;
00073 
00074   // Frustrum for GUI feedback
00075   private: FrustrumGeom *frustrum;
00076 
00077   // External interfaces
00078   private: gz_camera_t *cameraIface;
00079   private: gz_ptz_t *ptzIface;
00080 
00081   // Horizontal field of view
00082   private: double hfov;
00083   
00084   // Zoom factor
00085   private: double zoomMin, zoomMax;
00086 
00087   // Gain terms for controllers
00088   private: double motionGain, zoomGain;
00089 
00090   // Commanded PTZ values
00091   private: double cmdPan, cmdTilt, cmdZoom;
00092 
00093   // Current zoom factor
00094   private: double zoom;
00095   
00096   // The camera sensor (does rendering)
00097   private: Camera *camera;
00098 
00099   // Time between ptz updates
00100   private: double ptzUpdatePeriod;
00101   private: double ptzUpdateTime;
00102 
00103   // Time between camera updates
00104   private: double cameraUpdatePeriod;
00105   private: double cameraUpdateTime;
00106 };
00107 
00108 #endif
00109 


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