ugv_nav4d
Classes | Public Member Functions | Protected Attributes | List of all members
ugv_nav4d::PathStatistic Class Reference

#include <PathStatistic.hpp>

Collaboration diagram for ugv_nav4d::PathStatistic:
Collaboration graph

Classes

class  Stats
 

Public Member Functions

 PathStatistic (const traversability_generator3d::TraversabilityConfig &config)
 
void calculateStatistics (const std::vector< const traversability_generator3d::TravGenNode * > &path, const std::vector< base::Pose2D > &poses, const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > &trMap, const std::string &debugObstacleName=std::string())
 
bool isPathFeasible (const std::vector< const traversability_generator3d::TravGenNode * > &path, const std::vector< base::Pose2D > &poses, const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > &trMap)
 
const StatsgetRobotStats () const
 
const StatsgetBoundaryStats () const
 

Protected Attributes

Stats robotStats
 
Stats boundaryStats
 

Detailed Description

Calculates statistics about different patches encountered while traversing a path. I.e. counts patchtes that the robot will traverase when following a path

Constructor & Destructor Documentation

◆ PathStatistic()

ugv_nav4d::PathStatistic::PathStatistic ( const traversability_generator3d::TraversabilityConfig &  config)

Member Function Documentation

◆ calculateStatistics()

void ugv_nav4d::PathStatistic::calculateStatistics ( const std::vector< const traversability_generator3d::TravGenNode * > &  path,
const std::vector< base::Pose2D > &  poses,
const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > &  trMap,
const std::string &  debugObstacleName = std::string() 
)

Accumulates statistics about all patches that are inside a config.costFunctionDist wide corridor around path. This can be used to answer questions such as:

  • How many obstacles does the robot traverse when following this path
  • How many obstacles are close to the robot (but are not directly traversed) when following this path (boundaryStats.getNumObstacles())
  • How many frontiers does the robot traverse when following this path (robotStats.getNumFrontiers())
  • Is it safe to follow this path? (robotStats.getNumObstacles() == 0?)
  • What is the minimum distance to an obstacle on this path?
  • etc.

The statistics are used extensively during planning.

Parameters
pathList of patches that define the path.
posesList of poses on the path. There should be one pose for each patch.
debugObstacleNameoptional name of the debug drawing that should be used for this path
Here is the caller graph for this function:

◆ getBoundaryStats()

const Stats& ugv_nav4d::PathStatistic::getBoundaryStats ( ) const
inline

◆ getRobotStats()

const Stats& ugv_nav4d::PathStatistic::getRobotStats ( ) const
inline
Here is the caller graph for this function:

◆ isPathFeasible()

bool ugv_nav4d::PathStatistic::isPathFeasible ( const std::vector< const traversability_generator3d::TravGenNode * > &  path,
const std::vector< base::Pose2D > &  poses,
const maps::grid::TraversabilityMap3d< traversability_generator3d::TravGenNode * > &  trMap 
)

Member Data Documentation

◆ boundaryStats

Stats ugv_nav4d::PathStatistic::boundaryStats
protected

Statistics about patches in the corridor outside the robot bounding box

◆ robotStats

Stats ugv_nav4d::PathStatistic::robotStats
protected

Statistics about patches that the robot traverses while following a given path


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