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

OSCAR::ScaleInverseF Class Reference
[ObstacleAvoidance]

\ ScaleInverseF One type of APF where Scalar function goes as the inverse of the argument The function is F(x) = k*[(mx-mn)/(x-mn)]^z + thresh, so that as (x->inf), (F(x)->thresh), (x=mx), (F(x) = k + thresh), and as (x->mn), (F(x)->inf). Note: this function object does not check for x < mn. A special case is when k=1, z=1, mx=1, mn=0, and thresh=0, then F(x) = 1/x.

#include <ScaleInverseF.hpp>

Inheritance diagram for OSCAR::ScaleInverseF:

Inheritance graph
[legend]
List of all members.

Public Methods

 ScaleInverseF (double mx=100.0, double mn=1.0, double Fth=0.0, double Kf=1.0, double z=1.0)
 ScaleInverseF (const ScaleInverseF &arg)
ScaleInverseF & operator= (const ScaleInverseF &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 ~ScaleInverseF ()

Protected Attributes

double k
double mx
double mn
double z
double thresh

Constructor & Destructor Documentation

OSCAR::ScaleInverseF::ScaleInverseF 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::ScaleInverseF::ScaleInverseF const ScaleInverseF &    arg [inline]
 

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

Parameters:
arg An ScaleInverseF object

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

Destructor.


Member Function Documentation

double OSCAR::ScaleInverseF::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::ScaleInverseF::Fth   const [inline]
 

Get value for fTh.

Returns:
Const reference to member variable fTh

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

Get/Set value for fTh.

Returns:
reference to member variable fTh

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

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

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

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

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

Get value for mx.

Returns:
Const reference to member variable mx

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

Get/Set value for mx.

Returns:
reference to member variable mx

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

Get value for mn.

Returns:
Const reference to member variable mn

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

Get/Set value for mn.

Returns:
reference to member variable mn

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

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

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

Implements OSCAR::ArtificialPotentialF.

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

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

Parameters:
rhs An ScaleInverseF object

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

Get value for zeta.

Returns:
Const reference to member variable zeta

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

Get/Set value for zeta.

Returns:
reference to member variable zeta


Member Data Documentation

double OSCAR::ScaleInverseF::k [protected]
 

The scaling constant for calculating potential fields.

double OSCAR::ScaleInverseF::mn [protected]
 

The minimum allowable distance between robot & obstacles.

double OSCAR::ScaleInverseF::mx [protected]
 

The distance of influence for potential fields.

double OSCAR::ScaleInverseF::thresh [protected]
 

Threshold potential force for the entire workspace.

double OSCAR::ScaleInverseF::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