Full evaluation of all possible directions within the discrete set of input directions.
These are the optional parameters of the method which can be set by means of a configuration file passed to the constructor or to CHolonomicFullEval::initialize() or directly in CHolonomicFullEval::options
Definition at line 50 of file CHolonomicFullEval.h.
#include <mrpt/nav/holonomic/CHolonomicFullEval.h>
Classes | |
struct | EvalOutput |
struct | TOptions |
Algorithm options. More... | |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) throw () |
void | operator delete[] (void *ptr) throw () |
void | operator delete (void *memory, void *ptr) throw () |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
void | operator delete (void *ptr, const std::nothrow_t &) throw () |
CHolonomicFullEval (const mrpt::utils::CConfigFileBase *INI_FILE=NULL) | |
Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL. More... | |
void | navigate (const NavInput &ni, NavOutput &no) MRPT_OVERRIDE |
Invokes the holonomic navigation algorithm itself. More... | |
virtual void | initialize (const mrpt::utils::CConfigFileBase &INI_FILE) MRPT_OVERRIDE |
Initialize the parameters of the navigator, reading from the default section name (see derived classes) or the one set via setConfigFileSectionName() More... | |
virtual void | saveConfigFile (mrpt::utils::CConfigFileBase &c) const MRPT_OVERRIDE |
saves all available parameters, in a forma loadable by initialize() More... | |
double | getTargetApproachSlowDownDistance () const MRPT_OVERRIDE |
Returns the actual value of this parameter [m], as set via the children class options structure. More... | |
void | setTargetApproachSlowDownDistance (const double dist) MRPT_OVERRIDE |
Sets the actual value of this parameter [m]. More... | |
void | setConfigFileSectionName (const std::string §Name) |
Defines the name of the section used in initialize() More... | |
std::string | getConfigFileSectionName () const |
Gets the name of the section used in initialize() More... | |
void | setAssociatedPTG (mrpt::nav::CParameterizedTrajectoryGenerator *ptg) |
Optionally, sets the associated PTG, just in case a derived class requires this info (not required for methods where the robot kinematics are totally abstracted) More... | |
mrpt::nav::CParameterizedTrajectoryGenerator * | getAssociatedPTG () const |
Returns the pointer set by setAssociatedPTG() More... | |
void | enableApproachTargetSlowDown (bool enable) |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
CObject * | clone () const |
Cloning interface for smart pointers. More... | |
RTTI classes and functions | |
mrpt::utils::CObjectPtr | duplicateGetSmartPtr () const |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
static CAbstractHolonomicReactiveMethod * | Create (const std::string &className) MRPT_NO_THROWS |
Class factory from class name, e.g. More... | |
Public Attributes | |
TOptions | options |
Parameters of the algorithm (can be set manually or loaded from CHolonomicFullEval::initialize or options.loadFromConfigFile(), etc.) More... | |
Static Public Attributes | |
static const mrpt::utils::TRuntimeClassId | classCObject |
RTTI stuff | |
static const mrpt::utils::TRuntimeClassId | classCAbstractHolonomicReactiveMethod |
RTTI stuff | |
static const mrpt::utils::TRuntimeClassId | classCSerializable |
Protected Member Functions | |
CSerializable virtual methods | |
void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const |
Introduces a pure virtual method responsible for writing to a CStream. More... | |
void | readFromStream (mrpt::utils::CStream &in, int version) |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More... | |
Protected Attributes | |
mrpt::nav::CParameterizedTrajectoryGenerator * | m_associatedPTG |
If applicable, this will contain the argument of the most recent call to setAssociatedPTG() More... | |
bool | m_enableApproachTargetSlowDown |
Whether to decrease speed when approaching target. More... | |
Private Member Functions | |
unsigned int | direction2sector (const double a, const unsigned int N) |
virtual void | postProcessDirectionEvaluations (std::vector< double > &dir_evals, const NavInput &ni, unsigned int trg_idx) |
void | evalSingleTarget (unsigned int target_idx, const NavInput &ni, EvalOutput &eo) |
Evals one single target of the potentially many of them in NavInput. More... | |
Private Attributes | |
unsigned int | m_last_selected_sector |
mrpt::math::CMatrixD | m_dirs_scores |
Individual scores for each direction: (i,j), i (row) are directions, j (cols) are scores. Not all directions may have evaluations, in which case a "-1" value will be found. More... | |
mrpt::obs::CSinCosLookUpTableFor2DScans | m_sincos_lut |
RTTI stuff | |
typedef CHolonomicFullEvalPtr | Ptr |
typedef CHolonomicFullEvalPtr | ConstPtr |
static mrpt::utils::CLASSINIT | _init_CHolonomicFullEval |
static mrpt::utils::TRuntimeClassId | classCHolonomicFullEval |
static const mrpt::utils::TRuntimeClassId * | classinfo |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. More... | |
static mrpt::utils::CObject * | CreateObject () |
static CHolonomicFullEvalPtr | Create () |
typedef CHolonomicFullEvalPtr mrpt::nav::CHolonomicFullEval::ConstPtr |
Definition at line 52 of file CHolonomicFullEval.h.
typedef CHolonomicFullEvalPtr mrpt::nav::CHolonomicFullEval::Ptr |
A typedef for the associated smart pointer
Definition at line 52 of file CHolonomicFullEval.h.
CHolonomicFullEval::CHolonomicFullEval | ( | const mrpt::utils::CConfigFileBase * | INI_FILE = NULL | ) |
Initialize the parameters of the navigator, from some configuration file, or default values if set to NULL.
Definition at line 37 of file CHolonomicFullEval.cpp.
|
staticprotected |
|
inlineinherited |
|
static |
|
staticinherited |
Class factory from class name, e.g.
"CHolonomicVFF"
, etc.
std::logic_error | On invalid or missing parameters. |
Definition at line 50 of file CAbstractHolonomicReactiveMethod.cpp.
References mrpt::utils::TRuntimeClassId::createObject(), mrpt::utils::findRegisteredClass(), and mrpt::utils::registerAllPendingClasses().
Referenced by mrpt::nav::CAbstractPTGBasedReactive::setHolonomicMethod().
|
static |
|
private |
Definition at line 505 of file CHolonomicFullEval.cpp.
References M_PI, mrpt::utils::round(), and mrpt::math::wrapToPi().
|
virtual |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
inlineinherited |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
Definition at line 162 of file CObject.h.
References mrpt::utils::CObjectPtr.
Referenced by mrpt::obs::CRawlog::addActions(), mrpt::slam::CIncrementalMapPartitioner::addMapFrame(), and mrpt::obs::CRawlog::addObservations().
|
inlineinherited |
Definition at line 100 of file CAbstractHolonomicReactiveMethod.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate().
|
private |
Evals one single target of the potentially many of them in NavInput.
Definition at line 65 of file CHolonomicFullEval.cpp.
References mrpt::mrpt::utils::abs_diff(), mrpt::obs::T2DScanProperties::aperture, ASSERT_, ASSERT_ABOVE_, ASSERT_EQUAL_, mrpt::math::TSegment2D::distance(), mrpt::mrpt::utils::keep_max(), mrpt::mrpt::utils::keep_min(), M_PI, min, mmin(), mrpt::math::norm(), mrpt::obs::T2DScanProperties::nRays, NUM_FACTORS, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::obstacles, mrpt::nav::CHolonomicFullEval::EvalOutput::phase_scores, mrpt::math::TSegment2D::point1, mrpt::math::TSegment2D::point2, mrpt::obs::T2DScanProperties::rightToLeft, mrpt::utils::round(), mrpt::math::square(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::targets, val, mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
inherited |
Returns the pointer set by setAssociatedPTG()
Definition at line 45 of file CAbstractHolonomicReactiveMethod.cpp.
|
inherited |
Gets the name of the section used in initialize()
Definition at line 37 of file CAbstractHolonomicReactiveMethod.cpp.
|
virtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::nav::CAbstractHolonomicReactiveMethod.
|
inlinevirtual |
Returns the actual value of this parameter [m], as set via the children class options structure.
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
Definition at line 87 of file CHolonomicFullEval.h.
References mrpt::nav::CHolonomicFullEval::TOptions::TARGET_SLOW_APPROACHING_DISTANCE.
|
virtual |
Initialize the parameters of the navigator, reading from the default section name (see derived classes) or the one set via setConfigFileSectionName()
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
Definition at line 49 of file CHolonomicFullEval.cpp.
Invokes the holonomic navigation algorithm itself.
See the description of the input/output structures for details on each parameter.
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
Definition at line 348 of file CHolonomicFullEval.cpp.
References ASSERT_, ASSERT_EQUAL_, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::clearance, mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::desiredDirection, mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::desiredSpeed, TGap::k_from, mrpt::mrpt::utils::keep_max(), mrpt::mrpt::utils::keep_min(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavOutput::logRecord, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::maxObstacleDist, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::maxRobotSpeed, min, mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::obstacles, mrpt::mrpt::math::square(), mrpt::nav::CAbstractHolonomicReactiveMethod::NavInput::targets, and val.
Definition at line 52 of file CHolonomicFullEval.h.
Definition at line 52 of file CHolonomicFullEval.h.
|
inline |
Definition at line 52 of file CHolonomicFullEval.h.
Definition at line 52 of file CHolonomicFullEval.h.
Definition at line 52 of file CHolonomicFullEval.h.
|
inline |
Definition at line 52 of file CHolonomicFullEval.h.
|
inline |
Definition at line 52 of file CHolonomicFullEval.h.
|
inline |
Definition at line 52 of file CHolonomicFullEval.h.
|
privatevirtual |
Definition at line 739 of file CHolonomicFullEval.cpp.
|
protectedvirtual |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 695 of file CHolonomicFullEval.cpp.
References mrpt::nav::CHolonomicFullEval::TOptions::clearance_threshold_ratio, mrpt::nav::CHolonomicFullEval::TOptions::factorNormalizeOrNot, mrpt::nav::CHolonomicFullEval::TOptions::factorWeights, mrpt::nav::CHolonomicFullEval::TOptions::gap_width_ratio_threshold, mrpt::nav::CHolonomicFullEval::TOptions::HYSTERESIS_SECTOR_COUNT, m_last_selected_sector, MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, mrpt::nav::CHolonomicFullEval::TOptions::OBSTACLE_SLOW_DOWN_DISTANCE, options, mrpt::nav::CHolonomicFullEval::TOptions::PHASE_FACTORS, mrpt::nav::CHolonomicFullEval::TOptions::PHASE_THRESHOLDS, mrpt::nav::CHolonomicFullEval::TOptions::TARGET_SLOW_APPROACHING_DISTANCE, mrpt::nav::CHolonomicFullEval::TOptions::TOO_CLOSE_OBSTACLE, and version.
|
virtual |
saves all available parameters, in a forma loadable by initialize()
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
Definition at line 45 of file CHolonomicFullEval.cpp.
|
inherited |
Optionally, sets the associated PTG, just in case a derived class requires this info (not required for methods where the robot kinematics are totally abstracted)
Definition at line 41 of file CAbstractHolonomicReactiveMethod.cpp.
|
inherited |
Defines the name of the section used in initialize()
Defines the name of the section (Default: "FULL_EVAL_CONFIG")
Definition at line 33 of file CAbstractHolonomicReactiveMethod.cpp.
|
inlinevirtual |
Sets the actual value of this parameter [m].
Implements mrpt::nav::CAbstractHolonomicReactiveMethod.
Definition at line 88 of file CHolonomicFullEval.h.
References mrpt::nav::CHolonomicFullEval::TOptions::TARGET_SLOW_APPROACHING_DISTANCE.
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or NULL is class does not support conversion to MATLAB. Definition at line 79 of file CSerializable.h.
|
protectedvirtual |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
out | The output binary stream where object must be dumped. |
getVersion | If NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 676 of file CHolonomicFullEval.cpp.
References mrpt::nav::CHolonomicFullEval::TOptions::clearance_threshold_ratio, mrpt::nav::CHolonomicFullEval::TOptions::factorNormalizeOrNot, mrpt::nav::CHolonomicFullEval::TOptions::factorWeights, mrpt::nav::CHolonomicFullEval::TOptions::gap_width_ratio_threshold, mrpt::nav::CHolonomicFullEval::TOptions::HYSTERESIS_SECTOR_COUNT, m_last_selected_sector, mrpt::nav::CHolonomicFullEval::TOptions::OBSTACLE_SLOW_DOWN_DISTANCE, options, mrpt::nav::CHolonomicFullEval::TOptions::PHASE_FACTORS, mrpt::nav::CHolonomicFullEval::TOptions::PHASE_THRESHOLDS, mrpt::nav::CHolonomicFullEval::TOptions::TARGET_SLOW_APPROACHING_DISTANCE, mrpt::nav::CHolonomicFullEval::TOptions::TOO_CLOSE_OBSTACLE, and version.
|
staticprotected |
Definition at line 52 of file CHolonomicFullEval.h.
|
staticinherited |
Definition at line 47 of file CAbstractHolonomicReactiveMethod.h.
|
static |
Definition at line 52 of file CHolonomicFullEval.h.
|
staticinherited |
|
staticinherited |
Definition at line 42 of file CSerializable.h.
|
static |
Definition at line 52 of file CHolonomicFullEval.h.
|
protectedinherited |
If applicable, this will contain the argument of the most recent call to setAssociatedPTG()
Definition at line 102 of file CAbstractHolonomicReactiveMethod.h.
|
private |
Individual scores for each direction: (i,j), i (row) are directions, j (cols) are scores. Not all directions may have evaluations, in which case a "-1" value will be found.
Definition at line 93 of file CHolonomicFullEval.h.
|
protectedinherited |
Whether to decrease speed when approaching target.
Definition at line 103 of file CAbstractHolonomicReactiveMethod.h.
|
private |
Definition at line 91 of file CHolonomicFullEval.h.
Referenced by readFromStream(), and writeToStream().
|
private |
Definition at line 104 of file CHolonomicFullEval.h.
TOptions mrpt::nav::CHolonomicFullEval::options |
Parameters of the algorithm (can be set manually or loaded from CHolonomicFullEval::initialize or options.loadFromConfigFile(), etc.)
Definition at line 85 of file CHolonomicFullEval.h.
Referenced by readFromStream(), and writeToStream().
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |