Clearance information for one particular PTG and one set of obstacles.
Usage:
Definition at line 30 of file ClearanceDiagram.h.
#include <mrpt/nav/holonomic/ClearanceDiagram.h>
Public Types | |
using | dist2clearance_t = std::map< double, double > |
[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::serialization::CArchive &in) |
void | writeToStream (mrpt::serialization::CArchive &out) const |
dist2clearance_t & | get_path_clearance (size_t actual_k) |
const dist2clearance_t & | get_path_clearance (size_t actual_k) const |
dist2clearance_t & | get_path_clearance_decimated (size_t decim_k) |
const dist2clearance_t & | get_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_t > | m_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 |
using mrpt::nav::ClearanceDiagram::dist2clearance_t = std::map<double, double> |
[TPS_distance] => normalized_clearance_for_exactly_that_robot_pose
Definition at line 64 of file ClearanceDiagram.h.
ClearanceDiagram::ClearanceDiagram | ( | ) |
default ctor
Definition at line 22 of file ClearanceDiagram.cpp.
void ClearanceDiagram::clear | ( | ) |
Reset to default, empty state.
Definition at line 174 of file ClearanceDiagram.cpp.
References m_actual_num_paths, m_k_a2d, m_k_d2a, and m_raw_clearances.
size_t mrpt::nav::ClearanceDiagram::decimated_k_to_real_k | ( | size_t | k | ) | const |
Definition at line 124 of file ClearanceDiagram.cpp.
References ASSERT_, and mrpt::round().
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram(), and mrpt::nav::CParameterizedTrajectoryGenerator::updateClearance().
|
inline |
Definition at line 41 of file ClearanceDiagram.h.
References m_raw_clearances.
Referenced by getClearance().
|
inline |
Definition at line 42 of file ClearanceDiagram.h.
References m_actual_num_paths.
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::updateClearance().
|
inline |
Definition at line 43 of file ClearanceDiagram.h.
References m_raw_clearances.
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::updateClearance().
ClearanceDiagram::dist2clearance_t & ClearanceDiagram::get_path_clearance | ( | size_t | actual_k | ) |
Definition at line 104 of file ClearanceDiagram.cpp.
References m_raw_clearances, and real_k_to_decimated_k().
const ClearanceDiagram::dist2clearance_t & ClearanceDiagram::get_path_clearance | ( | size_t | actual_k | ) | const |
Definition at line 110 of file ClearanceDiagram.cpp.
References m_raw_clearances, and real_k_to_decimated_k().
|
inline |
Definition at line 68 of file ClearanceDiagram.h.
References m_raw_clearances.
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram(), and mrpt::nav::CParameterizedTrajectoryGenerator::updateClearance().
|
inline |
Definition at line 72 of file ClearanceDiagram.h.
References m_raw_clearances.
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:
Definition at line 132 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().
void mrpt::nav::ClearanceDiagram::readFromStream | ( | mrpt::serialization::CArchive & | in | ) |
Definition at line 75 of file ClearanceDiagram.cpp.
References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.
size_t mrpt::nav::ClearanceDiagram::real_k_to_decimated_k | ( | size_t | k | ) | const |
Definition at line 116 of file ClearanceDiagram.cpp.
References ASSERT_, and mrpt::round().
Referenced by get_path_clearance(), and getClearance().
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 |
Definition at line 27 of file ClearanceDiagram.cpp.
References mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index(), ASSERT_, mrpt::opengl::CMesh::enableColorFromZ(), mrpt::opengl::CMesh::enableTransparency(), mrpt::opengl::CMesh::enableWireFrame(), getClearance(), m_actual_num_paths, m_raw_clearances, mrpt::opengl::CRenderizableDisplayList::setColorA_u8(), mrpt::opengl::CMesh::setXBounds(), mrpt::opengl::CMesh::setYBounds(), and mrpt::opengl::CMesh::setZ().
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 181 of file ClearanceDiagram.cpp.
References ASSERT_ABOVEEQ_, and mrpt::containers::clear().
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram().
void mrpt::nav::ClearanceDiagram::writeToStream | ( | mrpt::serialization::CArchive & | out | ) | const |
Definition at line 94 of file ClearanceDiagram.cpp.
|
protected |
Definition at line 86 of file ClearanceDiagram.h.
Referenced by clear(), get_actual_num_paths(), getClearance(), and renderAs3DObject().
|
protected |
Definition at line 88 of file ClearanceDiagram.h.
Referenced by clear().
|
protected |
Definition at line 88 of file ClearanceDiagram.h.
Referenced by clear().
|
protected |
Container: [decimated_path_k][TPS_distance] => normalized_clearance_for_exactly_that_robot_pose
Definition at line 84 of file ClearanceDiagram.h.
Referenced by clear(), empty(), get_decimated_num_paths(), get_path_clearance(), get_path_clearance_decimated(), getClearance(), and renderAs3DObject().
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |