Imp
[using it]
Interface Manipulation Package v4.0 (2008-06-25) a-projector ©copyright Author


imp.trajectory
Class Trajectory

java.lang.Object
  extended by imp.trajectory.Trajectory

public class Trajectory
extends Object

Defines a trajectory generator.

Formally this is defined as going from an initial state defined by a numerical value vector x_o to a final state (i.e. a goal) x_oo considering constraints or obstacles to be avoided.
Very easily a user:


Nested Class Summary
static class Trajectory.Constraint
          Defines an obstacle from an equation: c(x) > 0 for x outside the obstacle.
static class Trajectory.Obstacle
          Defines a trajectory obstacle.
 
Constructor Summary
Trajectory(int dim, double step)
          Constructs a trajectory.
 
Method Summary
 Trajectory add(Trajectory.Obstacle obstacle)
          Adds an obstacle for the trajectory and return this.
 double[] get(double[] x0)
          Returns the point next to x0[] for this trajectory or x0[] if on the goal or if it fails.
 boolean isAtEnd(double[] x0)
          Test if the trajectory point reaches the goal
 Trajectory remove(Trajectory.Obstacle obstacle)
          Deletes an obstacle for the trajectory and return this.
 Trajectory setEnd(double[] x_oo, boolean goal)
          Defines the goal, i.e.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trajectory

public Trajectory(int dim,
                  double step)
Constructs a trajectory.

Parameters:
dim - Problem dimension
step - Minimal distance between two distinguishable points.
Method Detail

add

public Trajectory add(Trajectory.Obstacle obstacle)
Adds an obstacle for the trajectory and return this.


get

public double[] get(double[] x0)
Returns the point next to x0[] for this trajectory or x0[] if on the goal or if it fails.


isAtEnd

public boolean isAtEnd(double[] x0)
Test if the trajectory point reaches the goal


remove

public Trajectory remove(Trajectory.Obstacle obstacle)
Deletes an obstacle for the trajectory and return this.


setEnd

public Trajectory setEnd(double[] x_oo,
                         boolean goal)
Defines the goal, i.e. the end/final point and return this

Parameters:
x_oo - End point coordinates
goal - [optional, default is true] If true this is the final goal and the trajectory ends, else it is an intermediate temporary goal.