pnf::Flow Class Reference

#include <Flow.hpp>

List of all members.


Detailed Description

High-level interface for PNF.

Uses underlying estar::Facade instances etc for implementing multi-layered propagation and risk computations.


Public Types

typedef std::pair< const estar::array<
double > *, double > 
array_info_t

Public Member Functions

 ~Flow ()
bool HaveEnvdist () const
void PropagateEnvdist (bool step)
void MapEnvdist ()
bool HaveObjdist (size_t id) const
void PropagateObjdist (size_t id)
bool HaveAllObjdist () const
void PropagateAllObjdist ()
bool HaveRobdist () const
void PropagateRobdist ()
void ComputeAllCooc (double static_buffer_factor, double static_buffer_degree)
 Buffer zones around static objects: If the buffer factor or degree are non-positive, then simple "on/off" information is used.
void ComputeRisk (const estar::RiskMap &risk_map)
bool HavePNF () const
void PropagatePNF ()
void AddStaticObject (ssize_t ix, ssize_t iy)
void RemoveStaticObject (ssize_t ix, ssize_t iy)
void RemoveDynamicObject (size_t id)
bool AddStaticObject (double x, double y)
bool RemoveStaticObject (double x, double y)
bool SetDynamicObject (size_t id, double x, double y, double r, double v)
bool SetRobot (double x, double y, double r, double v)
bool SetGoal (double x, double y, double r)
void DumpEnvdist (FILE *stream) const
void DumpRobdist (FILE *stream) const
void DumpObjdist (size_t id, FILE *stream) const
void DumpObjCooc (size_t id, FILE *stream) const
void DumpRisk (FILE *stream) const
void DumpPNF (FILE *stream) const
const estar::FacadeGetObjdist (size_t id) const
 
Returns:
0 if invalid id

const estar::RegionGetRegion (size_t id) const
 
Returns:
0 if invalid id

const estar::RegionGetGoal () const
 
Returns:
0 if invalid

const estar::RegionGetRobot () const
 
Returns:
0 if invalid

const estar::FacadeGetRobdist () const
 
Returns:
0 if no robot defined

estar::FacadeGetEnvdist ()
boost::shared_ptr< estar::Grid
const > 
GetEnvdistGrid () const
const estar::FacadeGetPNF () const
array_info_t GetRobotLambda () const
 
Returns:
pair of pointer and max lambda value (excluding infinity) for the robot

array_info_t GetObjectLambda (size_t id) const
 
Returns:
pair of pointer and max lambda value (excluding infinity) for an object, or std::make_pair(0, -1) if the id is invalid (no such dynamic object)

array_info_t GetEnvCooc () const
 
Returns:
pair of pointer and max cooc value, if the environment co-occurrence has been computed using ComputeAllCooc(), otherwise (0, -1).

array_info_t GetObjCooc (size_t id) const
 
Returns:
pair of pointer and max cooc value, or std::make_pair(0, -1) if invalid id or you forgot to call ComputeAllCooc()

array_info_t GetDynamicCooc () const
 
Returns:
pair of pointer and max cooc value, or std::make_pair(0, -1) if invalid.

array_info_t GetRisk () const
 
Returns:
pair of pointer and max risk value, or std::make_pair(0, -1) if risk not available yet


Static Public Member Functions

static FlowCreate (ssize_t xsize, ssize_t ysize, double resolution, bool perform_convolution, bool alternate_worst_case)

Public Attributes

const ssize_t xsize
const ssize_t ysize
const double resolution
const double half_diagonal
const bool perform_convolution
const bool alternate_worst_case

Private Types

typedef std::map< size_t,
boost::shared_ptr< local::Object > > 
objectmap_t

Private Member Functions

 Flow (ssize_t xsize, ssize_t ysize, double resolution, bool perform_convolution, bool alternate_worst_case)
bool CompIndices (double x, double y, ssize_t &ix, ssize_t &iy) const
estar::FacadeGetObjdist (size_t id, FILE *verbose_stream) const
bool DoSetRobot (double x, double y, ssize_t ix, ssize_t iy, double r, double v)
void DoComputeLambda (local::Robot &obj)
void DoComputeCooc (local::Object &obj)

