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