Class v_LinearAttraction_v


public class v_LinearAttraction_v
extends NodeVec2

Generates a vector towards a goal location that varies with distance from the goal. The attraction is increased linearly at greater distances. Based on Arkin's formulation.

Arkin's original formulation is described in "Motor Schema Based Mobile Robot Navigation," International Journal of Robotics Research, vol. 8, no 4, pp 92-112.

The source code in this module is based on "first principles" (e.g. published papers) and is not derived from any previously existing software.

For detailed information on how to configure behaviors, see the Clay page.

Copyright (c)1997, 1998 Tucker Balch

Field Summary
static boolean DEBUG
          Turns debug printing on or off.
Fields inherited from class
DEBUG, embedded_nodes
Constructor Summary
v_LinearAttraction_v(double czr, double dzr, NodeVec2 im1)
          Instantiate a v_LinearAttraction_v schema.
Method Summary
 Vec2 Value(long timestamp)
          Return a Vec2 representing the direction to go towards the goal.
Methods inherited from class
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final boolean DEBUG
Turns debug printing on or off.
Constructor Detail


public v_LinearAttraction_v(double czr,
                            double dzr,
                            NodeVec2 im1)
Instantiate a v_LinearAttraction_v schema.
czr - double, controlled zone radius.
dzr - double, dead zone radius.
im1 - double, the node that generates an egocentric vector to the goal.
Method Detail


public Vec2 Value(long timestamp)
Return a Vec2 representing the direction to go towards the goal. Magnitude varies with distance.
Value in class NodeVec2
timestamp - long, only get new information if timestamp > than last call or timestamp == -1.
the movement vector.