Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __ENVIRONMENT_NAVXYTHETAMLEVLAT_H_
00029 #define __ENVIRONMENT_NAVXYTHETAMLEVLAT_H_
00030
00031
00032
00033 typedef struct{
00034 char starttheta;
00035 char dX;
00036 char dY;
00037 char endtheta;
00038 vector<sbpl_2Dcell_t>* intersectingcellsV;
00039 } EnvNAVXYTHETAMLEVLATAddInfoAction_t;
00040
00041
00049 class EnvironmentNAVXYTHETAMLEVLAT : public EnvironmentNAVXYTHETALAT
00050 {
00051
00052 public:
00053
00060 bool InitializeAdditionalLevels(int numofadditionalzlevs, const vector<sbpl_2Dpt_t>* perimeterptsV,
00061 unsigned char* cost_inscribed_thresh,
00062 unsigned char* cost_possibly_circumscribed_thresh);
00063
00070 bool Set2DMapforAddLev(const unsigned char* mapdata, int levind);
00071
00076 bool Set2DMapforAddLev(const unsigned char** NewGrid2D, int levind);
00077
00078
00082 bool UpdateCostinAddLev(int x, int y, unsigned char newcost, int zlev);
00083
00087 virtual void GetPredsofChangedEdges(vector<nav2dcell_t> const * changedcellsV, vector<int> *preds_of_changededgesIDV)
00088 {
00089 SBPL_ERROR("ERROR: GetPredsofChangedEdges function not supported\n");
00090 throw new SBPL_Exception();
00091 }
00092
00093
00097 virtual void GetSuccsofChangedEdges(vector<nav2dcell_t> const * changedcellsV, vector<int> *succs_of_changededgesIDV)
00098 {
00099 SBPL_ERROR("ERROR: GetSuccsofChangedEdges function not supported\n");
00100 throw new SBPL_Exception();
00101 }
00102
00106 bool IsValidCell(int X, int Y);
00107
00111 bool IsValidCell(int X, int Y, int levind);
00112
00113
00117 bool IsObstacle(int x, int y);
00118
00122 bool IsObstacle(int x, int y, int levind);
00123
00129 bool IsValidConfiguration(int X, int Y, int Theta);
00130
00134 unsigned char GetMapCost(int X, int Y);
00135
00139 unsigned char GetMapCost(int X, int Y, int levind);
00140
00141
00142 EnvironmentNAVXYTHETAMLEVLAT();
00143 ~EnvironmentNAVXYTHETAMLEVLAT();
00144
00145 protected:
00149 int numofadditionalzlevs;
00150
00151
00155 vector<sbpl_2Dpt_t>* AddLevelFootprintPolygonV;
00156
00163 EnvNAVXYTHETAMLEVLATAddInfoAction_t** AdditionalInfoinActionsV;
00164
00165
00170 unsigned char*** AddLevelGrid2D;
00171
00176 unsigned char* AddLevel_cost_inscribed_thresh;
00181 unsigned char* AddLevel_cost_possibly_circumscribed_thresh;
00182
00183 virtual int GetActionCost(int SourceX, int SourceY, int SourceTheta, EnvNAVXYTHETALATAction_t* action);
00184
00185 virtual int GetActionCostacrossAddLevels(int SourceX, int SourceY, int SourceTheta, EnvNAVXYTHETALATAction_t* action);
00186
00187
00188 };
00189
00190
00191
00192 #endif
00193