Main MRPT website > C++ reference for MRPT 1.5.7
List of all members | Public Types | Public Member Functions | Protected Attributes
mrpt::nav::ClearanceDiagram Class Reference

Detailed Description

Clearance information for one particular PTG and one set of obstacles.

Usage:

Definition at line 28 of file ClearanceDiagram.h.

#include <mrpt/nav/holonomic/ClearanceDiagram.h>

Public Types

typedef std::map< double, double > dist2clearance_t
 [TPS_distance] => normalized_clearance_for_exactly_that_robot_pose */ More...
 

Public Member Functions

 ClearanceDiagram ()
 default ctor More...
 
void clear ()
 Reset to default, empty state. More...
 
void resize (size_t actual_num_paths, size_t decimated_num_paths)
 Initializes the container to allocate decimated_num_paths entries, as a decimated subset of a total of actual_num_paths paths. More...
 
bool empty () const
 
size_t get_actual_num_paths () const
 
size_t get_decimated_num_paths () const
 
double getClearance (uint16_t k, double TPS_query_distance, bool integrate_over_path) const
 Gets the clearance for path k and distance TPS_query_distance in one of two modes: More...
 
void renderAs3DObject (mrpt::opengl::CMesh &mesh, double min_x, double max_x, double min_y, double max_y, double cell_res, bool integrate_over_path) const
 
void readFromStream (mrpt::utils::CStream &in)
 
void writeToStream (mrpt::utils::CStream &out) const
 
dist2clearance_tget_path_clearance (size_t actual_k)
 
const dist2clearance_tget_path_clearance (size_t actual_k) const
 
dist2clearance_tget_path_clearance_decimated (size_t decim_k)
 
const dist2clearance_tget_path_clearance_decimated (size_t decim_k) const
 
size_t real_k_to_decimated_k (size_t k) const
 
size_t decimated_k_to_real_k (size_t k) const
 

Protected Attributes

std::vector< dist2clearance_tm_raw_clearances
 Container: [decimated_path_k][TPS_distance] => normalized_clearance_for_exactly_that_robot_pose. More...
 
size_t m_actual_num_paths
 
double m_k_a2d
 
double m_k_d2a
 

Member Typedef Documentation

◆ dist2clearance_t

typedef std::map<double, double> mrpt::nav::ClearanceDiagram::dist2clearance_t

[TPS_distance] => normalized_clearance_for_exactly_that_robot_pose */

Definition at line 50 of file ClearanceDiagram.h.

Constructor & Destructor Documentation

◆ ClearanceDiagram()

ClearanceDiagram::ClearanceDiagram ( )

default ctor

Definition at line 22 of file ClearanceDiagram.cpp.

Member Function Documentation

◆ clear()

void ClearanceDiagram::clear ( )

Reset to default, empty state.

Definition at line 163 of file ClearanceDiagram.cpp.

References m_actual_num_paths, m_k_a2d, m_k_d2a, and m_raw_clearances.

◆ decimated_k_to_real_k()

size_t mrpt::nav::ClearanceDiagram::decimated_k_to_real_k ( size_t  k) const

◆ empty()

bool mrpt::nav::ClearanceDiagram::empty ( ) const
inline

Definition at line 36 of file ClearanceDiagram.h.

Referenced by getClearance().

◆ get_actual_num_paths()

size_t mrpt::nav::ClearanceDiagram::get_actual_num_paths ( ) const
inline

◆ get_decimated_num_paths()

size_t mrpt::nav::ClearanceDiagram::get_decimated_num_paths ( ) const
inline

◆ get_path_clearance() [1/2]

ClearanceDiagram::dist2clearance_t & ClearanceDiagram::get_path_clearance ( size_t  actual_k)

Definition at line 100 of file ClearanceDiagram.cpp.

References m_raw_clearances, and real_k_to_decimated_k().

◆ get_path_clearance() [2/2]

const ClearanceDiagram::dist2clearance_t & ClearanceDiagram::get_path_clearance ( size_t  actual_k) const

Definition at line 105 of file ClearanceDiagram.cpp.

References m_raw_clearances, and real_k_to_decimated_k().

◆ get_path_clearance_decimated() [1/2]

dist2clearance_t& mrpt::nav::ClearanceDiagram::get_path_clearance_decimated ( size_t  decim_k)
inline

◆ get_path_clearance_decimated() [2/2]

const dist2clearance_t& mrpt::nav::ClearanceDiagram::get_path_clearance_decimated ( size_t  decim_k) const
inline

Definition at line 55 of file ClearanceDiagram.h.

◆ getClearance()

double ClearanceDiagram::getClearance ( uint16_t  k,
double  TPS_query_distance,
bool  integrate_over_path 
) const

Gets the clearance for path k and distance TPS_query_distance in one of two modes:

  • [integrate_over_path=false] clearance from that specific spot, or
  • [integrate_over_path=true] average clearance over the path from the origin to that specific spot.

Definition at line 126 of file ClearanceDiagram.cpp.

References ASSERT_BELOW_, empty(), m_actual_num_paths, m_raw_clearances, and real_k_to_decimated_k().

Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CHolonomicFullEval::evalSingleTarget(), and renderAs3DObject().

◆ readFromStream()

void mrpt::nav::ClearanceDiagram::readFromStream ( mrpt::utils::CStream in)

Definition at line 73 of file ClearanceDiagram.cpp.

References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, and version.

◆ real_k_to_decimated_k()

size_t mrpt::nav::ClearanceDiagram::real_k_to_decimated_k ( size_t  k) const

Definition at line 110 of file ClearanceDiagram.cpp.

References ASSERT_, and mrpt::utils::round().

Referenced by get_path_clearance(), and getClearance().

◆ renderAs3DObject()

void ClearanceDiagram::renderAs3DObject ( mrpt::opengl::CMesh mesh,
double  min_x,
double  max_x,
double  min_y,
double  max_y,
double  cell_res,
bool  integrate_over_path 
) const

◆ resize()

void mrpt::nav::ClearanceDiagram::resize ( size_t  actual_num_paths,
size_t  decimated_num_paths 
)

Initializes the container to allocate decimated_num_paths entries, as a decimated subset of a total of actual_num_paths paths.

Definition at line 170 of file ClearanceDiagram.cpp.

References ASSERT_ABOVEEQ_, and mrpt::utils::clear().

Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram().

◆ writeToStream()

void mrpt::nav::ClearanceDiagram::writeToStream ( mrpt::utils::CStream out) const

Definition at line 91 of file ClearanceDiagram.cpp.

References version.

Member Data Documentation

◆ m_actual_num_paths

size_t mrpt::nav::ClearanceDiagram::m_actual_num_paths
protected

Definition at line 64 of file ClearanceDiagram.h.

Referenced by clear(), getClearance(), and renderAs3DObject().

◆ m_k_a2d

double mrpt::nav::ClearanceDiagram::m_k_a2d
protected

Definition at line 65 of file ClearanceDiagram.h.

Referenced by clear().

◆ m_k_d2a

double mrpt::nav::ClearanceDiagram::m_k_d2a
protected

Definition at line 65 of file ClearanceDiagram.h.

Referenced by clear().

◆ m_raw_clearances

std::vector<dist2clearance_t> mrpt::nav::ClearanceDiagram::m_raw_clearances
protected

Container: [decimated_path_k][TPS_distance] => normalized_clearance_for_exactly_that_robot_pose.

Definition at line 62 of file ClearanceDiagram.h.

Referenced by clear(), get_path_clearance(), getClearance(), and renderAs3DObject().




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019