This is x,y,theta lattice planning but with multiple levels in z. In other words, it is for doing collision checking in 3D (x,y,z). The z level is split into numofzlevs levels. If numofzlevs = 1, then it defaults to the original x,y,theta lattice planning defined in EnvironmentNAVXYTHETALAT. Otherwise, it uses numofzlevs footprints of the robot and corresponding costmaps. It assumes that they correspond to each other and are projections of the robot and corresponding z regions of the 3D map. More...
#include <environment_navxythetamlevlat.h>
Public Member Functions | |
EnvironmentNAVXYTHETAMLEVLAT () | |
unsigned char | GetMapCost (int X, int Y) |
returns the maximum over all levels of the cost corresponding to the cell <x,y> | |
unsigned char | GetMapCost (int X, int Y, int levind) |
returns the cost corresponding to the cell <x,y> at level levind | |
virtual void | GetPredsofChangedEdges (vector< nav2dcell_t > const *changedcellsV, vector< int > *preds_of_changededgesIDV) |
incremental planning not supported | |
virtual void | GetSuccsofChangedEdges (vector< nav2dcell_t > const *changedcellsV, vector< int > *succs_of_changededgesIDV) |
incremental planning not supported | |
bool | InitializeAdditionalLevels (int numofadditionalzlevs, const vector< sbpl_2Dpt_t > *perimeterptsV, unsigned char *cost_inscribed_thresh, unsigned char *cost_possibly_circumscribed_thresh) |
initialization of additional levels. 0 is the original one. All additional ones will start with index 1 For each level, it also takes cost thresholds for cells lying within inner radius of the robot (inscribed) and outside of the inner circle but within outer radius (possibly_circumscribed). See environment_navxythetalat.h for the explanation of these parameters. | |
bool | IsObstacle (int x, int y) |
bool | IsObstacle (int x, int y, int levind) |
bool | IsValidCell (int X, int Y) |
bool | IsValidCell (int X, int Y, int levind) |
bool | IsValidConfiguration (int X, int Y, int Theta) |
returns false if robot intersects obstacles or lies outside of the map. Note this is pretty expensive operation since it computes the footprint of the robot based on its x,y,theta | |
bool | Set2DMapforAddLev (const unsigned char *mapdata, int levind) |
setting 2D map for the additional level at levind index (indices are zero-based and are only used to index the additional levels) you can not use this function to set 2D map for the base level transform from linear array mapdata to the 2D matrix used internally: Grid2D[x][y] = mapdata[x+y*width] | |
bool | Set2DMapforAddLev (const unsigned char **NewGrid2D, int levind) |
set 2D map for the additional level levind The version of Set2DMapforAddLev that takes newmap as 2D array instead of one linear array | |
bool | UpdateCostinAddLev (int x, int y, unsigned char newcost, int zlev) |
update the traversability of a cell<x,y> in level zlev | |
~EnvironmentNAVXYTHETAMLEVLAT () | |
Protected Member Functions | |
virtual int | GetActionCost (int SourceX, int SourceY, int SourceTheta, EnvNAVXYTHETALATAction_t *action) |
virtual int | GetActionCostacrossAddLevels (int SourceX, int SourceY, int SourceTheta, EnvNAVXYTHETALATAction_t *action) |
Protected Attributes | |
EnvNAVXYTHETAMLEVLATAddInfoAction_t ** | AdditionalInfoinActionsV |
array of additional info in actions, AdditionalInfoinActionsV[i][j] - jth action for sourcetheta = i basically, each Additional info structure will contain numofadditionalzlevs additional intersecting cells vector<sbpl_2Dcell_t> intersectingcellsV | |
unsigned char * | AddLevel_cost_inscribed_thresh |
inscribed cost thresholds for additional levels see environment_navxythetalat.h file for the explanation of this threshold | |
unsigned char * | AddLevel_cost_possibly_circumscribed_thresh |
possibly_circumscribed cost thresholds for additional levels see environment_navxythetalat.h file for the explanation of this threshold | |
vector< sbpl_2Dpt_t > * | AddLevelFootprintPolygonV |
footprints for the additional levels | |
unsigned char *** | AddLevelGrid2D |
2D maps for additional levels. AddLevelGrid2D[lind][x][y] refers to <x,y> cell on the additional level lind | |
int | numofadditionalzlevs |
number of additional levels. If it is 0, then there is only one level - base level |
This is x,y,theta lattice planning but with multiple levels in z. In other words, it is for doing collision checking in 3D (x,y,z). The z level is split into numofzlevs levels. If numofzlevs = 1, then it defaults to the original x,y,theta lattice planning defined in EnvironmentNAVXYTHETALAT. Otherwise, it uses numofzlevs footprints of the robot and corresponding costmaps. It assumes that they correspond to each other and are projections of the robot and corresponding z regions of the 3D map.
Definition at line 49 of file environment_navxythetamlevlat.h.
Definition at line 46 of file environment_navxythetamlevlat.cpp.
Definition at line 56 of file environment_navxythetamlevlat.cpp.
int EnvironmentNAVXYTHETAMLEVLAT::GetActionCost | ( | int | SourceX, |
int | SourceY, | ||
int | SourceTheta, | ||
EnvNAVXYTHETALATAction_t * | action | ||
) | [protected, virtual] |
Reimplemented from EnvironmentNAVXYTHETALATTICE.
Definition at line 248 of file environment_navxythetamlevlat.cpp.
int EnvironmentNAVXYTHETAMLEVLAT::GetActionCostacrossAddLevels | ( | int | SourceX, |
int | SourceY, | ||
int | SourceTheta, | ||
EnvNAVXYTHETALATAction_t * | action | ||
) | [protected, virtual] |
Definition at line 263 of file environment_navxythetamlevlat.cpp.
unsigned char EnvironmentNAVXYTHETAMLEVLAT::GetMapCost | ( | int | X, |
int | Y | ||
) |
returns the maximum over all levels of the cost corresponding to the cell <x,y>
Reimplemented from EnvironmentNAVXYTHETALATTICE.
Definition at line 178 of file environment_navxythetamlevlat.cpp.
unsigned char EnvironmentNAVXYTHETAMLEVLAT::GetMapCost | ( | int | X, |
int | Y, | ||
int | levind | ||
) |
returns the cost corresponding to the cell <x,y> at level levind
Definition at line 191 of file environment_navxythetamlevlat.cpp.
virtual void EnvironmentNAVXYTHETAMLEVLAT::GetPredsofChangedEdges | ( | vector< nav2dcell_t > const * | changedcellsV, |
vector< int > * | preds_of_changededgesIDV | ||
) | [inline, virtual] |
incremental planning not supported
Reimplemented from EnvironmentNAVXYTHETALAT.
Definition at line 87 of file environment_navxythetamlevlat.h.
virtual void EnvironmentNAVXYTHETAMLEVLAT::GetSuccsofChangedEdges | ( | vector< nav2dcell_t > const * | changedcellsV, |
vector< int > * | succs_of_changededgesIDV | ||
) | [inline, virtual] |
incremental planning not supported
Reimplemented from EnvironmentNAVXYTHETALAT.
Definition at line 97 of file environment_navxythetamlevlat.h.
bool EnvironmentNAVXYTHETAMLEVLAT::InitializeAdditionalLevels | ( | int | numofadditionalzlevs, |
const vector< sbpl_2Dpt_t > * | perimeterptsV, | ||
unsigned char * | cost_inscribed_thresh, | ||
unsigned char * | cost_possibly_circumscribed_thresh | ||
) |
initialization of additional levels. 0 is the original one. All additional ones will start with index 1 For each level, it also takes cost thresholds for cells lying within inner radius of the robot (inscribed) and outside of the inner circle but within outer radius (possibly_circumscribed). See environment_navxythetalat.h for the explanation of these parameters.
Definition at line 379 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::IsObstacle | ( | int | x, |
int | y | ||
) |
returns true if cell is untraversable at any level
Reimplemented from EnvironmentNAVXYTHETALATTICE.
Definition at line 142 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::IsObstacle | ( | int | x, |
int | y, | ||
int | levind | ||
) |
returns true if cell is untraversable at level levelnum.
Definition at line 163 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::IsValidCell | ( | int | X, |
int | Y | ||
) | [virtual] |
returns true if cell is traversable and within map limits - it checks against all levels including the base one
Reimplemented from EnvironmentNAVXYTHETALATTICE.
Definition at line 115 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::IsValidCell | ( | int | X, |
int | Y, | ||
int | levind | ||
) |
returns true if cell is traversable and within map limits for a particular level
Definition at line 133 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::IsValidConfiguration | ( | int | X, |
int | Y, | ||
int | Theta | ||
) |
returns false if robot intersects obstacles or lies outside of the map. Note this is pretty expensive operation since it computes the footprint of the robot based on its x,y,theta
Reimplemented from EnvironmentNAVXYTHETALATTICE.
Definition at line 206 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::Set2DMapforAddLev | ( | const unsigned char * | mapdata, |
int | levind | ||
) |
setting 2D map for the additional level at levind index (indices are zero-based and are only used to index the additional levels) you can not use this function to set 2D map for the base level transform from linear array mapdata to the 2D matrix used internally: Grid2D[x][y] = mapdata[x+y*width]
Definition at line 486 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::Set2DMapforAddLev | ( | const unsigned char ** | NewGrid2D, |
int | levind | ||
) |
set 2D map for the additional level levind The version of Set2DMapforAddLev that takes newmap as 2D array instead of one linear array
Definition at line 507 of file environment_navxythetamlevlat.cpp.
bool EnvironmentNAVXYTHETAMLEVLAT::UpdateCostinAddLev | ( | int | x, |
int | y, | ||
unsigned char | newcost, | ||
int | zlev | ||
) |
update the traversability of a cell<x,y> in level zlev
Definition at line 531 of file environment_navxythetamlevlat.cpp.
EnvNAVXYTHETAMLEVLATAddInfoAction_t** EnvironmentNAVXYTHETAMLEVLAT::AdditionalInfoinActionsV [protected] |
array of additional info in actions, AdditionalInfoinActionsV[i][j] - jth action for sourcetheta = i basically, each Additional info structure will contain numofadditionalzlevs additional intersecting cells vector<sbpl_2Dcell_t> intersectingcellsV
Definition at line 163 of file environment_navxythetamlevlat.h.
unsigned char* EnvironmentNAVXYTHETAMLEVLAT::AddLevel_cost_inscribed_thresh [protected] |
inscribed cost thresholds for additional levels see environment_navxythetalat.h file for the explanation of this threshold
Definition at line 176 of file environment_navxythetamlevlat.h.
unsigned char* EnvironmentNAVXYTHETAMLEVLAT::AddLevel_cost_possibly_circumscribed_thresh [protected] |
possibly_circumscribed cost thresholds for additional levels see environment_navxythetalat.h file for the explanation of this threshold
Definition at line 181 of file environment_navxythetamlevlat.h.
footprints for the additional levels
Definition at line 155 of file environment_navxythetamlevlat.h.
unsigned char*** EnvironmentNAVXYTHETAMLEVLAT::AddLevelGrid2D [protected] |
2D maps for additional levels. AddLevelGrid2D[lind][x][y] refers to <x,y> cell on the additional level lind
Definition at line 170 of file environment_navxythetamlevlat.h.
int EnvironmentNAVXYTHETAMLEVLAT::numofadditionalzlevs [protected] |
number of additional levels. If it is 0, then there is only one level - base level
Definition at line 149 of file environment_navxythetamlevlat.h.