Private Attributes

boost::scoped_ptr< estar::Facadem_envdist
boost::scoped_ptr< local::Robotm_robot
objectmap_t m_object
boost::scoped_ptr< estar::Facadem_pnf
boost::scoped_ptr< estar::Regionm_goal
boost::scoped_ptr< estar::array<
double > > 
m_env_cooc
double m_max_env_cooc
boost::scoped_ptr< estar::array<
double > > 
m_dynamic_cooc
double m_max_dynamic_cooc
boost::scoped_ptr< estar::array<
double > > 
m_risk
double m_max_risk


Member Typedef Documentation

typedef std::pair<const estar::array<double> *, double> pnf::Flow::array_info_t

typedef std::map<size_t, boost::shared_ptr<local::Object> > pnf::Flow::objectmap_t [private]


Constructor & Destructor Documentation

pnf::Flow::Flow ( ssize_t  xsize,
ssize_t  ysize,
double  resolution,
bool  perform_convolution,
bool  alternate_worst_case 
) [private]

pnf::Flow::~Flow (  ) 


Member Function Documentation

Flow * pnf::Flow::Create ( ssize_t  xsize,
ssize_t  ysize,
double  resolution,
bool  perform_convolution,
bool  alternate_worst_case 
) [static]

bool pnf::Flow::HaveEnvdist (  )  const

Todo:
Can return true after reaching max {object, robot} radius, see Algorithm::GetMaxKnownValue().

void pnf::Flow::PropagateEnvdist ( bool  step  ) 

Todo:
Can stop after reaching max {object, robot} radius, see Algorithm::GetMaxKnownValue().

void pnf::Flow::MapEnvdist (  ) 

bool pnf::Flow::HaveObjdist ( size_t  id  )  const

void pnf::Flow::PropagateObjdist ( size_t  id  ) 

bool pnf::Flow::HaveAllObjdist (  )  const

void pnf::Flow::PropagateAllObjdist (  ) 

bool pnf::Flow::HaveRobdist (  )  const

void pnf::Flow::PropagateRobdist (  ) 

void pnf::Flow::ComputeAllCooc ( double  static_buffer_factor,
double  static_buffer_degree 
)

Buffer zones around static objects: If the buffer factor or degree are non-positive, then simple "on/off" information is used.

Otherwise, a buffer is constructed on the environment distance. Sensible values would be static_buffer_factor=1 and static_buffer_degree=2, resulting in a quadratic risk decrease extending one extra robot radius from the walls.

void pnf::Flow::ComputeRisk ( const estar::RiskMap risk_map  ) 

bool pnf::Flow::HavePNF (  )  const

void pnf::Flow::PropagatePNF (  ) 

void pnf::Flow::AddStaticObject ( ssize_t  ix,
ssize_t  iy 
)

void pnf::Flow::RemoveStaticObject ( ssize_t  ix,
ssize_t  iy 
)

void pnf::Flow::RemoveDynamicObject ( size_t  id  ) 

bool pnf::Flow::AddStaticObject ( double  x,
double  y 
)

bool pnf::Flow::RemoveStaticObject ( double  x,
double  y 
)

bool pnf::Flow::SetDynamicObject ( size_t  id,
double  x,
double  y,
double  r,
double  v 
)

bool pnf::Flow::SetRobot ( double  x,
double  y,
double  r,
double  v 
)

bool pnf::Flow::SetGoal ( double  x,
double  y,
double  r 
)

Todo:
URGENT! The goal vs. obstacle problem IS NOT SOLVED!

void pnf::Flow::DumpEnvdist ( FILE *  stream  )  const

void pnf::Flow::DumpRobdist ( FILE *  stream  )  const

void pnf::Flow::DumpObjdist ( size_t  id,
FILE *  stream 
) const

void pnf::Flow::DumpObjCooc ( size_t  id,
FILE *  stream 
) const

void pnf::Flow::DumpRisk ( FILE *  stream  )  const

void pnf::Flow::DumpPNF ( FILE *  stream  )  const

