9 #ifndef CAbstractPTGBasedReactive_H
10 #define CAbstractPTGBasedReactive_H
64 virtual std::string getAsText()
const;
76 bool enableConsoleOutput =
true,
77 bool enableLogFile =
false);
88 void setHolonomicMethod(
93 void loadHolonomicMethodConfig(
95 const std::string §ion );
101 virtual void navigate(
const TNavigationParams *params );
113 void enableLogFile(
bool enable);
121 m_timelogger.enable(
true);
128 virtual size_t getPTG_count()
const = 0;
150 void performNavigationStep( );
207 void doEmergencyStop(
const char *msg );
217 virtual void STEP1_CollisionGridsBuilder() = 0;
220 virtual bool STEP2_SenseObstacles() = 0;
225 virtual void STEP3_WSpaceToTPSpace(
const size_t ptg_idx,std::vector<float> &out_TPObstacles) = 0;
228 virtual void loggingGetWSObstaclesAndShape(
CLogFileRecord &out_log) = 0;
232 void STEP5_PTGEvaluator(
234 const std::vector<float> & in_TPObstacles,
242 void preDestructor();
261 void deleteHolonomicObjects();
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
float secureDistanceStart
In normalized distances, the start and end of a ramp function that scales the velocity output from th...
A class for storing, saving and loading a reactive navigation log record for the CReactiveNavigationS...
This class provides simple critical sections functionality.
The struct for configuring navigation requests to CAbstractPTGBasedReactive and derived classes...
std::vector< float > weights
length: 6 [0,5]
float badNavAlarm_AlarmTimeout
The pure virtual class that a user of CAbstractReactiveNavigationSystem-derived classes must implemen...
virtual TNavigationParams * clone() const
float robotMax_W_degps
Max. angular speed (deg/s)
mrpt::utils::CTicTac totalExecutionTime
The structure used to store all relevant information about each transformation into TP-Space...
float colGridRes
CollisionGrid resolution.
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Base class for reactive navigator systems based on TP-Space, with an arbitrary holonomic reactive met...
bool m_collisionGridsMustBeUpdated
bool m_closing_navigator
Signal that the destructor has been called, so no more calls are accepted from other threads...
void enableKeepLogRecords(bool enable=true)
Enables keeping an internal registry of navigation logs that can be queried with getLastLogRecord() ...
bool m_init_done
Whether loadConfigFile() has been called or not.
double evaluation
An evaluation in the range [0,1] for the goodness of the movement.
std::vector< float > TP_Obstacles
One distance per discretized alpha value, describing the "polar plot" of TP obstacles.
mrpt::utils::CStream * m_logFile
The current log file stream, or NULL if not being used.
double speed
The holonomic movement.
float refDistance
"D_{max}" in papers.
virtual ~TNavigationParamsPTG()
CParameterizedTrajectoryGenerator * PTG
The associated PTG.
std::vector< size_t > restrict_PTG_indices
(Default=empty) Optionally, a list of PTG indices can be sent such that the navigator will restrict i...
This namespace contains algorithms for SLAM, localization, map building, representation of robot's ac...
std::vector< CAbstractHolonomicReactiveMethod * > m_holonomicMethod
The holonomic navigation algorithm (one object per PTG, so internal states are maintained) ...
mrpt::system::TTimeStamp badNavAlarm_lastMinDistTime
This is the base class for any user-defined PTG.
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
float badNavAlarm_minDistTarget
For sending an alarm (error event) when it seems that we are not approaching toward the target in a w...
bool valid_TP
For each PTG, whether the target falls into the PTG domain.
float DIST_TO_TARGET_FOR_SENDING_EVENT
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
synch::CCriticalSection m_critZoneNavigating
Critical zones.
This class implements a high-performance stopwatch.
float SPEEDFILTER_TAU
Time constant for the low-pass filter applied to the speed commands.
CLogFileRecord lastLogRecord
The last log.
The structure used for storing a movement generated by a holonomic-method.
mrpt::utils::CTimeLogger m_timelogger
A complete time logger.
const mrpt::utils::CTimeLogger & getTimeLogger() const
Gives access to a const-ref to the internal time logger.
The struct for configuring navigation requests.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
std::vector< TInfoPerPTG > m_infoPerPTG
Temporary buffers for working with each PTG during a navigationStep()
bool m_enableConsoleOutput
Enables / disables the console debug output.
float new_cmd_w
Speed actual and last commands:
bool m_enableKeepLogRecords
See enableKeepLogRecords.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
float meanTotalExecutionTime
std::string robotName
Robot name.
float robotMax_V_mps
Max. linear speed (m/s)
#define REACTIVENAV_IMPEXP
THolonomicMethod
The implemented reactive navigation methods.
CTicTac timerForExecutionPeriod
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.
float meanExecutionPeriod
Runtime estimation of execution period of the method.
bool navigationEndEventSent
Will be false until the navigation end is sent, and it is reset with each new command.
This is the base class for any reactive navigation system.
mrpt::math::TPoint2D TP_Target
The Target, in TP-Space (x,y)
void enableTimeLog(bool enable=true)
Enables/disables the detailed time logger (default:disabled upon construction) When enabled...
float target_dist
TP-Target.