|
selfdriving
|
#include <mpp/ptgs/DiffDriveCollisionGridBased.h>
Classes | |
| class | CCollisionGrid |
| struct | TCellForLambdaFunction |
Public Member Functions | |
| virtual void | ptgDiffDriveSteeringFunction (float alpha, float t, float x, float y, float phi, float &v, float &w) const =0 |
| double | getMax_V () const |
| double | getMax_W () const |
Virtual interface of each PTG implementation | |
| bool | inverseMap_WS2TP (double x, double y, int &out_k, double &out_d, double tolerance_dist=0.10) const override |
| mrpt::kinematics::CVehicleVelCmd::Ptr | directionToMotionCommand (uint16_t k) const override |
| mrpt::kinematics::CVehicleVelCmd::Ptr | getSupportedKinematicVelocityCommand () const override |
| void | setRefDistance (const double refDist) override |
| size_t | getPathStepCount (uint16_t k) const override |
| mrpt::math::TPose2D | getPathPose (uint16_t k, uint32_t step) const override |
| double | getPathDist (uint16_t k, uint32_t step) const override |
| bool | getPathStepForDist (uint16_t k, double dist, uint32_t &out_step) const override |
| double | getPathStepDuration () const override |
| double | getMaxLinVel () const override |
| double | getMaxAngVel () const override |
| void | updateTPObstacle (double ox, double oy, std::vector< double > &tp_obstacles) const override |
| void | updateTPObstacleSingle (double ox, double oy, uint16_t k, double &tp_obstacle_k) const override |
| void | onNewNavDynamicState () override |
Protected Types | |
| using | TCollisionCell = std::vector< std::pair< uint16_t, float > > |
Protected Member Functions | |
| DiffDriveCollisionGridBased () | |
| void | internal_processNewRobotShape () override |
| void | internal_initialize (const std::string &cacheFilename=std::string(), const bool verbose=true) override |
| void | internal_deinitialize () override |
| void | loadFromConfigFile (const mrpt::config::CConfigFileBase &cfg, const std::string &sSection) override |
| void | saveToConfigFile (mrpt::config::CConfigFileBase &cfg, const std::string &sSection) const override |
| void | loadDefaultParams () override |
| void | internal_readFromStream (mrpt::serialization::CArchive &in) override |
| void | internal_writeToStream (mrpt::serialization::CArchive &out) const override |
| void | simulateTrajectories (float max_time, float max_dist, float dt) |
| mrpt::math::TTwist2D | getPathTwist (uint16_t k, uint32_t step) const override |
| bool | saveColGridsToFile (const std::string &filename, const mrpt::math::CPolygon &computed_robotShape) const |
| bool | loadColGridsFromFile (const std::string &filename, const mrpt::math::CPolygon ¤t_robotShape) |
Protected Attributes | |
| double | V_MAX {.0} |
| double | W_MAX {.0} |
| double | turningRadiusReference {.10} |
| std::vector< TCPointVector > | m_trajectory |
| double | m_resolution {0.05} |
| double | m_stepTimeDuration {0.01} |
| CCollisionGrid | m_collisionGrid |
| mrpt::containers::CDynamicGrid< TCellForLambdaFunction > | m_lambdaFunctionOptimizer |
Base class for all PTGs suitable to non-holonomic, differentially-driven (or Ackermann) vehicles based on numerical integration of the trajectories and collision look-up-table. Regarding initialize(): in this this family of PTGs, the method builds the collision grid or load it from a cache file. Collision grids must be calculated before calling getTPObstacle(). Robot shape must be set before initializing with setRobotShape(). The rest of PTG parameters should have been set at the constructor.
|
protected |
A list of all the pairs (alpha,distance) such as the robot collides at that cell.
|
protected |
|
override |
In this class, out_action_cmd contains: [0]: linear velocity (m/s), [1]: angular velocity (rad/s). See more docs in CParameterizedTrajectoryGenerator::directionToMotionCommand()
|
inline |
|
inline |
|
inlineoverride |
|
inlineoverride |
|
override |
|
override |
|
override |
|
override |
|
override |
|
overrideprotected |
|
override |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
override |
The default implementation in this class relies on a look-up-table. Derived classes may redefine this to closed-form expressions, when they exist. See full docs in base class CParameterizedTrajectoryGenerator::inverseMap_WS2TP()
|
protected |
|
overrideprotected |
|
overrideprotected |
Possible values in "params" (those in CParameterizedTrajectoryGenerator, which is called internally, plus):
${sKeyPrefix}resolution: The cell size${sKeyPrefix}v_max, ${sKeyPrefix}w_max`: Maximum robot speeds.`${sKeyPrefix}shape_x{0,1,2..}`,${sKeyPrefix}shape_y{0,1,2..}`: Polygonal robot shape [Optional, can be also set via setRobotPolygonShape()]See docs of derived classes for additional parameters in setParams()
|
inlineoverride |
This family of PTGs ignores the dynamic states
|
pure virtual |
The main method to be implemented in derived classes: it defines the differential-driven differential equation
Implemented in mpp::ptg::DiffDrive_C.
|
protected |
|
overrideprotected |
|
override |
Launches an exception in this class: it is not allowed in numerical integration-based PTGs to change the reference distance after initialization.
|
protected |
Numerically solve the diferential equations to generate a family of trajectories
|
override |
|
override |
|
protected |
The collision grid
|
protected |
This grid will contain indexes data for speeding-up the default, brute-force lambda function
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.13