Public Member Functions | Private Member Functions | Private Attributes | List of all members
beluga_ros.conversion_utils.NDTMap Class Reference

Public Member Functions

None __init__ (self, float resolution)
 
def add_distribution (self, DiscreteCell cell, NormalDistribution ndt)
 
def from_hdf5 (cls, Path hdf5_file)
 
bool is_close (self, "NDTMap" other, float abs_tol=1e-8)
 
plt.figure plot (self, bool show=False)
 
def to_hdf5 (self, Path output_file_path)
 

Private Member Functions

def _get_plot_bounds (self)
 

Private Attributes

 _resolution
 

Detailed Description

Definition at line 62 of file conversion_utils.py.

Constructor & Destructor Documentation

◆ __init__()

None beluga_ros.conversion_utils.NDTMap.__init__ (   self,
float  resolution 
)
Create a new NDT map with cell size of 'resolution'.

Definition at line 63 of file conversion_utils.py.

Member Function Documentation

◆ _get_plot_bounds()

def beluga_ros.conversion_utils.NDTMap._get_plot_bounds (   self)
private

Definition at line 72 of file conversion_utils.py.

◆ add_distribution()

def beluga_ros.conversion_utils.NDTMap.add_distribution (   self,
DiscreteCell  cell,
NormalDistribution  ndt 
)
Add a new cell with its distribution.

Definition at line 68 of file conversion_utils.py.

◆ from_hdf5()

def beluga_ros.conversion_utils.NDTMap.from_hdf5 (   cls,
Path  hdf5_file 
)
Create an NDTMap instance from a path to a hdf5 file.

See 'to_hdf5' docstring for details on the hdf5 format.

Definition at line 170 of file conversion_utils.py.

◆ is_close()

bool beluga_ros.conversion_utils.NDTMap.is_close (   self,
"NDTMap"  other,
float   abs_tol = 1e-8 
)
Equality with tolerance between two NDT maps.

Definition at line 100 of file conversion_utils.py.

◆ plot()

plt.figure beluga_ros.conversion_utils.NDTMap.plot (   self,
bool   show = False 
)
Plot the map using contour plots into the current figure and returns it.

Optionally show the plot based on the 'show' parameter.

Definition at line 116 of file conversion_utils.py.

◆ to_hdf5()

def beluga_ros.conversion_utils.NDTMap.to_hdf5 (   self,
Path  output_file_path 
)
Serialize the NDT map into an HDF5 format.

See https://docs.hdfgroup.org/hdf5/develop/_intro_h_d_f5.html for details on the format.
It'll create 4 datasets:
    - "resolution": () resolution for the discrete grid (cells are resolution x
      resolution m^2 squares).
    - "cells": (NUM_CELLS, 2) that contains the cell coordinates.
    - "means": (NUM_CELLS, 2) that contains the 2d mean of the normal distribution
      of the cell.
    - "covariances": (NUM_CELLS, 2, 2) Contains the covariance for each cell.

Definition at line 138 of file conversion_utils.py.

Member Data Documentation

◆ _resolution

beluga_ros.conversion_utils.NDTMap._resolution
private

Definition at line 65 of file conversion_utils.py.


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


beluga_ros
Author(s):
autogenerated on Tue Jul 16 2024 03:00:02