17 #include <matrix/vlVector.h>
58 virtual void createObstacleAvoider();
62 virtual bool init()
override;
69 virtual void tick()
override;
73 virtual const char*
type()
const override;
76 static void setLocationCallback(
DtSimMessage* msg,
void* usr);
82 static void modifyVrfObjectCallback(
DtSimMessage* msg,
void* usr);
111 virtual bool getDestination(DtVector & destination)
const;
117 virtual const DtVector& destinationVector();
134 virtual double findDesiredSpeed(
const DtVector& localDestination,
135 const double stoppingAcceleration = 0.0);
137 virtual double findDesiredSpeed(
const double stoppingAcceleration = 0.0);
149 virtual double destinationSpeed(
const double cruiseSpeed)
const;
167 virtual bool atDestination();
174 virtual double approximateThrottle(
double desiredSpeed,
double headingError = 0.0)
override;
180 virtual void stopVehicle(
bool success =
true);
183 virtual void stop(
bool success =
true);
187 virtual void doMoving();
209 virtual bool nearDestination();
220 virtual bool passedDestination();
230 static const std::string blockedByVehicleString;
242 virtual bool setupDestination();
253 virtual void setupDestinationVector();
256 virtual void invalidateDestinationVector()
const;
259 virtual void moveToDestination();
260 virtual double distanceSqToDestination()
const;
270 virtual double steeringHeadingToLocation(
const DtVector& destination);
280 virtual double findDesiredHeading();
288 virtual void taskComplete(
bool success =
true)
override;
295 virtual void setDestinationIsInsideObstruction(
bool yesNo);
299 virtual bool destinationIsInsideObstruction()
const;
303 virtual unsigned maxNumFailedPathAttempts()
const;
305 static void navAreaChangedCallback(
void* usr);
306 virtual void processNavAreaChanged();
308 DtVector localDestination()
const;
310 virtual void processNavigationInterfaceChanged();
313 virtual void processEstimatedTotCalculation();
316 virtual void processGroundVehicleLocationChanged();
322 virtual void markAllForRemoval();
388 const double DtEstimatedTotCalcInterval = 5.0;
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
double myTargetHeading
For task visualization:
Definition: groundMoveToDestinationControllerComponent.h:385
DtVector myLocalDestination
Definition: groundMoveToDestinationControllerComponent.h:358
static const std::string noObstaclesString
= "NotActive";
Definition: groundMoveToDestinationControllerComponent.h:228
double myNearDistanceSquared
Deprecated– these two are no longer used.
Definition: groundMoveToDestinationControllerComponent.h:376
DtVector myDestinationVector
Definition: groundMoveToDestinationControllerComponent.h:368
bool myHasIntermediateDestination
These no longer get set, since Gameware path planning is not performed by this controller.
Definition: groundMoveToDestinationControllerComponent.h:363
virtual bool init() override
Initializes myGroundVehicleState.
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
A DtComponentDescriptor that has parameters that indicate the distances at which the entity is consid...
Definition: groundMoveToDescriptor.h:30
bool myIgnoreNavData
Definition: groundMoveToDestinationControllerComponent.h:380
virtual void registerTaskMsgCallbacks()
std::map< DtString, bool > myInUse
Definition: groundMoveToDestinationControllerComponent.h:340
virtual void clearTask() override
Overridden to deactivate the port group when this controller completes a task.
bool myDestinationVectorIsValid
Definition: groundMoveToDestinationControllerComponent.h:369
DtVector myEstimatedTotTextPos
tot text position
Definition: groundMoveToDestinationControllerComponent.h:397
bool myDestinationIsInsideObstruction
Definition: groundMoveToDestinationControllerComponent.h:382
double myCurrentSpeed
Definition: groundMoveToDestinationControllerComponent.h:356
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtVector myWorldDestination
Definition: groundMoveToDestinationControllerComponent.h:359
Definition: readerWriterRegistry.h:39
const DtGroundAutoControllerComponent & operator=(const DtGroundAutoControllerComponent &orig)
assignment operator; not implemented
bool myHasFinalOutputBeenSet
This flag is set by task complete when the final control outputs are set. It is used by clearTask to ...
Definition: groundMoveToDestinationControllerComponent.h:403
virtual void taskComplete(bool success=true)
If we are currently tasked, this will cause us to notify the entity that we're done and delete the ta...
DtVector myIntermediateLocalDestination
These no longer get set, since Gameware path planning is not performed by this controller.
Definition: groundMoveToDestinationControllerComponent.h:365
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:471
DtActiveBotNavInterface * myNavInterface
Definition: groundMoveToDestinationControllerComponent.h:379
virtual bool decideToGiveUpTask() const override
If the entity is attached and the target of the current task is not, give up on the task...
DtGroundMoveToDestinationControllerComponent is a controller that provides a kinematics-based model o...
Definition: groundMoveToDestinationControllerComponent.h:40
DtGroundMoveToObstacleAvoider * myObstacleAvoider
Definition: groundMoveToDestinationControllerComponent.h:338
virtual bool createPorts() override
Overridden to create the automotive ports.
const DtGroundMoveToDescriptor * myMoveToDescriptor
Definition: groundMoveToDestinationControllerComponent.h:337
File: simMsg.h.
Definition: simMessage.h:35
int myLastNumberOfObstacleVisualizations
Definition: groundMoveToDestinationControllerComponent.h:339
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation frame...
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: groundMoveToDestinationControllerComponent.h:391
bool myAtDestination
Definition: groundMoveToDestinationControllerComponent.h:370
int myLastNumberOfPathSearchRegionVisualizations
Definition: groundMoveToDestinationControllerComponent.h:341
DtVector myIntermediateWorldDestination
These no longer get set, since Gameware path planning is not performed by this controller.
Definition: groundMoveToDestinationControllerComponent.h:364
static const std::string blockedByWallString
= "BlockedByVehicle";
Definition: groundMoveToDestinationControllerComponent.h:232
static const std::string notActiveString
= "NotActive";
Definition: groundMoveToDestinationControllerComponent.h:227
DtBooleanOutputPort * myClampToNavDataPort
Output Port Name: clamp-to-nav-data Output Port Description: When there is a failure to path plan due...
Definition: groundMoveToDestinationControllerComponent.h:351
Definition: collision.h:25
Definition: rangeAndDirectionNetworkSegmentMetric.h:21
static const std::string avoidingString
= "NoObstacles";
Definition: groundMoveToDestinationControllerComponent.h:229
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtAutoTransmissionGearEnum
Definition: automotivePSR.h:25
bool myChangedLocation
Definition: groundMoveToDestinationControllerComponent.h:398
virtual bool createPortGroups() override
Overridden to create myAutomotiveControlPortGroup.
double myDistanceSquared
Definition: groundMoveToDestinationControllerComponent.h:355
Definition: groundMoveToObstacleAvoider.h:26
bool myNearDestination
Deprecated– these two are no longer used.
Definition: groundMoveToDestinationControllerComponent.h:374
bool myPassedDestination
Deprecated– these two are no longer used.
Definition: groundMoveToDestinationControllerComponent.h:375
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: groundMoveToDestinationControllerComponent.h:395
virtual double approximateThrottle(double desiredSpeed, double headingError=0.0)
ApproximateThrottle computes a value between -1 and 1 that represents the desired, normalized acceleration. The calling function should treat negative values as (positive) brake output. This control function gets the current gear setting, the current forward speed, current throttle setting, the speed last tick, and dT as further input. If the gear is Reverse, then the desiredSpeed and currentSpeed are negated so that the throttle value computed will end up being positive to move the vehicle. The function then considers two cases:
double myEstimatedTotValue
the tot value
Definition: groundMoveToDestinationControllerComponent.h:393
DtGroundAutoControllerComponent is a base controller that holds capabilitites common to all automotiv...
Definition: groundAutoControllerComponent.h:34
A locally simulated VRF object.
Definition: localObject.h:98