17 #include <vlpi/trigonometricSmoother.h>
56 virtual const char*
type()
const override;
59 virtual bool init()
override;
66 virtual bool createPSR();
69 virtual void tick()
override;
74 static void followEntityCallback(
DtSimMessage* msg,
void* usrData);
82 virtual DtUUID entityToFollow();
83 virtual void setEntityToFollow(
const DtUUID& entity);
87 virtual const DtVector& offsetVector()
const;
88 virtual void setOffsetVector(
const DtVector& offsets);
114 virtual bool setupDestination();
118 virtual bool passedDestination();
122 virtual double findDesiredSpeed();
127 virtual double findDesiredHeading();
152 virtual void setSmoother(
const DtVector& location);
160 virtual DtVector smoothedLocation();
163 virtual DtVector constrainedStation(
const DtSimObject* leaderState,
const DtVector& position);
170 virtual bool nearDestination();
175 virtual double distanceToDestination()
const;
182 virtual DtVector localDestination()
const;
188 virtual bool getDestination(DtVector & destination)
const;
199 virtual bool atDestination();
203 virtual void doMoving();
206 virtual bool destinationIsInsideObstruction(
207 const DtVector& localDestination)
const;
216 virtual void moveToDestination();
221 virtual void computeTopoVectors();
224 virtual bool usingNavBot();
228 virtual void moveUsingNavData();
230 static void navAreaChangedCallback(
void* usr);
231 virtual void processNavAreaChanged();
235 virtual bool needToUpdateNavInterfaceDestination(
const DtVector& newLocalDestination);
242 virtual DtVector predictedDestination();
246 virtual void processNavigationInterfaceChanged();
bool myAtDestination
These members refer to the entity position relative to myLocalDestination.
Definition: humanFollowController.h:345
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#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
Instances of DtStringOutputPort are output ports through which data producers can send a DtString obj...
Definition: stringIOPort.h:52
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. This is useful when the nav interface has given...
Definition: humanFollowController.h:379
Description: This repository holds all information that is common to all the forms of humans within t...
Definition: humanStateRepository.h:33
bool myCanMoveDirect
This indicates whether the bot can move directly to the station, or requires a path to be planned...
Definition: humanFollowController.h:396
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:27
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:22
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:49
Definition: readerWriterRegistry.h:39
DtVector myTransitionPoint
Definition: humanFollowController.h:381
DtSimObjectReference myEntityToFollow
Set fresh each frame in setupDestination().
Definition: humanFollowController.h:251
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:443
virtual bool init() override
Calls setRadio()
DtBooleanOutputPort * myUseCollisionAvoidancePort
Output Port Name: use-collision-avoidance Output Port Description: Indicates whether or not this cont...
Definition: humanFollowController.h:296
DtPlatformSimObjectFacade myEntityToFollowSimObjectFacade
Definition: humanFollowController.h:397
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
double myCurrentSpeed
These members refer to the entity position relative to myLocalDestination.
Definition: humanFollowController.h:348
double myAtDistanceSquared
Square of distance we're considered to be 'at' our destination (within 1/4 meter). In meters^2. Default value: 1.0.
Definition: humanFollowController.h:354
File: simMsg.h.
Definition: simMessage.h:35
DtHumanFollowController is a controller that models following behavior for humans.
Definition: humanFollowController.h:38
DtHumanFollowControllerDescriptor * myComponentDescriptor
Definition: humanFollowController.h:387
double myNearDistanceSquared
Square of distance we're considered to be 'near' our destination (within 3 meters). In meters^2. Default value: 9.0.
Definition: humanFollowController.h:359
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtHumanFollowControllerDescriptor; descriptor for the DtHumanMoveAlongController component.
Definition: humanFollowControllerDescriptor.h:20
double myNavInterfaceDestinationSetTime
Definition: humanFollowController.h:385
class DtHumanFollowPSR:
Definition: humanFollowPSR.h:28
DtVector myStationLocation
The location of the station (i.e. the desired offset location from leader location). In local coordinates.
Definition: humanFollowController.h:333
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtVector mySmoothedStationLocation
This is the smoothed movement target position. If not using the nav interface, it is the smoothed sta...
Definition: humanFollowController.h:322
bool myPassedDestination
These members refer to the entity position relative to myLocalDestination.
Definition: humanFollowController.h:344
DtStringOutputPort * myFollowTargetOutputPort
Definition: humanFollowController.h:392
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. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtVector myWorldDestination
The geoc version of the above, for output to the Destination output port.
Definition: humanFollowController.h:307
bool myDestinationIsInsideObstruction
These members refer to the entity position relative to myLocalDestination.
Definition: humanFollowController.h:347
bool myWarnedOnceDestroyed
Definition: humanFollowController.h:390
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:80
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
These members refer to the entity position relative to myLocalDestination.
Definition: humanFollowController.h:346
DtHumanStateRepository * myHumanStateRepository
Cache pointer to our specific type of state repository.
Definition: humanFollowController.h:254
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtVector myNavInterfaceCurrentDestination
Definition: humanFollowController.h:384
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. In local coordinates...
Definition: humanFollowController.h:338
DtHumanFollowPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
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
A locally simulated VRF object.
Definition: localObject.h:98
DtBooleanOutputPort * myIsMovingPort
Output Port Name: is-moving Output Port Description: Indicates the entity is being actively moved by ...
Definition: humanFollowController.h:289