Public Member Functions | Public Attributes
old_occupancy_grid_3d.occupancy_grid_3d Class Reference

class which implements the occupancy grid More...

List of all members.

Public Member Functions

def __init__
def argmax_z
def fill_grid
 fill the occupancy grid.
def find_objects
def find_objects_2d
def find_plane_indices
def grid_lines
 returns list of 8 tuples of 3x1 points which form the edges of the grid.
def grid_to_centroids
 get centroids of all the occupied cells as a 3xN np matrix
def grid_to_points
def labeled_array_to_points
def remove_horizontal_plane
def remove_vertical_plane
def segment_objects
def to_binary

Public Attributes

 brf
 grid
 grid_points_list
 grid_shape
 resolution
 rotation_z
 tlb

Detailed Description

class which implements the occupancy grid

Definition at line 93 of file old_occupancy_grid_3d.py.


Constructor & Destructor Documentation

def old_occupancy_grid_3d.occupancy_grid_3d.__init__ (   self,
  brf,
  tlb,
  resolution,
  rotation_z = math.radians(0.) 
)
Parameters:
brf- 3x1 matrix. Bottom Right Front.
tlb- 3x1 matrix (coord of center of the top left back cell)
resolution- 3x1 matrix. size of each cell (in meters) along the different directions.

Definition at line 100 of file old_occupancy_grid_3d.py.


Member Function Documentation

def old_occupancy_grid_3d.occupancy_grid_3d.argmax_z (   self,
  index_min = -np.Inf,
  index_max = np.Inf,
  search_up = False,
  search_down = False 
)
searches in the z direction for maximum number of cells with occupancy==1
    call this function after calling to_binary()
    returns index.

Definition at line 187 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.fill_grid (   self,
  pts,
  ignore_z = False 
)

fill the occupancy grid.

Parameters:
pts- 3xN matrix of points.
ignore_z- not use the z coord of the points. grid will be like a 2D grid.

each cell of the grid gets filled the number of points that fall in the cell.

Definition at line 147 of file old_occupancy_grid_3d.py.

region growing kind of thing for segmentation. Useful if plane has been removed.

Definition at line 490 of file old_occupancy_grid_3d.py.

projects all points into the xy plane and then performs
    segmentation by region growing.

Definition at line 440 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.find_plane_indices (   self,
  hmin = -np.Inf,
  hmax = np.Inf,
  assume_plane = False 
)
assume_plane - always return something.
    returns list of indices (z) corrresponding to horizontal plane points.
    returns [] if there is no plane

Definition at line 232 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.grid_lines (   self,
  rotation_angle = 0. 
)

returns list of 8 tuples of 3x1 points which form the edges of the grid.

Useful for displaying the extents of the volume of interest (VOI).

Returns:
list of 8 tuples of 3x1 points which form the edges of the grid.

Definition at line 116 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.grid_to_centroids (   self,
  occupancy_threshold = 1 
)

get centroids of all the occupied cells as a 3xN np matrix

Parameters:
occupancy_threshold- number of points in a cell for it to be "occupied"
Returns:
3xN matrix of 3d coord of the cells which have occupancy >= occupancy_threshold

Definition at line 283 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.grid_to_points (   self,
  array = None,
  occupancy_threshold = 1 
)
array - if not None then this will be used instead of self.grid
    returns 3xN matrix of 3d coord of the cells which have occupancy >= occupancy_threshold

Definition at line 292 of file old_occupancy_grid_3d.py.

returns coordinates of centers of grid cells corresponding to
    label as a 3xN matrix.

Definition at line 314 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.remove_horizontal_plane (   self,
  remove_below = True,
  hmin = -np.Inf,
  hmax = np.Inf,
  extra_layers = 0 
)
call after to_binary()
    removes points corresponding to the horizontal plane from the grid.
    remove_below - remove points below the plane also.
    hmin,hmax - min and max possible height of the plane. (meters)
    This function changes grid.

    extra_layers - number of layers above the plane to remove. Sometimes
           I want to be over zealous while removing plane points.
           e.g. max_fwd_without_collision

    it returns the slice which has been set to zero, in case you want to
    leave the grid unchanged.

Definition at line 370 of file old_occupancy_grid_3d.py.

removes plane parallel to the YZ plane.
    changes grid.
    returns plane_indices, slice corresponding to the vertical plane.
    points behind the plane are lost for ever!

Definition at line 332 of file old_occupancy_grid_3d.py.

segments out objects after removing the plane.
    call after calling to_binary.
    returns labelled_array,n_labels
    labelled_array - same dimen as occupancy grid, each object has a different label.

Definition at line 422 of file old_occupancy_grid_3d.py.

def old_occupancy_grid_3d.occupancy_grid_3d.to_binary (   self,
  thresh = 1 
)
all cells with occupancy>=thresh set to 1, others set to 0.

Definition at line 180 of file old_occupancy_grid_3d.py.


Member Data Documentation

Definition at line 100 of file old_occupancy_grid_3d.py.

Definition at line 100 of file old_occupancy_grid_3d.py.

Definition at line 100 of file old_occupancy_grid_3d.py.

Definition at line 100 of file old_occupancy_grid_3d.py.

Definition at line 100 of file old_occupancy_grid_3d.py.

Definition at line 100 of file old_occupancy_grid_3d.py.

Definition at line 100 of file old_occupancy_grid_3d.py.


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


point_cloud_ros
Author(s): Advait Jain (Healthcare Robotics Lab, Georgia Tech)
autogenerated on Wed Nov 27 2013 12:16:42