16 #include <vlpi/trigonometricSmoother.h>
55 virtual const char*
type()
const;
65 virtual bool createPSR();
73 static void followEntityCallback(
DtSimMessage* msg,
void* usrData);
81 virtual const DtUUID& entityToFollow();
82 virtual void setEntityToFollow(
const DtUUID& entity);
86 virtual const DtVector& offsetVector()
const;
87 virtual void setOffsetVector(
const DtVector& offsets);
113 virtual bool setupDestination();
117 virtual bool passedDestination();
121 virtual double findDesiredSpeed();
126 virtual double findDesiredHeading();
151 virtual void setSmoother(
const DtVector& location);
159 virtual DtVector smoothedLocation();
169 virtual bool nearDestination();
174 virtual double distanceToDestination()
const;
181 virtual DtVector localDestination()
const;
187 virtual bool getDestination(
DtVector & destination)
const;
198 virtual bool atDestination();
202 virtual void doMoving();
205 virtual bool destinationIsInsideObstruction(
206 const DtVector& localDestination)
const;
215 virtual void moveToDestination();
220 virtual void computeTopoVectors();
223 virtual bool usingNavBot();
227 virtual void moveUsingNavData();
229 static void navAreaChangedCallback(
void* usr);
230 virtual void processNavAreaChanged();
234 virtual bool needToUpdateNavInterfaceDestination(
const DtVector& newLocalDestination);
241 virtual DtVector predictedDestination();
245 static void navigationInterfaceChanged(
const DtVrfObject*,
void* usr);
246 virtual void processNavigationInterfaceChanged(
const DtVrfObject*);
bool myAtDestination
Definition: humanFollowController.h:345
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
const DtVrfObject * myEntityToFollow
Set fresh each frame in setupDestination().
Definition: humanFollowController.h:251
DtObjectIdOutputPort * myFollowTargetOutputPort
Definition: humanFollowController.h:392
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVector myStationLocationWithRayToCenterline
If using nav areas, this is the smoothedStationLocation, but pulled in to the center line directly be...
Definition: humanFollowController.h:328
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtCollisionInputPort * myCollisionAvoidancePort
Input Port Name: potential-collision-info Input Port Description: Input Port Range: Input Port Defa...
Definition: humanFollowController.h:268
DtVector myTopoDestinationToEntity2D
Vector from myLocalDestination to entity, in topo coordinates.
Definition: humanFollowController.h:316
bool myIgnoreNavData
Used to force the navigation interface to be ignored.
Definition: humanFollowController.h:379
Description: This repository holds all information that is common to all the forms of humans within t...
Definition: humanStateRepository.h:32
bool myCanMoveDirect
This indicates whether the bot can move directly to the station, or requires a path to be planned...
Definition: humanFollowController.h:396
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:26
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtVector myLocalDestination
The Destination is the location of the station (leader + offset), either raw (if using the nav interf...
Definition: humanFollowController.h:303
virtual void registerTaskMsgCallbacks()
bool myNearDestination
These members refer to the entity position relative to myLocalDestination.
Definition: humanFollowController.h:343
DtVector myLocalDestinationMove
The direction of movement of myLocalDestination from the last tick to the present.
Definition: humanFollowController.h:311
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
DtActiveBotNavInterface * myNavInterface
Definition: humanFollowController.h:383
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
Description: This repository holds all information that is common to all the forms of all entity/aggr...
Definition: vrfObjectStateRepository.h:87
virtual bool init()
Calls setRadio()
DtVector myTransitionPoint
Definition: humanFollowController.h:381
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick.
Definition: simComponent.h:485
DtBooleanOutputPort * myUseCollisionAvoidancePort
Output Port Name: use-collision-avoidance Output Port Description: Indicates whether or not this cont...
Definition: humanFollowController.h:296
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
double myCurrentSpeed
Definition: humanFollowController.h:348
double myAtDistanceSquared
Square of distance we're considered to be 'at' our destination (within 1/4 meter).
Definition: humanFollowController.h:354
File: simMsg.h.
Definition: simMessage.h:35
DtHumanFollowController is a controller that models following behavior for humans.
Definition: humanFollowController.h:37
DtHumanFollowControllerDescriptor * myComponentDescriptor
Definition: humanFollowController.h:387
double myNearDistanceSquared
Square of distance we're considered to be 'near' our destination (within 3 meters).
Definition: humanFollowController.h:359
virtual void tick()
This gives the thread of control to the component.
DtHumanFollowControllerDescriptor; descriptor for the DtHumanMoveAlongController component.
Definition: humanFollowControllerDescriptor.h:20
double myNavInterfaceDestinationSetTime
Definition: humanFollowController.h:385
class DtHumanFollowPSR:
Definition: humanFollowPSR.h:26
DtVector myStationLocation
The location of the station (i.e.
Definition: humanFollowController.h:333
virtual bool createPorts()
Called by init.
DtVector mySmoothedStationLocation
This is the smoothed movement target position.
Definition: humanFollowController.h:322
bool myPassedDestination
Definition: humanFollowController.h:344
Instances of DtObjectIdOutputPort are output ports through which data producers can send DtEntityIden...
Definition: objectIdIOPort.h:47
double myFarCatchUpFactor
Multiplicative factor used to compute the appropriate speed when we need to catch up to the entity we...
Definition: humanFollowController.h:367
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtVector myWorldDestination
The geoc version of the above, for output to the Destination output port.
Definition: humanFollowController.h:307
bool myDestinationIsInsideObstruction
Definition: humanFollowController.h:347
bool myWarnedOnceDestroyed
Definition: humanFollowController.h:390
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtTrigonometricSmoother * myLeaderSmoother
Definition: humanFollowController.h:389
DtVectorOutputPort * myDestinationOutputPort
Output Port Name: destination Output Port Description: Specifies the current destination of the entit...
Definition: humanFollowController.h:282
double myDistanceSquared
Definition: humanFollowController.h:346
DtHumanStateRepository * myHumanStateRepository
Cache pointer to our specific type of state repository.
Definition: humanFollowController.h:254
DtVector myNavInterfaceCurrentDestination
Definition: humanFollowController.h:384
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
An output port group that contains the ports necessary to control the movement of a human using the D...
Definition: humanMovementControlOutputPortGroup.h:22
DtHumanMovementControlOutputPortGroup * myHumanMovementControlOutputPortGroup
Output Group Name: movement-control .
Definition: humanFollowController.h:275
DtVector myLookAheadStationLocation
The location of the station at a time targetLookAheadTime in the future.
Definition: humanFollowController.h:338
DtHumanFollowPSR * myProcessState
Container for state data associated with this component.
Definition: humanFollowController.h:258
DtInputPortGroup * myCollisionAvoidancePortGroup
Input Port Group Name: collision-avoidance-control Input Port Group Description:
Definition: humanFollowController.h:272
DtVector myTopoDestinationMoveUnit2D
Unit vector for the above, in topo coordinates.
Definition: humanFollowController.h:313
DtBooleanOutputPort * myIsMovingPort
Output Port Name: is-moving Output Port Description: Indicates the entity is being actively moved by ...
Definition: humanFollowController.h:289