selfdriving
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
mpp::ptg::HolonomicBlend Class Reference

#include <mpp/ptgs/HolonomicBlend.h>

Inheritance diagram for mpp::ptg::HolonomicBlend:
mpp::ptg::SpeedTrimmablePTG

Classes

struct  InternalParams
 

Public Member Functions

 HolonomicBlend ()
 
 HolonomicBlend (const mrpt::config::CConfigFileBase &cfg, const std::string &sSection)
 
 ~HolonomicBlend () 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
 
bool supportVelCmdNOP () const override
 
double maxTimeInVelCmdNOP (int path_k) const override
 
std::string getDescription () const override
 
bool inverseMap_WS2TP (double x, double y, int &out_k, double &out_d, double tolerance_dist=0.10) const override
 
bool PTG_IsIntoDomain (double x, double y) const override
 
void onNewNavDynamicState () override
 
bool supportSpeedAtTarget () const override
 
bool inverseMap_WS2TP_with_Tramp (double x, double y, int &out_k, double &out_d, double &T_ramp) const
 
mrpt::kinematics::CVehicleVelCmd::Ptr directionToMotionCommand (uint16_t k) const override
 
mrpt::kinematics::CVehicleVelCmd::Ptr getSupportedKinematicVelocityCommand () const 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
 
double internal_getPathDist (uint32_t step, double T_ramp, double vxf, double vyf) const
 
- Public Member Functions inherited from mpp::ptg::SpeedTrimmablePTG
 SpeedTrimmablePTG ()=default
 
 ~SpeedTrimmablePTG ()=default
 

Static Public Member Functions

static double calc_trans_distance_t_below_Tramp (double k2, double k4, double vxi, double vyi, double t)
 
static double calc_trans_distance_t_below_Tramp_abc (double t, double a, double b, double c)
 

Static Public Attributes

static double PATH_TIME_STEP
 
static double eps
 

Protected Member Functions

InternalParams internal_params_from_dir_and_dynstate (const double dir) const
 
void internal_construct_exprs ()
 
void internal_processNewRobotShape () override
 
void internal_initialize (const std::string &cacheFilename=std::string(), const bool verbose=true) override
 
void internal_deinitialize () override
 

Protected Attributes

double T_ramp_max = -1.0
 
double V_MAX = -1.0
 
double W_MAX = -1.0
 
double turningRadiusReference = 0.30
 
std::string expr_V
 
std::string expr_W
 
std::string expr_T_ramp
 
std::vector< int > m_pathStepCountCache
 
mrpt::expr::CRuntimeCompiledExpression m_expr_v
 
mrpt::expr::CRuntimeCompiledExpression m_expr_w
 
double m_expr_dir = 0
 
double m_expr_target_dir = 0
 
double m_expr_target_dist = 0
 
std::mutex m_expr_mtx
 

Additional Inherited Members

- Public Attributes inherited from mpp::ptg::SpeedTrimmablePTG
double trimmableSpeed_ = 1.0
 

Detailed Description

A PTG for circular-shaped robots with holonomic kinematics.

Note
This class is an enhanced version of mrpt::nav::HolonomicBlend

Constructor & Destructor Documentation

◆ HolonomicBlend() [1/2]

mpp::ptg::HolonomicBlend::HolonomicBlend ( )

◆ HolonomicBlend() [2/2]

mpp::ptg::HolonomicBlend::HolonomicBlend ( const mrpt::config::CConfigFileBase &  cfg,
const std::string &  sSection 
)

◆ ~HolonomicBlend()

mpp::ptg::HolonomicBlend::~HolonomicBlend ( )
override

Member Function Documentation

◆ calc_trans_distance_t_below_Tramp()

static double mpp::ptg::HolonomicBlend::calc_trans_distance_t_below_Tramp ( double  k2,
double  k4,
double  vxi,
double  vyi,
double  t 
)
static

Axiliary function for computing the line-integral distance along the trajectory, handling special cases of 1/0:

◆ calc_trans_distance_t_below_Tramp_abc()

static double mpp::ptg::HolonomicBlend::calc_trans_distance_t_below_Tramp_abc ( double  t,
double  a,
double  b,
double  c 
)
static

Axiliary function for calc_trans_distance_t_below_Tramp() and others

◆ directionToMotionCommand()

mrpt::kinematics::CVehicleVelCmd::Ptr mpp::ptg::HolonomicBlend::directionToMotionCommand ( uint16_t  k) const
override

Converts a discretized "alpha" value into a feasible motion command or action. See derived classes for the meaning of these actions

◆ getDescription()

std::string mpp::ptg::HolonomicBlend::getDescription ( ) const
override

◆ getMaxAngVel()

double mpp::ptg::HolonomicBlend::getMaxAngVel ( ) const
inlineoverride

◆ getMaxLinVel()

double mpp::ptg::HolonomicBlend::getMaxLinVel ( ) const
inlineoverride

◆ getPathDist()

double mpp::ptg::HolonomicBlend::getPathDist ( uint16_t  k,
uint32_t  step 
) const
override

◆ getPathPose()

mrpt::math::TPose2D mpp::ptg::HolonomicBlend::getPathPose ( uint16_t  k,
uint32_t  step 
) const
override

◆ getPathStepCount()

size_t mpp::ptg::HolonomicBlend::getPathStepCount ( uint16_t  k) const
override

◆ getPathStepDuration()

double mpp::ptg::HolonomicBlend::getPathStepDuration ( ) const
override

◆ getPathStepForDist()

bool mpp::ptg::HolonomicBlend::getPathStepForDist ( uint16_t  k,
double  dist,
uint32_t &  out_step 
) const
override

◆ getSupportedKinematicVelocityCommand()

mrpt::kinematics::CVehicleVelCmd::Ptr mpp::ptg::HolonomicBlend::getSupportedKinematicVelocityCommand ( ) const
override

◆ internal_construct_exprs()

void mpp::ptg::HolonomicBlend::internal_construct_exprs ( )
protected

◆ internal_deinitialize()

void mpp::ptg::HolonomicBlend::internal_deinitialize ( )
overrideprotected

◆ internal_getPathDist()

double mpp::ptg::HolonomicBlend::internal_getPathDist ( uint32_t  step,
double  T_ramp,
double  vxf,
double  vyf 
) const

◆ internal_initialize()

void mpp::ptg::HolonomicBlend::internal_initialize ( const std::string &  cacheFilename = std::string(),
const bool  verbose = true 
)
overrideprotected

◆ internal_params_from_dir_and_dynstate()

InternalParams mpp::ptg::HolonomicBlend::internal_params_from_dir_and_dynstate ( const double  dir) const
protected

◆ internal_processNewRobotShape()

void mpp::ptg::HolonomicBlend::internal_processNewRobotShape ( )
overrideprotected

◆ inverseMap_WS2TP()

bool mpp::ptg::HolonomicBlend::inverseMap_WS2TP ( double  x,
double  y,
int &  out_k,
double &  out_d,
double  tolerance_dist = 0.10 
) const
override

◆ inverseMap_WS2TP_with_Tramp()

bool mpp::ptg::HolonomicBlend::inverseMap_WS2TP_with_Tramp ( double  x,
double  y,
int &  out_k,
double &  out_d,
double &  T_ramp 
) const

◆ loadDefaultParams()

void mpp::ptg::HolonomicBlend::loadDefaultParams ( )
override

◆ loadFromConfigFile()

void mpp::ptg::HolonomicBlend::loadFromConfigFile ( const mrpt::config::CConfigFileBase &  cfg,
const std::string &  sSection 
)
override

◆ maxTimeInVelCmdNOP()

double mpp::ptg::HolonomicBlend::maxTimeInVelCmdNOP ( int  path_k) const
override

◆ onNewNavDynamicState()

void mpp::ptg::HolonomicBlend::onNewNavDynamicState ( )
override

◆ PTG_IsIntoDomain()

bool mpp::ptg::HolonomicBlend::PTG_IsIntoDomain ( double  x,
double  y 
) const
override

◆ saveToConfigFile()

void mpp::ptg::HolonomicBlend::saveToConfigFile ( mrpt::config::CConfigFileBase &  cfg,
const std::string &  sSection 
) const
override

◆ supportSpeedAtTarget()

bool mpp::ptg::HolonomicBlend::supportSpeedAtTarget ( ) const
inlineoverride

◆ supportVelCmdNOP()

bool mpp::ptg::HolonomicBlend::supportVelCmdNOP ( ) const
override

◆ updateTPObstacle()

void mpp::ptg::HolonomicBlend::updateTPObstacle ( double  ox,
double  oy,
std::vector< double > &  tp_obstacles 
) const
override

◆ updateTPObstacleSingle()

void mpp::ptg::HolonomicBlend::updateTPObstacleSingle ( double  ox,
double  oy,
uint16_t  k,
double &  tp_obstacle_k 
) const
override

Member Data Documentation

◆ eps

double mpp::ptg::HolonomicBlend::eps
static

Mathematical "epsilon", to detect ill-conditioned situations (e.g. 1/0) (Default: 1e-4)

◆ expr_T_ramp

std::string mpp::ptg::HolonomicBlend::expr_T_ramp
protected

◆ expr_V

std::string mpp::ptg::HolonomicBlend::expr_V
protected

◆ expr_W

std::string mpp::ptg::HolonomicBlend::expr_W
protected

◆ m_expr_dir

double mpp::ptg::HolonomicBlend::m_expr_dir = 0
protected

◆ m_expr_mtx

std::mutex mpp::ptg::HolonomicBlend::m_expr_mtx
protected

◆ m_expr_target_dir

double mpp::ptg::HolonomicBlend::m_expr_target_dir = 0
protected

◆ m_expr_target_dist

double mpp::ptg::HolonomicBlend::m_expr_target_dist = 0
protected

◆ m_expr_v

mrpt::expr::CRuntimeCompiledExpression mpp::ptg::HolonomicBlend::m_expr_v
protected

◆ m_expr_w

mrpt::expr::CRuntimeCompiledExpression mpp::ptg::HolonomicBlend::m_expr_w
protected

◆ m_pathStepCountCache

std::vector<int> mpp::ptg::HolonomicBlend::m_pathStepCountCache
mutableprotected

◆ PATH_TIME_STEP

double mpp::ptg::HolonomicBlend::PATH_TIME_STEP
static

Duration of each PTG "step" (default: 10e-3=10 ms)

◆ T_ramp_max

double mpp::ptg::HolonomicBlend::T_ramp_max = -1.0
protected

◆ turningRadiusReference

double mpp::ptg::HolonomicBlend::turningRadiusReference = 0.30
protected

◆ V_MAX

double mpp::ptg::HolonomicBlend::V_MAX = -1.0
protected

◆ W_MAX

double mpp::ptg::HolonomicBlend::W_MAX = -1.0
protected

The documentation for this class was generated from the following file: