Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Classes | Public Member Functions | Static Public Member Functions | List of all members
nav2_voxel_grid::VoxelGrid Class Reference

Public Member Functions

 VoxelGrid (unsigned int size_x, unsigned int size_y, unsigned int size_z)
 Constructor for a voxel grid. More...
 
void resize (unsigned int size_x, unsigned int size_y, unsigned int size_z)
 Resizes a voxel grid to the desired size. More...
 
void reset ()
 
uint32_t * getData ()
 
void markVoxel (unsigned int x, unsigned int y, unsigned int z)
 
bool markVoxelInMap (unsigned int x, unsigned int y, unsigned int z, unsigned int marked_threshold)
 
void clearVoxel (unsigned int x, unsigned int y, unsigned int z)
 
void clearVoxelColumn (unsigned int index)
 
void clearVoxelInMap (unsigned int x, unsigned int y, unsigned int z)
 
bool bitsBelowThreshold (unsigned int n, unsigned int bit_threshold)
 
void markVoxelLine (double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length=UINT_MAX)
 
void clearVoxelLine (double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length=UINT_MAX, unsigned int min_length=0)
 
void clearVoxelLineInMap (double x0, double y0, double z0, double x1, double y1, double z1, unsigned char *map_2d, unsigned int unknown_threshold, unsigned int mark_threshold, unsigned char free_cost=0, unsigned char unknown_cost=255, unsigned int max_length=UINT_MAX, unsigned int min_length=0)
 
VoxelStatus getVoxel (unsigned int x, unsigned int y, unsigned int z)
 
VoxelStatus getVoxelColumn (unsigned int x, unsigned int y, unsigned int unknown_threshold=0, unsigned int marked_threshold=0)
 
void printVoxelGrid ()
 
void printColumnGrid ()
 
unsigned int sizeX ()
 
unsigned int sizeY ()
 
unsigned int sizeZ ()
 
template<class ActionType >
void raytraceLine (ActionType at, double x0, double y0, double z0, double x1, double y1, double z1, unsigned int max_length=UINT_MAX, unsigned int min_length=0)
 

Static Public Member Functions

static unsigned int numBits (unsigned int n)
 
static VoxelStatus getVoxel (unsigned int x, unsigned int y, unsigned int z, unsigned int size_x, unsigned int size_y, unsigned int size_z, const uint32_t *data)
 

Detailed Description

Definition at line 67 of file voxel_grid.hpp.

Constructor & Destructor Documentation

◆ VoxelGrid()

VoxelGrid::VoxelGrid ( unsigned int  size_x,
unsigned int  size_y,
unsigned int  size_z 
)

Constructor for a voxel grid.

Parameters
size_xThe x size of the grid
size_yThe y size of the grid
size_zThe z size of the grid, only sizes <= 16 are supported

Definition at line 44 of file voxel_grid.cpp.

Member Function Documentation

◆ resize()

void VoxelGrid::resize ( unsigned int  size_x,
unsigned int  size_y,
unsigned int  size_z 
)

Resizes a voxel grid to the desired size.

Parameters
size_xThe x size of the grid
size_yThe y size of the grid
size_zThe z size of the grid, only sizes <= 16 are supported

Definition at line 67 of file voxel_grid.cpp.

Referenced by nav2_costmap_2d::VoxelLayer::matchSize().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: