SteeringProperties
Class ObstacleAvoidanceProperties

Package class diagram package ObstacleAvoidanceProperties
java.lang.Object
  extended by SteeringProperties.SteeringProperties
      extended by SteeringProperties.ObstacleAvoidanceProperties
All Implemented Interfaces:
Serializable

public class ObstacleAvoidanceProperties
extends SteeringProperties

The steering properties of the Obstacle Avoidance Steering.

Author:
Marki
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class SteeringProperties.SteeringProperties
SteeringProperties.BehaviorType
 
Field Summary
 
Fields inherited from class SteeringProperties.SteeringProperties
active, behaviorType, type, weight
 
Constructor Summary
ObstacleAvoidanceProperties()
          Creates the default ObstacleAvoidanceProperties.
ObstacleAvoidanceProperties(int repulsiveForce, int orderOfTheForce, boolean frontCollisions, boolean treeCollisions)
          Creates the ObstacleAvoidanceProperties.
ObstacleAvoidanceProperties(SteeringProperties.BehaviorType behaviorType)
          Creates the ObstacleAvoidanceProperties - BASIC/ADVANCED.
ObstacleAvoidanceProperties(XMLObstacleAvoidanceProperties xml)
          Creates the ObstacleAvoidanceProperties from the XMLObstacleAvoidanceProperties.
 
Method Summary
 int getForceOrder()
           
 int getRepulsiveForce()
           
 String getSpecialText()
           
 XMLObstacleAvoidanceProperties getXMLProperties()
           
 boolean isFrontCollisions()
           
 boolean isTreeCollisions()
           
 void setForceOrder(int orderOfTheForce)
           
 void setFrontCollisions(boolean frontCollisions)
           
protected  void setNewBehaviorType(SteeringProperties.BehaviorType behaviorType)
           
 void setProperties(SteeringProperties newProperties)
           
 void setRepulsiveForce(int repulsiveForce)
           
 void setTreeCollisions(boolean treeCollisions)
           
 
Methods inherited from class SteeringProperties.SteeringProperties
getBehaviorType, getText, getType, getWeight, isActive, setActive, setBehaviorType, setType, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObstacleAvoidanceProperties

public ObstacleAvoidanceProperties()
Creates the default ObstacleAvoidanceProperties. The order is 1, front collisions true and tree collision also true.


ObstacleAvoidanceProperties

public ObstacleAvoidanceProperties(SteeringProperties.BehaviorType behaviorType)
Creates the ObstacleAvoidanceProperties - BASIC/ADVANCED.


ObstacleAvoidanceProperties

public ObstacleAvoidanceProperties(XMLObstacleAvoidanceProperties xml)
Creates the ObstacleAvoidanceProperties from the XMLObstacleAvoidanceProperties.


ObstacleAvoidanceProperties

public ObstacleAvoidanceProperties(int repulsiveForce,
                                   int orderOfTheForce,
                                   boolean frontCollisions,
                                   boolean treeCollisions)
Creates the ObstacleAvoidanceProperties.

Parameters:
repulsiveForce - The magnitude of the repulsive force from the obstacles. Reasonable values are 0 - 1000, the default value is 240.
orderOfTheForce - The order of the force. Possible values are 1 - 10, the default value is 1. The curve of reactions to obstacles according to the order 1 is linear, 2 quadratic, etc. It means that with higher order, the bot reacts less to dsitant obstacles and more to near obstacles. But the value 1 is most usefull value. Other values can cause strange behavior alongside walls etc.
frontCollisions - Special solution of head-on collisions (front collisions). Basic behaviour leads to rebounding from the obstacles (when the bot aims to the obstacle head-on, he turns nearly 180° round just in front of the obstacle). When this parameter is on, bot turns and continues alongside the side of the obstacle. Recommended value is true.
treeCollisions - Tree collisions. The default value (in basic baheviour) is false. Recommended value is true. Special solution of collisions with trees and other narrow obstacles (so narrow, that just one of the rays will hit them). In basic behaviour (when the switch is off), when the bot aims to the tree that just the front side rays hits, he avoids the tree from the worse side. When the switch is on, he avoids the obstacle from the right (nearer) side.
Method Detail

setNewBehaviorType

protected void setNewBehaviorType(SteeringProperties.BehaviorType behaviorType)
Specified by:
setNewBehaviorType in class SteeringProperties

getRepulsiveForce

public int getRepulsiveForce()

setRepulsiveForce

public void setRepulsiveForce(int repulsiveForce)

getForceOrder

public int getForceOrder()

setForceOrder

public void setForceOrder(int orderOfTheForce)

isFrontCollisions

public boolean isFrontCollisions()

setFrontCollisions

public void setFrontCollisions(boolean frontCollisions)

isTreeCollisions

public boolean isTreeCollisions()

setTreeCollisions

public void setTreeCollisions(boolean treeCollisions)

getSpecialText

public String getSpecialText()
Specified by:
getSpecialText in class SteeringProperties

setProperties

public void setProperties(SteeringProperties newProperties)
Specified by:
setProperties in class SteeringProperties

getXMLProperties

public XMLObstacleAvoidanceProperties getXMLProperties()


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.