00001 // ---------------------------------------------------------------------------- 00002 // 00003 // $Id$ 00004 // 00005 // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno 00006 // 00007 // This file is part of MIP. 00008 // 00009 // MIP is free software: you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation, either version 3 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // MIP is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>. 00021 // 00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it 00023 // 00024 // ---------------------------------------------------------------------------- 00025 00026 00030 00031 00035 00036 00038 /* @{ */ 00039 00040 00041 #ifndef __OBS_AVOI_ALGO_H 00042 #define __OBS_AVOI_ALGO_H 00043 00044 #ifdef MIP_HOST_APPLE 00045 #include <applePatch.h> 00046 #endif 00047 00048 00049 #include <LogTrace.h> 00050 #include <Spaces.h> 00051 #include <Scan.h> 00052 00053 using namespace MipBaselib; 00054 00055 namespace MipAlgorithms{ 00056 00060 class ObsAvoiAlgoPar { 00061 00062 public: 00063 00065 ObsAvoiAlgoPar(){ 00066 } 00067 00070 ObsAvoiAlgoPar(const ObsAvoiAlgoPar &A){ 00071 } 00072 00075 ObsAvoiAlgoPar operator= (ObsAvoiAlgoPar A){ 00076 } 00077 00078 }; 00079 00080 00084 class ObsAvoiAlgoIn{ 00085 public: 00086 00088 Pose robPose; 00090 Scan scan; 00092 Pose goal; 00094 Pose scanPose; 00096 Decimal lastV; 00098 Decimal lastW; 00100 Decimal rangeMax; 00101 00104 ObsAvoiAlgoIn(); 00105 00113 ObsAvoiAlgoIn(Pose p, Scan &s, Pose g, Pose sp, Decimal lV, Decimal lW, Decimal rm); 00114 }; 00115 00116 00117 00118 00122 class ObsAvoiAlgoOut{ 00123 public: 00124 00126 Decimal V; 00128 Decimal W; 00129 00132 ObsAvoiAlgoOut(); 00133 00136 ObsAvoiAlgoOut(const ObsAvoiAlgoOut &A); 00137 00140 void operator= (ObsAvoiAlgoOut A); 00141 00144 bool operator!= (ObsAvoiAlgoOut A); 00145 00148 string print(); 00149 }; 00150 00151 00155 class ObsAvoiAlgo: public MIPObject{ 00156 00157 protected: 00158 00159 ObsAvoiAlgoPar par; 00160 00161 public: 00162 00164 ObsAvoiAlgo(){ 00165 par = ObsAvoiAlgoPar(); 00166 } 00167 00170 ObsAvoiAlgo(ObsAvoiAlgoPar OAP){ 00171 par = OAP; 00172 } 00173 00174 00178 virtual void getControl(ObsAvoiAlgoIn &in, ObsAvoiAlgoOut *out) { 00179 cout << "getControl NO" << endl; 00180 out->V = 0.0; 00181 out->W = 0.0; 00182 } 00183 }; 00184 00185 00186 };// end namespace MIPAlgorithms 00187 00188 00189 #endif 00190 00191 /* @} */ 00192 00193 00194