Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

StereoHead.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: Generic stereo camera model
00022  * Author: Andrew Howard
00023  * Date: 8 Oct 2004
00024  * CVS: $Id: StereoHead.hh,v 1.3 2004/11/10 06:46:12 inspectorg Exp $
00025  */
00026 
00027 #ifndef STEREOHEAD_HH
00028 #define STEREOHEAD_HH
00029 
00030 #include "Model.hh"
00031 
00032 
00033 // Forward declarations
00034 class Camera;
00035 class StereoCamera;
00036 class FrustrumGeom;
00037 typedef struct gz_camera gz_camera_t;
00038 
00039 
00040 class StereoHead : public Model
00041 {
00042   // Constructor
00043   public: StereoHead(World *world);
00044 
00045   // Destructor
00046   public: virtual ~StereoHead();
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   // Get camera commands
00061   private: void GetCameraCmd();
00062 
00063   // Send camera data
00064   private: void PutCameraData();
00065 
00066   // A dummy body (every model must have one)
00067   private: Body *body;
00068 
00069   // Camera sensor
00070   private: StereoCamera *stereoSensor;
00071 
00072   // Frustrum for GUI feedback
00073   private: FrustrumGeom *frustrum;
00074 
00075   // Camera interface
00076   private: gz_stereo_t *stereo;
00077 
00078   // Time in seconds between updates
00079   private: double updatePeriod;
00080 
00081   // The time the last update occured
00082   private: double updateTime;
00083 };
00084 
00085 #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