Public Member Functions | Static Public Attributes | Private Attributes | List of all members
tuw::GridMap< T > Class Template Reference

#include <grid_map.h>

Inheritance diagram for tuw::GridMap< T >:
Inheritance graph
[legend]

Public Member Functions

void circle (const Point2D &p, double radius, int8_t value, int thickness=1, int lineType=cv::LINE_AA)
 
int cols () const
 
void erode (double distance, const GridMap &src=GridMap())
 
T & get (const Point2D &_world_coordinates)
 
const T & get (const Point2D &_world_coordinates) const
 
const T & getThresholdFree ()
 
const T & getThresholdOccupied ()
 
const T & getThresholdUnknown ()
 
T & grid (int row, int col)
 
const T & grid (int row, int col) const
 
 GridMap ()
 
 GridMap (const GridMap &)=default
 
 GridMap (GridMap &&)=default
 
template<typename MapMetaData , class ARRAY >
void init (const MapMetaData &metadata, ARRAY *data)
 
template<typename MapMetaData >
void init (const MapMetaData &metadata, const T &data, bool copy=false)
 
template<typename MapMetaData , class ARRAY >
void init (MapMetaData &metadata, ARRAY &data)
 
bool isFree (const Point2D &_world_coordinates) const
 
bool isOccupyied (const Point2D &_world_coordinates) const
 
const cv::Mat_< T > & mat () const
 
T & operator() (const Point2D &_world_coordinates)
 
const T & operator() (const Point2D &_world_coordinates) const
 
T & operator() (double x, double y)
 
const T & operator() (double x, double y) const
 
GridMapoperator= (const GridMap &)=default
 
GridMapoperator= (GridMap &&)=default
 
int rows () const
 
void setThresholdFree (const T &threshold)
 
void setThresholdOccupied (const T &threshold)
 
void setThresholdUnknown (const T &threshold)
 
virtual ~GridMap ()=default
 
- Public Member Functions inherited from tuw::WorldScopedMaps
template<typename T >
void circle (T &map, const Point2D &p, int radius, const cv::Scalar &color, int thickness=1, int lineType=cv::LINE_AA) const
 
template<typename T >
cv::Scalar_< T > get (cv::Mat_< T > &map, const Point2D &p) const
 
int height () const
 
std::string infoHeader () const
 
template<typename T >
void init (const T &metadata)
 
void init (int width_pixel, int height_pixel, double min_y, double max_y, double min_x, double max_x, double rotation=0)
 
bool initialized ()
 
template<typename T >
void line (T &map, const Point2D &p0, const Point2D &p1, const cv::Scalar &color, int thickness=1, int lineType=cv::LINE_AA) const
 
Point2D m2w (const Point2D &src) const
 
Point2Dm2w (const Point2D &src, Point2D &des) const
 
Point2D m2w (double x, double y) const
 
double max_x () const
 
double max_y () const
 
double min_x () const
 
double min_y () const
 
const cv::Matx33d & Mm2w () const
 
const cv::Matx33d & Mw2m () const
 
WorldScopedMapsoperator= (const WorldScopedMaps &)=default
 
WorldScopedMapsoperator= (WorldScopedMaps &&)=default
 
double scale_w2m (double v) const
 
double scale_x () const
 
double scale_y () const
 
Point2D w2m (const Point2D &src) const
 
Point2Dw2m (const Point2D &src, Point2D &des) const
 
Point2D w2m (double x, double y) const
 
int width () const
 
 WorldScopedMaps ()
 
 WorldScopedMaps (const WorldScopedMaps &)=default
 
 WorldScopedMaps (WorldScopedMaps &&)=default
 
virtual ~WorldScopedMaps ()=default
 

Static Public Attributes

static const int8_t SPACE_FREE = 0
 
static const int8_t SPACE_NA = -1
 
static const int8_t SPACE_OCCUPIED = 100
 

Private Attributes

cv::Mat_< T > data_
 
bool read_only_
 
threshold_free_
 
threshold_occupyied_
 
threshold_unknown_
 

Detailed Description

template<class T>
class tuw::GridMap< T >

Definition at line 74 of file grid_map.h.

Constructor & Destructor Documentation

◆ GridMap() [1/3]

template<class T >
tuw::GridMap< T >::GridMap ( )
inline

Definition at line 112 of file grid_map.h.

◆ ~GridMap()

template<class T >
virtual tuw::GridMap< T >::~GridMap ( )
virtualdefault

◆ GridMap() [2/3]

template<class T >
tuw::GridMap< T >::GridMap ( const GridMap< T > &  )
default

◆ GridMap() [3/3]

template<class T >
tuw::GridMap< T >::GridMap ( GridMap< T > &&  )
default

Member Function Documentation

◆ circle()

template<class T >
void tuw::GridMap< T >::circle ( const Point2D p,
double  radius,
int8_t  value,
int  thickness = 1,
int  lineType = cv::LINE_AA 
)
inline

draws a circle given in the visualization space (meter, ....) into a pixel map

Parameters
mapopencv matrix
plocation [m]
radiusradius [m].
value
thicknessline thickness -->
See also
opencv. Negative thickness means that a filled circle is to be drawn.
Parameters
lineTypeline type -->
See also
opencv

Definition at line 161 of file grid_map.h.

◆ cols()

template<class T >
int tuw::GridMap< T >::cols ( ) const
inline

Definition at line 240 of file grid_map.h.

◆ erode()

template<class T >
void tuw::GridMap< T >::erode ( double  distance,
const GridMap< T > &  src = GridMap< T >() 
)
inline

