|
MRSL JPS3D Library
1.1
An implementaion of Jump Point Search on 3D voxel map
|
#include <map_util.h>
Public Member Functions | |
| MapUtil () | |
| Simple constructor. | |
| Tmap | getMap () |
| Get map data. | |
| decimal_t | getRes () |
| Get resolution. | |
| Veci< Dim > | getDim () |
| Get dimensions. | |
| Vecf< Dim > | getOrigin () |
| Get origin. | |
| int | getIndex (const Veci< Dim > &pn) |
| Get index of a cell. | |
| bool | isOutsideXYZ (const Veci< Dim > &n, int i) |
| Check if the given cell is outside of the map in i-the dimension. | |
| bool | isFree (int idx) |
| Check if the cell is free by index. | |
| bool | isUnknown (int idx) |
| Check if the cell is unknown by index. | |
| bool | isOccupied (int idx) |
| Check if the cell is occupied by index. | |
| bool | isOutside (const Veci< Dim > &pn) |
| Check if the cell is outside by coordinate. | |
| bool | isFree (const Veci< Dim > &pn) |
| Check if the given cell is free by coordinate. | |
| bool | isOccupied (const Veci< Dim > &pn) |
| Check if the given cell is occupied by coordinate. | |
| bool | isUnknown (const Veci< Dim > &pn) |
| Check if the given cell is unknown by coordinate. | |
| void | setMap (const Vecf< Dim > &ori, const Veci< Dim > &dim, const Tmap &map, decimal_t res) |
| Set map. More... | |
| void | info () |
| Print basic information about the util. | |
| Veci< Dim > | floatToInt (const Vecf< Dim > &pt) |
| Float position to discrete cell coordinate. | |
| Vecf< Dim > | intToFloat (const Veci< Dim > &pn) |
| Discrete cell coordinate to float position. | |
| vec_Veci< Dim > | rayTrace (const Vecf< Dim > &pt1, const Vecf< Dim > &pt2) |
| Raytrace from float point pt1 to pt2. | |
| bool | isBlocked (const Vecf< Dim > &p1, const Vecf< Dim > &p2, int8_t val=100) |
| Check if the ray from p1 to p2 is occluded. | |
| vec_Vecf< Dim > | getCloud () |
| Get occupied voxels. | |
| vec_Vecf< Dim > | getFreeCloud () |
| Get free voxels. | |
| vec_Vecf< Dim > | getUnknownCloud () |
| Get unknown voxels. | |
| void | dilate (const vec_Veci< Dim > &dilate_neighbor) |
| Dilate occupied cells. | |
| void | freeUnknown () |
| Free unknown voxels. | |
Public Attributes | |
| Tmap | map_ |
| Map entity. | |
Protected Attributes | |
| decimal_t | res_ |
| Resolution. | |
| Vecf< Dim > | origin_d_ |
| Origin, float type. | |
| Veci< Dim > | dim_ |
| Dimension, int type. | |
| int8_t | val_occ = 100 |
| Assume occupied cell has value 100. | |
| int8_t | val_free = 0 |
| Assume free cell has value 0. | |
| int8_t | val_unknown = -1 |
| Assume unknown cell has value -1. | |
The map util class for collision checking
| Dim | is the dimension of the workspace |
|
inline |
Set map.
| ori | origin position |
| dim | number of cells in each dimension |
| map | array of cell values |
| res | map resolution |
1.8.13