#include <FacadeReadInterface.hpp>
Inheritance diagram for estar::FacadeReadInterface:
We split this from "write" operations in order to implement comparing repaired navigation functions with entirely replanned ones. See also class FacadeWriteInterface.
Public Types | |
enum | node_status_t { OUT_OF_GRID, UPWIND, DOWNWIND, WAVEFRONT, GOAL, OBSTACLE } |
Useful for deciding whether a client has to keep propagating. More... | |
Public Member Functions | |
virtual | ~FacadeReadInterface () |
virtual double | GetScale () const=0 |
| |
virtual double | GetFreespaceMeta () const=0 |
| |
virtual double | GetObstacleMeta () const=0 |
| |
virtual double | GetValue (ssize_t ix, ssize_t iy) const=0 |
| |
virtual double | GetMeta (ssize_t ix, ssize_t iy) const=0 |
| |
virtual bool | IsGoal (ssize_t ix, ssize_t iy) const=0 |
| |
virtual bool | HaveWork () const=0 |
| |
virtual node_status_t | GetStatus (ssize_t ix, ssize_t iy) const=0 |
Determines the node_status_t of the cell at (ix, iy). | |
virtual node_status_t | GetStatus (vertex_t vertex) const=0 |
You don't need a node's coordinates in order to compute it's status. | |
virtual bool | IsValidIndex (ssize_t ix, ssize_t iy) const=0 |
| |
virtual bool | GetLowestInconsistentValue (double &value) const =0 |
The "lowest inconsistent value" is the "height" of the cell which would be propagated next. | |
virtual const Algorithm & | GetAlgorithm () const=0 |
| |
virtual const Kernel & | GetKernel () const=0 |
| |
virtual int | TraceCarrot (double robot_x, double robot_y, double distance, double stepsize, size_t maxsteps, carrot_trace &trace) const=0 |
Compute a global path via iterative gradient descent. | |
virtual boost::shared_ptr< GridCSpace const > | GetCSpace () const=0 |
Protected Member Functions | |
virtual boost::shared_ptr< Grid const > | GetGrid () const=0 |
| |
Friends | |
void | dump_raw (const FacadeReadInterface &, FILE *, FILE *) |
Similar to eg dump_raw_value(), but writes all values and meta data through a facade instance to two streams (writes sequentially, so things will not get mixed up if you provide the same stream twice). | |
void | dump_queue (const FacadeReadInterface &, size_t, FILE *) |
void | dump_facade_range_highlight (const FacadeReadInterface &, ssize_t, ssize_t, ssize_t, ssize_t, ssize_t, ssize_t, FILE *) |
Useful for deciding whether a client has to keep propagating.
If a cell has status DOWNWIND or WAVEFRONT, its value has not yet been determined and you should keep propagating.
Reimplemented in estar::Facade.
virtual estar::FacadeReadInterface::~FacadeReadInterface | ( | ) | [inline, virtual] |
virtual double estar::FacadeReadInterface::GetScale | ( | ) | const [pure virtual] |
virtual double estar::FacadeReadInterface::GetFreespaceMeta | ( | ) | const [pure virtual] |
it is completely traversable (collision risk is zero).
Implemented in estar::Facade.
virtual double estar::FacadeReadInterface::GetObstacleMeta | ( | ) | const [pure virtual] |
it is completely non-traversable (collision risk is one).
Implemented in estar::Facade.
its "height" when you consider the navigation function to be a potential.
Implemented in estar::Facade.
Use GetFreespaceMeta() and GetObstacleMeta() to determine if the cell is an obstacle, in freespace, or something in between.
Implemented in estar::Facade.
virtual bool estar::FacadeReadInterface::HaveWork | ( | ) | const [pure virtual] |
Implemented in estar::Facade.
virtual node_status_t estar::FacadeReadInterface::GetStatus | ( | ssize_t | ix, | |
ssize_t | iy | |||
) | const [pure virtual] |
Determines the node_status_t of the cell at (ix, iy).
This can be used to determine whether to call ComputeOne() or not. Typically, the cell (ix, iy) is where the robot is currently at, and you only need to propagate the wavefront further if GetStatus returns WAVEFRONT or DOWNWIND.
Implemented in estar::Facade.
virtual node_status_t estar::FacadeReadInterface::GetStatus | ( | vertex_t | vertex | ) | const [pure virtual] |
You don't need a node's coordinates in order to compute it's status.
Just call this variant of GetStatus(ssize_t, ssize_t) instead.
Implemented in estar::Facade.
virtual bool estar::FacadeReadInterface::GetLowestInconsistentValue | ( | double & | value | ) | const [pure virtual] |
The "lowest inconsistent value" is the "height" of the cell which would be propagated next.
This value is needed if you want to figure out, for example, if a given cell is in the region of knownstabilized navigation function or not. However, due to replanning, a cell with a value higher than GetLowestInconsistentValue() can already be at its "stable" height. It will only change if the cell lies in the shadow of one of the changes that triggered the current replanning.
Implemented in estar::Facade.
virtual const Algorithm& estar::FacadeReadInterface::GetAlgorithm | ( | ) | const [pure virtual] |
virtual boost::shared_ptr<Grid const> estar::FacadeReadInterface::GetGrid | ( | ) | const [protected, pure virtual] |
virtual const Kernel& estar::FacadeReadInterface::GetKernel | ( | ) | const [pure virtual] |
virtual int estar::FacadeReadInterface::TraceCarrot | ( | double | robot_x, | |
double | robot_y, | |||
double | distance, | |||
double | stepsize, | |||
size_t | maxsteps, | |||
carrot_trace & | trace | |||
) | const [pure virtual] |
Compute a global path via iterative gradient descent.
Start at the position (robot_x, robot_y)
and repeatedly move stepsize
along the gradient of the E* navigation function. The trace stops if one of the following conditions is met: The curvilinear distance reached the parameter distance
, the number of iterations has reached maxsteps
, or the trace has reached a goal location.
trace
is cleared prior to filling it.Implemented in estar::Facade.
virtual boost::shared_ptr<GridCSpace const> estar::FacadeReadInterface::GetCSpace | ( | ) | const [pure virtual] |
Implemented in estar::Facade.
void dump_raw | ( | const FacadeReadInterface & | , | |
FILE * | , | |||
FILE * | ||||
) | [friend] |
Similar to eg dump_raw_value(), but writes all values and meta data through a facade instance to two streams (writes sequentially, so things will not get mixed up if you provide the same stream twice).
Set a stream to NULL if you're not interested in that part of the dump. Uses -1 as infinity_replacement for dump_raw_value().
void dump_queue | ( | const FacadeReadInterface & | facade, | |
size_t | limit, | |||
FILE * | stream | |||
) | [friend] |
void dump_facade_range_highlight | ( | const FacadeReadInterface & | facade, | |
ssize_t | ix0, | |||
ssize_t | iy0, | |||
ssize_t | ix1, | |||
ssize_t | iy1, | |||
ssize_t | ixhigh, | |||
ssize_t | iyhigh, | |||
FILE * | stream | |||
) | [friend] |