Definition at line 164 of file grid_map.h.

◆ get() [1/2]

template<class T >
T& tuw::GridMap< T >::get ( const Point2D _world_coordinates)
inline

Definition at line 189 of file grid_map.h.

◆ get() [2/2]

template<class T >
const T& tuw::GridMap< T >::get ( const Point2D _world_coordinates) const
inline

Definition at line 193 of file grid_map.h.

◆ getThresholdFree()

template<class T >
const T& tuw::GridMap< T >::getThresholdFree ( )
inline

Definition at line 225 of file grid_map.h.

◆ getThresholdOccupied()

template<class T >
const T& tuw::GridMap< T >::getThresholdOccupied ( )
inline

Definition at line 217 of file grid_map.h.

◆ getThresholdUnknown()

template<class T >
const T& tuw::GridMap< T >::getThresholdUnknown ( )
inline

Definition at line 233 of file grid_map.h.

◆ grid() [1/2]

template<class T >
T& tuw::GridMap< T >::grid ( int  row,
int  col 
)
inline

Definition at line 243 of file grid_map.h.

◆ grid() [2/2]

template<class T >
const T& tuw::GridMap< T >::grid ( int  row,
int  col 
) const
inline

Definition at line 247 of file grid_map.h.

◆ init() [1/3]

template<class T >
template<typename MapMetaData , class ARRAY >
void tuw::GridMap< T >::init ( const MapMetaData &  metadata,
ARRAY *  data 
)
inline

Definition at line 126 of file grid_map.h.

◆ init() [2/3]

template<class T >
template<typename MapMetaData >
void tuw::GridMap< T >::init ( const MapMetaData &  metadata,
const T &  data,
bool  copy = false 
)
inline

Definition at line 140 of file grid_map.h.

◆ init() [3/3]

template<class T >
template<typename MapMetaData , class ARRAY >
void tuw::GridMap< T >::init ( MapMetaData &  metadata,
ARRAY &  data 
)
inline

Definition at line 133 of file grid_map.h.

◆ isFree()

template<class T >
bool tuw::GridMap< T >::isFree ( const Point2D _world_coordinates) const
inline

Definition at line 203 of file grid_map.h.

◆ isOccupyied()

template<class T >
bool tuw::GridMap< T >::isOccupyied ( const Point2D _world_coordinates) const
inline

Definition at line 197 of file grid_map.h.

◆ mat()

template<class T >
const cv::Mat_<T>& tuw::GridMap< T >::mat ( ) const
inline

Definition at line 209 of file grid_map.h.

◆ operator()() [1/4]

template<class T >
T& tuw::GridMap< T >::operator() ( const Point2D _world_coordinates)
inline

Definition at line 181 of file grid_map.h.

◆ operator()() [2/4]

template<class T >
const T& tuw::GridMap< T >::operator() ( const Point2D _world_coordinates) const
inline

Definition at line 185 of file grid_map.h.

◆ operator()() [3/4]

template<class T >
T& tuw::GridMap< T >::operator() ( double  x,
double  y 
)
inline

Definition at line 173 of file grid_map.h.

◆ operator()() [4/4]

template<class T >
const T& tuw::GridMap< T >::operator() ( double  x,
double  y 
) const
inline

Definition at line 177 of file grid_map.h.

◆ operator=() [1/2]

template<class T >
GridMap& tuw::GridMap< T >::operator= ( const GridMap< T > &  )
default

◆ operator=() [2/2]

template<class T >
GridMap& tuw::GridMap< T >::operator= ( GridMap< T > &&  )
default

◆ rows()

template<class T >
int tuw::GridMap< T >::rows ( ) const
inline

Definition at line 237 of file grid_map.h.

◆ setThresholdFree()

template<class T >
void tuw::GridMap< T >::setThresholdFree ( const T &  threshold)
inline

Definition at line 221 of file grid_map.h.

◆ setThresholdOccupied()

template<class T >
void tuw::GridMap< T >::setThresholdOccupied ( const T &  threshold)
inline

Definition at line 213 of file grid_map.h.

◆ setThresholdUnknown()

template<class T >
void tuw::GridMap< T >::setThresholdUnknown ( const T &  threshold)
inline

Definition at line 229 of file grid_map.h.

Member Data Documentation

◆ data_

template<class T >
cv::Mat_<T> tuw::GridMap< T >::data_
private

Definition at line 253 of file grid_map.h.

◆ read_only_

template<class T >
bool tuw::GridMap< T >::read_only_
private

Definition at line 252 of file grid_map.h.

◆ SPACE_FREE

template<class T >
const int8_t tuw::GridMap< T >::SPACE_FREE = 0
static

Definition at line 109 of file grid_map.h.

◆ SPACE_NA

template<class T >
const int8_t tuw::GridMap< T >::SPACE_NA = -1
static

Definition at line 108 of file grid_map.h.

◆ SPACE_OCCUPIED

template<class T >
const int8_t tuw::GridMap< T >::SPACE_OCCUPIED = 100
static

Definition at line 110 of file grid_map.h.

◆ threshold_free_

template<class T >
T tuw::GridMap< T >::threshold_free_
private

Definition at line 256 of file grid_map.h.

◆ threshold_occupyied_

template<class T >
T tuw::GridMap< T >::threshold_occupyied_
private

Definition at line 254 of file grid_map.h.

◆ threshold_unknown_

template<class T >
T tuw::GridMap< T >::threshold_unknown_
private

Definition at line 255 of file grid_map.h.


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


tuw_geometry
Author(s): Markus Bader
autogenerated on Sun Feb 26 2023 03:25:40