00001 /************************************************************************************************** 00002 Software License Agreement (BSD License) 00003 00004 Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without modification, are permitted 00008 provided that the following conditions are met: 00009 00010 *Redistributions of source code must retain the above copyright notice, this list of 00011 conditions and the following disclaimer. 00012 *Redistributions in binary form must reproduce the above copyright notice, this list of 00013 conditions and the following disclaimer in the documentation and/or other materials provided 00014 with the distribution. 00015 *Neither the name of the University of Aveiro nor the names of its contributors may be used to 00016 endorse or promote products derived from this software without specific prior written permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 00019 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00020 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 00021 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00024 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00025 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 ***************************************************************************************************/ 00027 /***************************************************/ 00028 /* Last Revised: 00029 $Id: TData.h 8465 2009-12-16 00:44:13Z gbiggs $ 00030 */ 00031 /***************************************************/ 00032 /* 00033 * This program is free software; you can redistribute it and/or modify 00034 * it under the terms of the GNU General Public License as published by 00035 * the Free Software Foundation; either version 2 of the License, or 00036 * (at your option) any later version. 00037 * 00038 * This program is distributed in the hope that it will be useful, 00039 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00040 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00041 * GNU General Public License for more details. 00042 * 00043 * You should have received a copy of the GNU General Public License 00044 * along with this program; if not, write to the Free Software 00045 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00046 * 00047 */ 00048 #ifndef TData 00049 #define TData 00050 00056 /* 00057 Este fichero contiene los tipos de datos utilizados por todos 00058 */ 00059 00060 #ifndef M_PI 00061 #define M_PI 3.14159265358979323846 00062 #endif 00063 00064 #define MAXLASERPOINTS 720 00065 00066 // #define RADIO 0.4F /* Radio del robot */ 00067 00068 typedef struct { 00069 float x; 00070 float y; 00071 }Tpf; 00072 00073 00074 typedef struct { 00075 float r; 00076 float t; 00077 }Tpfp; 00078 00079 typedef struct { 00080 int x; 00081 int y; 00082 }Tpi; 00083 00084 typedef struct { 00085 float x; 00086 float y; 00087 float tita; 00088 }Tsc; 00089 00090 typedef struct { 00091 int numPuntos; 00092 Tpf laserC[MAXLASERPOINTS]; // Cartesian coordinates 00093 Tpfp laserP[MAXLASERPOINTS]; // Polar coordinates 00094 }Tscan; 00095 00096 00097 00098 00099 // Associations information 00100 typedef struct{ 00101 float rx,ry,nx,ny,dist; // Point (nx,ny), static corr (rx,ry), dist 00102 int numDyn; // Number of dynamic associations 00103 float unknown; // Unknown weight 00104 int index; // Index within the original scan 00105 int L,R; 00106 }TAsoc; 00107 00108 00109 #endif