Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

RayProximity.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: Ray proximity sensor
00022  * Author: Carle Cote (Laborius - Universite de Sherbrooke - Sherbrooke, Quebec, Canada)
00023  * Date: 23 february 2004
00024  * CVS: $Id: RayProximity.hh,v 1.10 2005/05/06 17:18:55 natepak Exp $
00025  *
00026  * Modification description :
00027  *
00028  * Author: Carle Cote 
00029  *           (Laborius - Universite de Sherbrooke - Sherbrooke, Quebec, Canada)
00030  * Date: 26 may 2004 
00031  * Desc: Fix model with refactored core
00032  *          - Change collision detection mechanism
00033  *          - Change rays to have their own spaceID 
00034  */
00035 
00036 #ifndef RAYPROXIMITYSENSOR_HH
00037 #define RAYPROXIMITYSENSOR_HH
00038 
00039 #include "Sensor.hh"
00040 #include "Body.hh"
00041 
00042 class RayGeom;
00043 
00044 
00050 class RayProximity: public Sensor
00051 {
00057   public: RayProximity(World *world, Body *body, int rayCount);
00058 
00059   
00061   public: virtual ~RayProximity();
00062 
00067   public: void SetRay(int index, GzVector a, GzVector b);
00068 
00071   public: double GetRange(int index);   
00072 
00074   public: double GetRetro(int index);   
00075 
00077   public: int GetFiducial(int index);   
00078 
00080   public: void Update();
00081   
00083   private: static void UpdateCallback( void *data, dGeomID o1, dGeomID o2 );
00084   
00086   private: Body *body;
00087   
00089   private: dSpaceID superSpaceId;
00090   private: dSpaceID raySpaceId; 
00091 
00093   private: int rayCount;
00094   private: RayGeom **rays;
00095 };
00096 
00097 #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