27 TCPoint(
const float x_,
const float y_,
const float phi_,
28 const float t_,
const float dist_,
29 const float v_,
const float w_) :
30 x(x_),
y(y_), phi(phi_),
t(t_), dist(dist_),
v(v_),
w(w_)
48 virtual void ptgDiffDriveSteeringFunction(
float alpha,
float t,
float x,
float y,
float phi,
float &
v,
float &
w)
const = 0;
57 virtual bool inverseMap_WS2TP(
double x,
double y,
int &out_k,
double &out_d,
double tolerance_dist = 0.10)
const MRPT_OVERRIDE;
61 virtual mrpt::kinematics::CVehicleVelCmdPtr directionToMotionCommand(
uint16_t k)
const MRPT_OVERRIDE;
62 virtual mrpt::kinematics::CVehicleVelCmdPtr getSupportedKinematicVelocityCommand()
const MRPT_OVERRIDE;
66 virtual void setRefDistance(
const double refDist)
MRPT_OVERRIDE;
77 void updateTPObstacle(
double ox,
double oy, std::vector<double> &tp_obstacles)
const MRPT_OVERRIDE;
78 void updateTPObstacleSingle(
double ox,
double oy,
uint16_t k,
double &tp_obstacle_k)
const MRPT_OVERRIDE;
94 void internal_initialize(const
std::
string & cacheFilename =
std::
string(), const
bool verbose = true)
MRPT_OVERRIDE;
104 virtual
void loadFromConfigFile(const
mrpt::utils::CConfigFileBase &cfg,const
std::
string &sSection)
MRPT_OVERRIDE;
105 virtual
void saveToConfigFile(
mrpt::utils::CConfigFileBase &cfg,const
std::
string &sSection) const
MRPT_OVERRIDE;
110 double turningRadiusReference;
113 double m_stepTimeDuration;
119 void simulateTrajectories(
125 float *out_max_acc_v = NULL,
126 float *out_max_acc_w = NULL);
152 const TCollisionCell & getTPObstacle(
const float obsX,
const float obsY)
const;
159 void updateCellInfo(
const unsigned int icx,
const unsigned int icy,
const uint16_t k,
const float dist );
184 bool isEmpty()
const {
return k_min==std::numeric_limits<uint16_t>::max(); }
An internal class for storing the collision grid.
GLclampf GLclampf GLclampf alpha
#define MRPT_DECLARE_TTYPENAME_NAMESPACE(_TYPE, __NS)
unsigned __int16 uint16_t
Specifies the min/max values for "k" and "n", respectively.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Trajectory points in C-Space for non-holonomic robots.
double getMaxAngVel() const MRPT_OVERRIDE
Returns the maximum angular velocity expected from this PTG [rad/s].
mrpt::utils::CDynamicGrid< TCellForLambdaFunction > m_lambdaFunctionOptimizer
This grid will contain indexes data for speeding-up the default, brute-force lambda function...
double getMaxLinVel() const MRPT_OVERRIDE
Returns the maximum linear velocity expected from this PTG [m/s].
A wrapper of a TPolygon2D class, implementing CSerializable.
std::vector< TCPoint > TCPointVector
GLubyte GLubyte GLubyte GLubyte w
TCPoint(const float x_, const float y_, const float phi_, const float t_, const float dist_, const float v_, const float w_)
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
A 2D grid of dynamic size which stores any kind of data at each cell.
virtual void onNewNavDynamicState() MRPT_OVERRIDE
This family of PTGs ignores the dynamic states.
Base class for all PTGs using a 2D polygonal robot shape model.
GLsizei const GLchar ** string
std::vector< std::pair< uint16_t, float > > TCollisionCell
A list of all the pairs (alpha,distance) such as the robot collides at that cell. ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CCollisionGrid m_collisionGrid
The collision grid.
virtual ~CCollisionGrid()
::mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, CAbstractHolonomicReactiveMethodPtr &pObj)
Base class for all PTGs suitable to non-holonomic, differentially-driven (or Ackermann) vehicles base...
CCollisionGrid(float x_min, float x_max, float y_min, float y_max, float resolution, CPTG_DiffDrive_CollisionGridBased *parent)
mrpt::utils::CStream NAV_IMPEXP & operator<<(mrpt::utils::CStream &o, const mrpt::nav::TCPoint &p)
unsigned __int32 uint32_t
CPTG_DiffDrive_CollisionGridBased const * m_parent