Trees  Indices  Help 



This is a mixin that contains steering functions. It is meant to extended a base motion model to create a new base class for a steering agent. Do not instantiate this class, it can't stand by its own.
Instance Methods  



























Method Details 
This function is meant for converting the most common result of a steering function into the correspondent result of an inverse steering function. Given a motivational force towad a goal, this function assigns costs to isb directions based on the angular distance between them and the optimistic optimal (normalized force). Use this function to convert the result of a steering function or as building block for inverse steering functions. 
Create and initialize a set of costs for later user. Set c and m if you want to initialize the set with a particular cost and magnitude. 
This function return a subset of isb directions indexes spanned by a fan centered along the forward axis with angular extension spannig. Notice that this function return a list of indexes and not directions. 
This steering function compute a desired velocity toward the target. The velocity starts to diminish as soon as the slowing_distance is reached producing a smooth arrival to the target point. 
This steering function compute a desired direction to motivate an agent in avoiding a potential collision with an obstacle. The obstacle must be enclosed in a bounding sphere. In order to detect a potential threat, a collision rectangular probe is defined in front of the agent. Avoidance force tries to keep that rectangular area free from the obstacle. 
This steering function compute a desired direction to motivate an agent in avoiding a potential collision with a group of obstacles. The avoidence force is computed only for the nearest obstacle. Each obstacle must be enclosed in a bounding sphere. In order to detect a potential threat, a collision rectangular probe is defined in front of the agent. Avoidance force tries to keep that rectangular area free from obstacles. NOTE1: obstacles in this implementation are intended as *fixed* (speed == 0) and *sparse* (dist between two of them > minDist) NOTE2: extension to different obstacle shapes is mandatory. For fixed obstacles such as walls and stairs we could have a representation of them on grid map as in Terzoupolus (Autonoumus Pedestrian) VERY IMPORTANT NOTE: this IS NOT the best way of performing collision avoidance. The main reason is that avoidance force depends only from the position of the nearest obstacle. What if this force will drive the agent toward another obstacle? Possible solutions are Inverse Steering Behaviors or flow dynamic. 
This steering function compute a cohesion force that motivate and agent in moving toward its neighborhood to avoid being isolated. Differently from Reynolds version, here is possible to specify a particular attraction point if necessary. An attraction point will turn useful when the agent is member of a static group instead of a moving one, eg. conversations, queues, etc. Setup a distance offset to set an attraction area instead of an attraction point. Basically, the agent will try to reach the edge of the circle of center point (or neighborhood's center) and radius distance_offset. 
This steering function compute a desired direction to rotate an agent in order to make it face the neighborhood. That is, to have the best orientation for facing as much as possible the group of neighbors. 
This steering function compute a group space force that motivates an agent in keeping a mean equal distance from the neighborhood central point. The mean distance is the mean of neighbors' distances from the group's center. Therefore, the group space force could be an attractive or repulsive force depending from the agent's position. Min and max distances are used to specify the min and max allowed distances from the group's center. 
This steering function compute a repulsion force away from a group of given neighbors. The given maxDistance is the radius of the neighborhood. The magnitude of the resulting force depends from the maxDistance and the distance of the closest neighbor. 
Trees  Indices  Help 


Generated by Epydoc 3.0.1 on Wed Jan 13 11:57:34 2010  http://epydoc.sourceforge.net 