|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SteeringStuff.SteeringManager
public class SteeringManager
This class manages the whole navigation layer of the steered bot. The manager calls steerings to compute the force, combines all forces and sends the computed next velocity to the locomotion layer (modul locomotion).
Field Summary | |
---|---|
static cz.cuni.amis.pogamut.base3d.worldview.object.Location |
BASIC_LOCATION
|
protected UT2004Bot |
botself
This manager needs botself, raycasting and AdvancedLocomotion. |
static boolean |
DEBUG
Enables/disables all debugging println. |
protected boolean |
drawRaycasting
Whether the rays should be drawned (this value will be the parameter of setDrawTraceLines()). |
protected AdvancedLocomotion |
locomotion
|
static double |
MAX_FORCE
|
protected double |
multiplier
|
protected javax.vecmath.Vector3d |
myNextVelocity
|
protected RaycastingManager |
rayManager
|
HashMap<SteeringType,Double> |
steeringWeights
|
static boolean |
Thomas
|
protected static double |
WALK_VELOCITY_LENGTH
How long is the vector of walking velocity. |
Constructor Summary | |
---|---|
SteeringManager(UT2004Bot bot,
Raycasting raycasting,
AdvancedLocomotion locomotion)
Creates the new SteeringManager. |
|
SteeringManager(UT2004Bot bot,
Raycasting raycasting,
AdvancedLocomotion locomotion,
double multiplier)
|
Method Summary | |
---|---|
void |
addLeaderFollowingSteering(LeaderFollowingProperties properties)
|
void |
addObstacleAvoidanceSteering(ObstacleAvoidanceProperties properties)
|
void |
addPathFollowingSteering(PathFollowingProperties properties)
|
void |
addPeopleAvoidanceSteering(PeopleAvoidanceProperties properties)
|
void |
addSteering(SteeringType type)
Adds the steering of the steering type from the argument. |
void |
addSteering(SteeringType type,
double weight)
Adds the steering of the steering type from the argument with the weight from the argument. |
void |
addStickToPathSteering(StickToPathProperties properties)
|
void |
addTargetApproachingSteering(TargetApproachingProperties properties)
|
void |
addWalkAlongSteering(WalkAlongProperties properties)
|
void |
addWallFollowingSteering(WallFollowingProperties properties)
|
void |
clearSteerings()
Removes all currently active steerings. |
LeaderFollowingProperties |
getLeaderFollowingProperties()
Returns path following properites if this steering is set or null otherwise. |
javax.vecmath.Vector3d |
getMyActualVelocity()
Returns the scaled actual velocity. |
javax.vecmath.Vector3d |
getMyNextVelocity()
Returns the computed next velocity. |
ObstacleAvoidanceProperties |
getObstacleAvoidanceProperties()
Returns path following properites if this steering is set or null otherwise. |
PathFollowingProperties |
getPathFollowingProperties()
Returns path following properites if this steering is set or null otherwise. |
PeopleAvoidanceProperties |
getPeopleAvoidanceProperties()
Returns people avoidance properites if this steering is set or null otherwise. |
static cz.cuni.amis.pogamut.base3d.worldview.object.Location |
getRandomStartLocation()
Returns the random location near to the BASIC_LOCATION. |
static cz.cuni.amis.pogamut.base3d.worldview.object.Rotation |
getRandomStartRotation()
Returns the random rotation. |
HashMap<SteeringType,javax.vecmath.Vector3d> |
getSteeringForces()
Returns the hasp map of used steering forces. |
TargetApproachingProperties |
getTargetApproachingProperties()
Returns target approaching properites if this steering is set or null otherwise. |
WalkAlongProperties |
getWalkAlongProperties()
Returns walk along properites if this steering is set or null otherwise. |
WallFollowingProperties |
getWallFollowingProperties()
Returns wall following properites if this steering is set or null otherwise. |
boolean |
hasSteering(SteeringType type)
Returns true, if the manager has this steering type in the list of used steerings. |
boolean |
isCanEnlargeVelocity()
Returns whether the velocity can be enlarged when every active steering agrees. |
boolean |
isDrawRaycasting()
Returns whether the rays are drawn in the UE2. |
boolean |
isLeaderFollowingActive()
|
boolean |
isNavigating()
Returns whether we are currently using SteeringManager
for navigation. |
boolean |
isObstacleAvoidanceActive()
|
boolean |
isPathFollowingActive()
|
boolean |
isPeopleAvoidanceActive()
|
boolean |
isStickToPathSteeringActive()
|
boolean |
isTargetApproachingActive()
|
boolean |
isWalkAlongActive()
|
boolean |
isWallFollowingActive()
|
void |
moveTheBot(javax.vecmath.Vector3d nextVelocity,
boolean everyoneWantsToGoFaster,
cz.cuni.amis.pogamut.base3d.worldview.object.Location focusLocation)
This method is used mainly in SteeringManager.run(). |
void |
removeLeaderFollowingSteering()
|
void |
removeObstacleAvoidanceSteering()
|
void |
removePathFollowingSteering()
|
void |
removePeopleAvoidanceSteering()
|
void |
removeSteering(SteeringType type)
Removes the steering of the steering type from the argument. |
void |
removeStickToPathSteering()
|
void |
removeTargetApproachingSteering()
|
void |
removeWalkAlongSteering()
|
void |
removeWallFollowingSteering()
|
void |
run()
The main method. |
void |
setCanEnlargeVelocity(boolean canEnlargeVelocity)
If true, the velocity can be enlarged when every active steering agrees. |
void |
setDrawRaycasting(boolean drawRaycasting)
Sets whether the rays in UE2 should be drawned. |
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location |
setFocusSpecific(SteeringType steeringType,
boolean wantsToStop,
cz.cuni.amis.pogamut.base3d.worldview.object.Location newFocus,
cz.cuni.amis.pogamut.base3d.worldview.object.Location focusLoc)
|
void |
setLastVeloWeight(double lastVeloWeight)
|
void |
setLeaderFollowingSteering(LeaderFollowingProperties properties)
|
void |
setMultiplier(double multiplier)
Sets the multiplier of the velocity. |
void |
setObstacleAvoidanceSteering(ObstacleAvoidanceProperties properties)
|
void |
setPathFollowingSteering(PathFollowingProperties properties)
|
void |
setPeopleAvoidanceSteering(PeopleAvoidanceProperties properties)
|
void |
setSteeringProperties(SteeringType type,
SteeringProperties newProperties)
Sets the steering properties of the steering type from the argument. |
void |
setStickToPathSteering(StickToPathProperties properties)
|
void |
setTargetApproachingSteering(TargetApproachingProperties properties)
|
void |
setUseLastVeloWeight(boolean useLastVeloWeight)
|
protected javax.vecmath.Vector3d |
setVelocitySpecific(ISteering steering,
RefBoolean wantsToGoFaster,
RefBoolean wantsToStop,
RefLocation newFocus)
When owerriden can provide different behaviour of steering computation i.e. can tunnel some other information like true distance to target place it is used for the social steerings... |
void |
setWalkAlongSteering(WalkAlongProperties properties)
|
void |
setWallFollowingSteering(WallFollowingProperties properties)
|
void |
start()
Registers endMessageListener and by this activates
steering navigation. |
void |
stop()
Unregisters endMessageListener - steering manager
will cease to navigate the bot (the bot will stop, but steering settings
will be preserved). |
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
protected UT2004Bot botself
protected AdvancedLocomotion locomotion
protected RaycastingManager rayManager
public HashMap<SteeringType,Double> steeringWeights
protected javax.vecmath.Vector3d myNextVelocity
protected double multiplier
public static final double MAX_FORCE
protected static final double WALK_VELOCITY_LENGTH
public static final cz.cuni.amis.pogamut.base3d.worldview.object.Location BASIC_LOCATION
protected boolean drawRaycasting
public static boolean Thomas
Constructor Detail |
---|
public SteeringManager(UT2004Bot bot, Raycasting raycasting, AdvancedLocomotion locomotion)
bot
- The bot, who should be steered be these steerings.raycasting
- The instance of the class Raycasting.locomotion
- The AdvancedLocomotion of the bot.public SteeringManager(UT2004Bot bot, Raycasting raycasting, AdvancedLocomotion locomotion, double multiplier)
bot
- The bot, who should be steered be these steerings. This class manages the whole navigation layer of the steered bot. The manager calls steerings to compute the force, combines all forces and sends the computed next velocity to the locomotion layer (modul locomotion).raycasting
- The instance of the class Raycasting.locomotion
- The AdvancedLocomotion of the bot.multiplier
- Default value is 1. The multiplier of the velocity. E.g, if you want to make this bot run nearly all the time, set the multiplier 2. But remember, that steerings could work worse.Method Detail |
---|
public void addSteering(SteeringType type)
public void addSteering(SteeringType type, double weight)
public boolean hasSteering(SteeringType type)
public void removeSteering(SteeringType type)
public void setSteeringProperties(SteeringType type, SteeringProperties newProperties)
public void run()
public void moveTheBot(javax.vecmath.Vector3d nextVelocity, boolean everyoneWantsToGoFaster, cz.cuni.amis.pogamut.base3d.worldview.object.Location focusLocation)
public static cz.cuni.amis.pogamut.base3d.worldview.object.Location getRandomStartLocation()
public static cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRandomStartRotation()
public HashMap<SteeringType,javax.vecmath.Vector3d> getSteeringForces()
public javax.vecmath.Vector3d getMyActualVelocity()
public javax.vecmath.Vector3d getMyNextVelocity()
public boolean isDrawRaycasting()
public void setDrawRaycasting(boolean drawRaycasting)
public void setCanEnlargeVelocity(boolean canEnlargeVelocity)
public boolean isCanEnlargeVelocity()
public void setMultiplier(double multiplier)
public void setLastVeloWeight(double lastVeloWeight)
public void setUseLastVeloWeight(boolean useLastVeloWeight)
public void start()
endMessageListener
and by this activates
steering navigation.
public void stop()
endMessageListener
- steering manager
will cease to navigate the bot (the bot will stop, but steering settings
will be preserved).
public boolean isNavigating()
SteeringManager
for navigation.
public void clearSteerings()
public LeaderFollowingProperties getLeaderFollowingProperties()
public ObstacleAvoidanceProperties getObstacleAvoidanceProperties()
public PathFollowingProperties getPathFollowingProperties()
public PeopleAvoidanceProperties getPeopleAvoidanceProperties()
public TargetApproachingProperties getTargetApproachingProperties()
public WalkAlongProperties getWalkAlongProperties()
public WallFollowingProperties getWallFollowingProperties()
public void addLeaderFollowingSteering(LeaderFollowingProperties properties)
public void removeLeaderFollowingSteering()
public void setLeaderFollowingSteering(LeaderFollowingProperties properties)
public boolean isLeaderFollowingActive()
public void addObstacleAvoidanceSteering(ObstacleAvoidanceProperties properties)
public void removeObstacleAvoidanceSteering()
public void setObstacleAvoidanceSteering(ObstacleAvoidanceProperties properties)
public boolean isObstacleAvoidanceActive()
public void addPathFollowingSteering(PathFollowingProperties properties)
public void removePathFollowingSteering()
public void setPathFollowingSteering(PathFollowingProperties properties)
public boolean isPathFollowingActive()
public void addPeopleAvoidanceSteering(PeopleAvoidanceProperties properties)
public void removePeopleAvoidanceSteering()
public void setPeopleAvoidanceSteering(PeopleAvoidanceProperties properties)
public boolean isPeopleAvoidanceActive()
public void addTargetApproachingSteering(TargetApproachingProperties properties)
public void removeTargetApproachingSteering()
public void setTargetApproachingSteering(TargetApproachingProperties properties)
public boolean isTargetApproachingActive()
public void addWalkAlongSteering(WalkAlongProperties properties)
public void removeWalkAlongSteering()
public void setWalkAlongSteering(WalkAlongProperties properties)
public boolean isWalkAlongActive()
public void addWallFollowingSteering(WallFollowingProperties properties)
public void removeWallFollowingSteering()
public void setWallFollowingSteering(WallFollowingProperties properties)
public boolean isWallFollowingActive()
public void addStickToPathSteering(StickToPathProperties properties)
public void removeStickToPathSteering()
public void setStickToPathSteering(StickToPathProperties properties)
public boolean isStickToPathSteeringActive()
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location setFocusSpecific(SteeringType steeringType, boolean wantsToStop, cz.cuni.amis.pogamut.base3d.worldview.object.Location newFocus, cz.cuni.amis.pogamut.base3d.worldview.object.Location focusLoc)
protected javax.vecmath.Vector3d setVelocitySpecific(ISteering steering, RefBoolean wantsToGoFaster, RefBoolean wantsToStop, RefLocation newFocus)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |