Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
jafar::p3d::P3dArcDumper Class Reference

the class P3DArcDumper provides a way to dump and manipulate all the arcs used in p3d algorithm. More...


Detailed Description

the class P3DArcDumper provides a way to dump and manipulate all the arcs used in p3d algorithm.

Definition at line 462 of file P3d.hpp.

#include <P3d.hpp>

List of all members.

Public Member Functions

 P3dArcDumper (const jafar::p3d::P3d &p3d, jafar::geom::T3D &m2o)
 The constructor Information like n_arcs and max_depth are taken from P3d::conffile.
 ~P3dArcDumper ()
 The destructor.
void update (const jafar::p3d::P3d &p3d, jafar::geom::T3D &m2o)
 Update the arcs ( their position, their cost ..)
std::string gdhe_display () const
 Constructs the gdhe representation of the arcs.
void display (bool only_valid) const
 Display on stderr various informations about each arcs.
void display_to_file (bool only_valid, const std::string &path) const
 Write various information about each arcs in a file.
int set_next_node_coords (jafar::geom::T3DEuler &pos) const
 Give the "next" node coords from the elected arcs.

Private Member Functions

bool has_valid_cost (int, int) const
void _dump (bool, std::ostream &) const
int evaluate_nb_arcs (int nArcs, int depth)
 This evaluate computes the number of arcs used by P3D tree.

Private Attributes

::P3DArcDump * _pdata
 Internal calife data.
jafar::geom::T3DEuler _m2o
 transformation between origin and robot frame
int _n_arcs
 Number of arcs at level 0.
int _max_depth
 Max depth of p3dDumper.

Constructor & Destructor Documentation

The constructor Information like n_arcs and max_depth are taken from P3d::conffile.

Parameters:
p3drepresents the P3D object on which we want to extract arcs
m2orepresents the transformation between origin and robot frame. It must be coherent with the last execution of P3d::plan
Returns:
a valid object

Member Function Documentation

void jafar::p3d::P3dArcDumper::display ( bool  only_valid) const

Display on stderr various informations about each arcs.

Parameters:
only_valid: if it sets to true, the method will only print arcs which are valid (aka which has been computed on this iteration. If it is false, print all arcs
Returns:
Lots of informations on stderr
void jafar::p3d::P3dArcDumper::display_to_file ( bool  only_valid,
const std::string &  path 
) const

Write various information about each arcs in a file.

Parameters:
only_valid: if it sets to true, the method will only print arcs which are valid (aka which has been computed on this iteration. If it is false, print all arcs
pathrepresents the path of the result file
Returns:
PathFile is written
int jafar::p3d::P3dArcDumper::evaluate_nb_arcs ( int  nArcs,
int  depth 
) [private]

This evaluate computes the number of arcs used by P3D tree.

Parameters:
nArcsrepresents the number of initial arc at depth 0
depthrepresents the depth of the P3D tree (depth > 0)
Returns:
the number of arcs in the P3D tree

Constructs the gdhe representation of the arcs.

Returns:
a vector of string, each strings represent one arcs
Warning:
It seems more or less bugged for moment

Give the "next" node coords from the elected arcs.

It is used to run simulation. pos will represents the next position of the vehicule

Returns:
-1 in case of failure (no arcs elected)
0 in case of success, and pos is modified.
Warning:
This method is bugged in the spirit and probably will be removed in near future

Update the arcs ( their position, their cost ..)

Parameters:
p3drepresents the P3D object from which we want to extract arcs
m2orepresents the transformation between origin and robot frame. It must be coherent with the last execution of P3d::plan
Returns:
Nothing.
_pdata and _m2o are modified.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:43 for Jafar by doxygen 1.7.6.1
LAAS-CNRS