Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Problem Class Reference

An interface class that provides the primary input to a planner. More...

#include <problem.h>

List of all members.

Public Methods

 Problem (Geom *geom, Model *model, string path)
 Problem must be given any instance of Geom and any instance of Model from each of their class hierarchies.

virtual ~Problem ()
 Empty destructor.

void SetGeom (Geom *geom)
 Change the instance of Geom.

void SetModel (Model *model)
 Change the instance of Model.

void ReadInitialState ()
 Read from the file named InitialState.

void ReadGoalState ()
 Read from the file named GoalState.

virtual list<vector> GetInputs (const vector &x)
 Return a list of possible inputs, which may depend on state.

virtual list<vector> GetInputs ()
 Return a list of possible inputs.

virtual vector Integrate (const vector &x, const vector &u, const double &deltat)
 Perform integration from state x, using input u, over time deltat.

virtual vector InterpolateState (const vector &x1, const vector &x2, const double &a)
 Linearly interpolate two states while respecting topology. More...

virtual double Metric (const vector &x1, const vector &x2)
 A distance metric defined in Model.

virtual vector StateToConfiguration (const vector &x)
 A method that converts a Model state in to a Geom configuration.

virtual point StateToLedaPoint (const vector &x)
 A method that converts a state into a 2D LEDA point.

virtual vector StateDifference (const vector &x1, const vector &x2)
 Compute a vector based on x2-x1. In R^n, the states are simply subtracted to make the vector. This method exists to make things work correctly for other state-space topologies.

virtual bool Satisfied (const vector &x)
 This takes the logical AND of CollisionFree from Geom, and Satisfied from Model.

virtual bool CollisionFree (const vector &q)
 The collision checker passed in from Geom.

virtual double DistanceComp (const vector &q)
 The distance computation algorithm from Geom.

virtual list<polygon> EnvironmentToLedaPolygons ()
 An older method included for backwards compatibility.

virtual list<polygon> RobotToLedaPolygons (const vector &q)
 An older method included for backwards compatibility.

virtual vector ConfigurationDifference (const vector &q1, const vector &q2)
 Compute a vector based on q2-q1. In R^n, the configurations are simply subtracted to make the vector. This method exists to make things work correctly for other configuration-space topologies.


Public Attributes

string FilePath
 The directory in which all files for a problem will be stored.

int NumBodies
 The number of rigid bodies.

int StateDim
 The dimenson of the state space.

int InputDim
 The dimension of the input space.

int GeomDim
 The dimension of the geometric model.

vector LowerState
 Vector of minimum values for each state variable.

vector UpperState
 Vector of maximum values for each state variable.

vector InitialState
 The starting state for a planner.

vector GoalState
 The goal state for a planner.

vector MaxDeviates
 Maximum displacement of geometry with respect to change in each variable.


Protected Attributes

GeomG
 Need to define a geometry for collision detection.

ModelM
 xdot = f(x,u), integration technique, state bounds.


Detailed Description

An interface class that provides the primary input to a planner.

This interface class contains protected instances of Geom and Model. Wrappers to methods from Geom provide collision detection and distance computation. Wrappers to methods from Model provide incremental simulation of a kinematic or dynamical system. It is expected a planner can get all (or nearly all) of the information it needs from Problem.


Constructor & Destructor Documentation

Problem::Problem ( Geom * geom,
Model * model,
string path = "" )
 

Problem must be given any instance of Geom and any instance of Model from each of their class hierarchies.

Problem::~Problem ( ) [inline, virtual]
 

Empty destructor.


Member Function Documentation

bool Problem::CollisionFree ( const vector & q ) [virtual]
 

The collision checker passed in from Geom.

vector Problem::ConfigurationDifference ( const vector & q1,
const vector & q2 ) [virtual]
 

Compute a vector based on q2-q1. In R^n, the configurations are simply subtracted to make the vector. This method exists to make things work correctly for other configuration-space topologies.

double Problem::DistanceComp ( const vector & q ) [virtual]
 

The distance computation algorithm from Geom.

list< polygon > Problem::EnvironmentToLedaPolygons ( ) [virtual]
 

An older method included for backwards compatibility.

list< vector > Problem::GetInputs ( ) [virtual]
 

Return a list of possible inputs.

list< vector > Problem::GetInputs ( const vector & x ) [virtual]
 

Return a list of possible inputs, which may depend on state.

vector Problem::Integrate ( const vector & x,
const vector & u,
const double & deltat ) [virtual]
 

Perform integration from state x, using input u, over time deltat.

vector Problem::InterpolateState ( const vector & x1,
const vector & x2,
const double & a ) [virtual]
 

Linearly interpolate two states while respecting topology.

If a=0, then x1 is returned; if a=1, then x2 is returned. All intermediate values of $a \in [0,1]$ yield intermediate states. This method is defined by Model.

double Problem::Metric ( const vector & x1,
const vector & x2 ) [virtual]
 

A distance metric defined in Model.

void Problem::ReadGoalState ( )
 

Read from the file named GoalState.

void Problem::ReadInitialState ( )
 

Read from the file named InitialState.

list< polygon > Problem::RobotToLedaPolygons ( const vector & q ) [virtual]
 

An older method included for backwards compatibility.

bool Problem::Satisfied ( const vector & x ) [virtual]
 

This takes the logical AND of CollisionFree from Geom, and Satisfied from Model.

void Problem::SetGeom ( Geom * geom )
 

Change the instance of Geom.

void Problem::SetModel ( Model * model )
 

Change the instance of Model.

vector Problem::StateDifference ( const vector & x1,
const vector & x2 ) [virtual]
 

Compute a vector based on x2-x1. In R^n, the states are simply subtracted to make the vector. This method exists to make things work correctly for other state-space topologies.

vector Problem::StateToConfiguration ( const vector & x ) [virtual]
 

A method that converts a Model state in to a Geom configuration.

point Problem::StateToLedaPoint ( const vector & x ) [virtual]
 

A method that converts a state into a 2D LEDA point.


Member Data Documentation

string Problem::FilePath
 

The directory in which all files for a problem will be stored.

Geom * Problem::G [protected]
 

Need to define a geometry for collision detection.

int Problem::GeomDim
 

The dimension of the geometric model.

vector Problem::GoalState
 

The goal state for a planner.

vector Problem::InitialState
 

The starting state for a planner.

int Problem::InputDim
 

The dimension of the input space.

vector Problem::LowerState
 

Vector of minimum values for each state variable.

Model * Problem::M [protected]
 

xdot = f(x,u), integration technique, state bounds.

vector Problem::MaxDeviates
 

Maximum displacement of geometry with respect to change in each variable.

int Problem::NumBodies
 

The number of rigid bodies.

int Problem::StateDim
 

The dimenson of the state space.

vector Problem::UpperState
 

Vector of maximum values for each state variable.


The documentation for this class was generated from the following files: Motion Strategy Library


Web page maintained by Steve LaValle
Partial support provided by NSF CAREER Award IRI-970228 (LaValle), Honda Research, and Iowa State University.
Contributors: Anna Atramentov, Peng Cheng, James Kuffner, Steve LaValle, and Libo Yang.