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();
132 virtual double findDesiredSpeed(
const DtVector& localDestination,
133 const double stoppingAcceleration = 0.0);
135 virtual double findDesiredSpeed(
const double stoppingAcceleration = 0.0);
147 virtual double destinationSpeed(
const double cruiseSpeed)
const;
165 virtual bool atDestination();
172 virtual double approximateThrottle(
double desiredSpeed,
double headingError = 0.0)
override;
178 virtual void stopVehicle(
bool success =
true);
181 virtual void stop(
bool success =
true);
185 virtual void doMoving();
207 virtual bool nearDestination();
218 virtual bool passedDestination();
228 static const std::string blockedByVehicleString;
240 virtual bool setupDestination();
251 virtual void setupDestinationVector();
254 virtual void invalidateDestinationVector()
const;
257 virtual void moveToDestination();
258 virtual double distanceSqToDestination()
const;
268 virtual double steeringHeadingToLocation(
const DtVector& destination);
278 virtual double findDesiredHeading();
286 virtual void taskComplete(
bool success =
true)
override;
293 virtual void setDestinationIsInsideObstruction(
bool yesNo);
297 virtual bool destinationIsInsideObstruction()
const;
301 virtual unsigned maxNumFailedPathAttempts()
const;
303 static void navAreaChangedCallback(
void* usr);
304 virtual void processNavAreaChanged();
306 DtVector localDestination()
const;
308 virtual void processNavigationInterfaceChanged();
311 virtual void processEstimatedTotCalculation();
314 virtual void processGroundVehicleLocationChanged();
378 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:375
DtVector myLocalDestination
Definition: groundMoveToDestinationControllerComponent.h:348
static const std::string noObstaclesString
= "NotActive";
Definition: groundMoveToDestinationControllerComponent.h:226
double myNearDistanceSquared
Deprecated– these two are no longer used.
Definition: groundMoveToDestinationControllerComponent.h:366
DtVector myDestinationVector
Definition: groundMoveToDestinationControllerComponent.h:358
bool myHasIntermediateDestination
These no longer get set, since Gameware path planning is not performed by this controller.
Definition: groundMoveToDestinationControllerComponent.h:353
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:370
virtual void registerTaskMsgCallbacks()
virtual void clearTask() override
Overridden to deactivate the port group when this controller completes a task.
bool myDestinationVectorIsValid
Definition: groundMoveToDestinationControllerComponent.h:359
DtVector myEstimatedTotTextPos
tot text position
Definition: groundMoveToDestinationControllerComponent.h:387
bool myDestinationIsInsideObstruction
Definition: groundMoveToDestinationControllerComponent.h:372
double myCurrentSpeed
Definition: groundMoveToDestinationControllerComponent.h:346
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:349
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:393
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:355
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:443
DtActiveBotNavInterface * myNavInterface
Definition: groundMoveToDestinationControllerComponent.h:369
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:330
virtual bool createPorts() override
Overridden to create the automotive ports.
const DtGroundMoveToDescriptor * myMoveToDescriptor
Definition: groundMoveToDestinationControllerComponent.h:329
File: simMsg.h.
Definition: simMessage.h:35
int myLastNumberOfObstacleVisualizations
Definition: groundMoveToDestinationControllerComponent.h:331
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: groundMoveToDestinationControllerComponent.h:381
bool myAtDestination
Definition: groundMoveToDestinationControllerComponent.h:360
DtVector myIntermediateWorldDestination
These no longer get set, since Gameware path planning is not performed by this controller.
Definition: groundMoveToDestinationControllerComponent.h:354
static const std::string blockedByWallString
= "BlockedByVehicle";
Definition: groundMoveToDestinationControllerComponent.h:230
static const std::string notActiveString
= "NotActive";
Definition: groundMoveToDestinationControllerComponent.h:225
DtBooleanOutputPort * myClampToNavDataPort
Output Port Name: clamp-to-nav-data Output Port Description: When there is a failure to path plan due...
Definition: groundMoveToDestinationControllerComponent.h:341
Definition: collision.h:25
Definition: rangeAndDirectionNetworkSegmentMetric.h:21
static const std::string avoidingString
= "NoObstacles";
Definition: groundMoveToDestinationControllerComponent.h:227
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
DtAutoTransmissionGearEnum
Definition: automotivePSR.h:25
bool myChangedLocation
Definition: groundMoveToDestinationControllerComponent.h:388
virtual bool createPortGroups() override
Overridden to create myAutomotiveControlPortGroup.
double myDistanceSquared
Definition: groundMoveToDestinationControllerComponent.h:345
Definition: groundMoveToObstacleAvoider.h:26
bool myNearDestination
Deprecated– these two are no longer used.
Definition: groundMoveToDestinationControllerComponent.h:364
bool myPassedDestination
Deprecated– these two are no longer used.
Definition: groundMoveToDestinationControllerComponent.h:365
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: groundMoveToDestinationControllerComponent.h:385
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:383
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