Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::ScaleInverseVanishF Class Reference
[ObstacleAvoidance]

\ ScaleInverseVanishF One type of APF where Scalar function starts from infinity at a certain value and decreases as the argument grows until vanishing completely at a certain value. The function is F(x) = k*[(mx-x)/(x-mn)]^z + thresh, so that if (x>=mx), (F(x) = thresh), and as (x->mn), (F(x)->inf). If thres = 0, then it means that APF will have no effect when x >= mx. Note: this function object does not check for x < mn.

#include <ScaleInverseF.hpp>

Inheritance diagram for OSCAR::ScaleInverseVanishF:

Inheritance graph
[legend]
List of all members.

Public Methods

 ScaleInverseVanishF (double mx=100.0, double mn=1.0, double Fth=0.0, double Kf=1.0, double z=1.0)
 ScaleInverseVanishF (const ScaleInverseVanishF &arg)
ScaleInverseVanishF & operator= (const ScaleInverseVanishF &rhs)
double & Kf ()
const double & Kf () const
double & Max ()
const double & Max () const
double & Min ()
const double & Min () const
double & Z ()
const double & Z () const
double & Fth ()
const double & Fth () const
double operator() (const double x) const
double Derivative (const double x) const
virtual ~ScaleInverseVanishF ()

Protected Attributes

double k
double mx
double mn
double z
double thresh

Constructor & Destructor Documentation

OSCAR::ScaleInverseVanishF::ScaleInverseVanishF double    mx = 100.0,
double    mn = 1.0,
double    Fth = 0.0,
double    Kf = 1.0,
double    z = 1.0
[inline]
 

Constructor This function object calculates force magnitude as a function of distance.

Parameters:
mx The maximum distance at which an obstacle has influence Default value is 100.0.
mn The minimum distance at which the force goes infinite. Default value is 1.0.
Fth Background force level throughout the whole workspace Default value is 0.0.
Kf The spring constant used in calculating forces Default value is 1.0.
z The spring exponent used in calculating forces Default value is 1.0.

OSCAR::ScaleInverseVanishF::ScaleInverseVanishF const ScaleInverseVanishF &    arg [inline]
 

Copy Constructor Create a new ScaleInverseVanishF object from an existing one.

Parameters:
arg An ScaleInverseVanishF object

virtual OSCAR::ScaleInverseVanishF::~ScaleInverseVanishF   [inline, virtual]
 

Destructor.


Member Function Documentation

double OSCAR::ScaleInverseVanishF::Derivative const double    x const [inline, virtual]
 

Compute the derivative of the APF wrt distance.

Parameters:
x Distance between objects
Returns:
Derivative of APF wrt distance

Implements OSCAR::ArtificialPotentialF.

const double& OSCAR::ScaleInverseVanishF::Fth   const [inline]
 

Get value for fTh.

Returns:
Const reference to member variable fTh

double& OSCAR::ScaleInverseVanishF::Fth   [inline]
 

Get/Set value for fTh.

Returns:
reference to member variable fTh

const double& OSCAR::ScaleInverseVanishF::Kf   const [inline]
 

Get value for Kforce. return Const reference to member variable k.

double& OSCAR::ScaleInverseVanishF::Kf   [inline]
 

Get/Set value for Kforce. return reference to member variable k.

const double& OSCAR::ScaleInverseVanishF::Max   const [inline]
 

Get value for mx.

Returns:
Const reference to member variable mx

double& OSCAR::ScaleInverseVanishF::Max   [inline]
 

Get/Set value for mx.

Returns:
reference to member variable mx

const double& OSCAR::ScaleInverseVanishF::Min   const [inline]
 

Get value for mn.

Returns:
Const reference to member variable mn

double& OSCAR::ScaleInverseVanishF::Min   [inline]
 

Get/Set value for mn.

Returns:
reference to member variable mn

double OSCAR::ScaleInverseVanishF::operator() const double    x const [inline, virtual]
 

Computes that strength (magnitude of force) of the APF using F = k*[(mx-x)/(x-mn)]^z + thresh.

Parameters:
x Distance between objects
Returns:
Magnitude of force, [thresh,inf)

Implements OSCAR::ArtificialPotentialF.

ScaleInverseVanishF& OSCAR::ScaleInverseVanishF::operator= const ScaleInverseVanishF &    rhs [inline]
 

Copy Operator Copy ScaleInverseVanishF object using (x = y).

Parameters:
rhs An ScaleInverseVanishF object

const double& OSCAR::ScaleInverseVanishF::Z   const [inline]
 

Get value for zeta.

Returns:
Const reference to member variable zeta

double& OSCAR::ScaleInverseVanishF::Z   [inline]
 

Get/Set value for zeta.

Returns:
reference to member variable zeta


Member Data Documentation

double OSCAR::ScaleInverseVanishF::k [protected]
 

The scaling constant for calculating potential fields.

double OSCAR::ScaleInverseVanishF::mn [protected]
 

The minimum allowable distance between robot & obstacles.

double OSCAR::ScaleInverseVanishF::mx [protected]
 

The distance of influence for potential fields.

double OSCAR::ScaleInverseVanishF::thresh [protected]
 

Threshold potential force for the entire workspace.

double OSCAR::ScaleInverseVanishF::z [protected]
 

Constant "spring exponent" for calculating potential fields.


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations