public class ObstacleAvoidanceProperties extends SteeringProperties
SteeringProperties.BehaviorTypeactive, behaviorType, type, weight| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
getBehaviorType, getText, getType, getWeight, isActive, setActive, setBehaviorType, setType, setWeightpublic ObstacleAvoidanceProperties()
public ObstacleAvoidanceProperties(SteeringProperties.BehaviorType behaviorType)
public ObstacleAvoidanceProperties(XMLObstacleAvoidanceProperties xml)
public ObstacleAvoidanceProperties(int repulsiveForce,
int orderOfTheForce,
boolean frontCollisions,
boolean treeCollisions)
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.protected void setNewBehaviorType(SteeringProperties.BehaviorType behaviorType)
setNewBehaviorType in class SteeringPropertiespublic int getRepulsiveForce()
public void setRepulsiveForce(int repulsiveForce)
public int getForceOrder()
public void setForceOrder(int orderOfTheForce)
public boolean isFrontCollisions()
public void setFrontCollisions(boolean frontCollisions)
public boolean isTreeCollisions()
public void setTreeCollisions(boolean treeCollisions)
public String getSpecialText()
getSpecialText in class SteeringPropertiespublic void setProperties(SteeringProperties newProperties)
setProperties in class SteeringPropertiespublic XMLObstacleAvoidanceProperties getXMLProperties()
Copyright © 2019 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.