const estar::Facade* pnf::Flow::GetObjdist ( size_t  id  )  const [inline]

Returns:
0 if invalid id

const Region * pnf::Flow::GetRegion ( size_t  id  )  const

Returns:
0 if invalid id

const estar::Region* pnf::Flow::GetGoal (  )  const [inline]

Returns:
0 if invalid

const Region * pnf::Flow::GetRobot (  )  const

Returns:
0 if invalid

const Facade * pnf::Flow::GetRobdist (  )  const

Returns:
0 if no robot defined

estar::Facade& pnf::Flow::GetEnvdist (  )  [inline]

Todo:
non-const only for debugging?

boost::shared_ptr< estar::Grid const > pnf::Flow::GetEnvdistGrid (  )  const

Todo:
A hack around estar::CSpace refactoring

const estar::Facade& pnf::Flow::GetPNF (  )  const [inline]

Flow::array_info_t pnf::Flow::GetRobotLambda (  )  const

Returns:
pair of pointer and max lambda value (excluding infinity) for the robot

Flow::array_info_t pnf::Flow::GetObjectLambda ( size_t  id  )  const

Returns:
pair of pointer and max lambda value (excluding infinity) for an object, or std::make_pair(0, -1) if the id is invalid (no such dynamic object)

Flow::array_info_t pnf::Flow::GetEnvCooc (  )  const

Returns:
pair of pointer and max cooc value, if the environment co-occurrence has been computed using ComputeAllCooc(), otherwise (0, -1).

Flow::array_info_t pnf::Flow::GetObjCooc ( size_t  id  )  const

Returns:
pair of pointer and max cooc value, or std::make_pair(0, -1) if invalid id or you forgot to call ComputeAllCooc()

Flow::array_info_t pnf::Flow::GetDynamicCooc (  )  const

Returns:
pair of pointer and max cooc value, or std::make_pair(0, -1) if invalid.

Flow::array_info_t pnf::Flow::GetRisk (  )  const

Returns:
pair of pointer and max risk value, or std::make_pair(0, -1) if risk not available yet

Note:
the "risk" is "just" the fusion of all co-occurrences

bool pnf::Flow::CompIndices ( double  x,
double  y,
ssize_t ix,
ssize_t iy 
) const [private]

Facade * pnf::Flow::GetObjdist ( size_t  id,
FILE *  verbose_stream 
) const [private]

bool pnf::Flow::DoSetRobot ( double  x,
double  y,
ssize_t  ix,
ssize_t  iy,
double  r,
double  v 
) [private]

Todo:
URGENT! Goal and obstacle handling not made for replanning.

void pnf::Flow::DoComputeLambda ( local::Robot obj  )  [private]

Todo:
EASY SPEEDUP: loop over border instead of area after checking that the object center is not within the sprite!

void pnf::Flow::DoComputeCooc ( local::Object obj  )  [private]


Member Data Documentation

const ssize_t pnf::Flow::xsize

const ssize_t pnf::Flow::ysize

const double pnf::Flow::resolution

const double pnf::Flow::half_diagonal

const bool pnf::Flow::perform_convolution

const bool pnf::Flow::alternate_worst_case

boost::scoped_ptr<estar::Facade> pnf::Flow::m_envdist [private]

boost::scoped_ptr<local::Robot> pnf::Flow::m_robot [private]

objectmap_t pnf::Flow::m_object [private]

boost::scoped_ptr<estar::Facade> pnf::Flow::m_pnf [private]

boost::scoped_ptr<estar::Region> pnf::Flow::m_goal [private]

boost::scoped_ptr<estar::array<double> > pnf::Flow::m_env_cooc [private]

double pnf::Flow::m_max_env_cooc [private]

boost::scoped_ptr<estar::array<double> > pnf::Flow::m_dynamic_cooc [private]

double pnf::Flow::m_max_dynamic_cooc [private]

boost::scoped_ptr<estar::array<double> > pnf::Flow::m_risk [private]

double pnf::Flow::m_max_risk [private]


The documentation for this class was generated from the following files:
doxygen SourceForge.net Logo
E* Interpolated Graph Replanner Wed Dec 12 18:55:51 2007