46 avoiderNoObstacles = 1,
48 avoiderStoppedForMovingObstacle = 3,
49 avoiderStoppedForStaticObstacle = 4,
104 virtual void steeringAndSpeedThroughObstacles(
105 const DtVector& localGoalPosition,
106 const double desiredImmediateHeading,
107 const double desiredSpeed,
const double desiredLatAccelLimit,
108 double& desiredHeadingOut,
double& desiredSpeedOut,
110 const bool debug =
false);
120 virtual void searchAreaVisualization(std::vector<DtVector>& boundary);
124 virtual void pathSearchVisualization(std::vector<std::vector<DtVector>>& searchRectangles);
127 virtual void staticObstacleVisualization(std::vector<std::vector<DtVector>>& walls);
131 virtual void entityReferenceFrameVisualization(
132 std::vector<std::vector<DtVector>>& lines, std::vector<DynamicObstacleInfo>& obstacles);
135 virtual void entityBoundingBoxVisualization(std::vector<DtVector>& entityBoundingBox);
141 virtual void entityTurnRadiusVisualization(std::vector<DtVector>& entityTurningBounds);
145 virtual void entityPathVisualization(std::map<
DtString, std::vector<std::vector<DtVector>>>& paths,
146 std::map<
DtString, std::vector<DynamicObstacleInfo>>& obstacles);
205 double heading,
double len,
double width);
241 std::vector<FeatureObstacleEdge>
edges;
255 virtual void provideDynamicObstacles(std::list<struct EntityObstacleData>& vehicles);
260 virtual void provideStaticObstacles(std::list<struct FeatureObstacleData>& walls);
270 const DtVector& entityLocation);
279 virtual DtExtent makeDynamicObstacleSearchArea(
const DtVector& localGoal);
289 const DtVector& localGoal);
303 virtual bool isNotEmbarkedOnDifferentParent(
const DtSimObject* obj);
305 virtual bool doesNotOverlapInAltitude(
const DtSimObject* obj);
306 static bool ignoreSelfFilterFcn(
const DtSimObject* obj,
void* usr);
307 static bool ignoreBehindFilterFcn(
const DtSimObject* obj,
void* usr);
309 static bool ignoreEmbarkedOnDifferentParentFcn(
const DtSimObject* obj,
void* usr);
311 static bool ignoreDifferentAltitudeFcn(
const DtSimObject* obj,
void* usr);
388 void setUnconstrained();
391 void removeInterval(
const double start,
const double end);
405 double highestSpeedAllowed()
const;
426 virtual void computeFinalAction(
427 const std::list<struct EntityObstacleData>& vehicles,
428 const std::list<struct FeatureObstacleData>& walls,
429 const double desiredHeading,
const double desiredSpeed,
430 double& outHeading,
double& outSpeed,
AvoiderStatus& status);
464 virtual double computeSpeedAndScoreForPathHeading(
const DtString& label,
const double pathHeading,
double refHeading,
465 SpeedConstraint& refConstraint,
const bool maybeYieldRow,
const std::list<struct EntityObstacleData>& vehicles,
466 const std::list<struct FeatureObstacleData>& walls,
const double desiredSpeed,
const double desiredHeading,
467 bool goalIsInThisDirection,
double& outSpeed,
SpeedConstraint& resultConstraint);
485 virtual double computeSpeedAndScoreForStraightAhead(
const std::list<struct EntityObstacleData>& vehicles,
486 const std::list<struct FeatureObstacleData>& walls,
const double desiredSpeed,
const double desiredHeading,
487 bool goalIsInThisDirection,
SpeedConstraint& outConstraint,
double& outSpeed);
518 virtual SpeedConstraint computeSpeedConstraintFromDynamicObstacle(
DtString label,
const double angledPathOriginOffset,
519 const double ownHalfWidth,
const double ownHalfLength,
const EntityObstacleData& obstacle,
520 double currentMinTurnRadius,
bool leftTurn,
bool rightTurn,
const double cornerBufferWidth,
DynamicObstacleInfo& info);
548 virtual SpeedConstraint computeSpeedConstraintFromStaticObstacle(
const double originOffset,
549 const double ownHalfWidth,
const double ownHalfLength,
const FeatureObstacleData& obstacle,
bool leftTurn,
550 bool rightTurn,
const double cornerBufferWidth,
double distanceOfGoalAhead)
const;
574 const double desiredHeading,
const double desiredSpeed,
575 double& speedForBestScore);
584 virtual void updateBestScoreAndSpeed(
double& bestScore,
double& bestSpeed,
const double speed,
const double heading,
585 const double desiredSpeed,
const double desiredHeading,
const SpeedConstraint& constraint);
591 virtual double combinedScore(
const double speed,
const double heading,
const double desiredSpeed,
596 virtual double speedGreaterThanDesiredScore(
const double speed,
const double heading,
597 const double desiredSpeed,
const double desiredHeading);
598 virtual double speedLessThanDesiredScore(
const double speed,
const double heading,
599 const double desiredSpeed,
const double desiredHeading);
600 virtual double speedInDesiredDirectionScore(
const double speed,
const double heading,
601 const double desiredSpeed,
const double desiredHeading);
602 virtual double speedLessThanFeasibleScore(
const double speed,
const double heading,
603 const double desiredSpeed,
const double desiredHeading);
604 virtual double speedGreaterThanFeasibleScore(
const double speed,
const double heading,
605 const double desiredSpeed,
const double desiredHeading);
606 virtual double headingInDesiredDirectionScore(
const double speed,
const double heading,
607 const double desiredSpeed,
const double desiredHeading);
610 virtual double yieldToScore(
const double speed,
const double heading,
611 const double desiredSpeed,
const double desiredHeading);
629 virtual bool isNewConstraintBetter(
const double oldBestSpeed,
const double newSpeed,
630 const double oldHighestSpeedAllowed,
const double newHighestSpeed,
631 const double oldBestScore,
const double newBestScore);
635 virtual void computeBodyTransform();
642 virtual void computeHorizontalRotation(
const double angle,
648 virtual void markVehiclesWithRightOfWay(
const double desiredHeading,
649 const std::list<struct EntityObstacleData>& vehicles);
658 virtual double maxSpeedForPassBehind(
const double timeLimit,
670 virtual double minSpeedForPassAhead(
const double timeLimit,
677 virtual double minTurnRadiusForCurrentSpeed()
const;
682 virtual double maxAccelerationForSpeed();
687 virtual double maxTractionForConditions();
698 virtual double highestFeasibleSpeed()
const;
699 virtual void setHighestFeasibleSpeed(
const double s);
701 virtual double lowestFeasibleSpeed()
const;
702 virtual void setLowestFeasibleSpeed(
const double s);
710 virtual void addSearchRectangle(
const double headingOffset,
const double forwardOffset,
711 const double length,
const double halfWidth);
Definition: groundMoveToObstacleAvoider.h:346
double bboxLength
Heading of obstacle relative to ownship heading.
Definition: groundMoveToObstacleAvoider.h:211
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
Contains the DtCompositePredicate class declaration.
Definition: compositePredicate.h:23
Description: This repository holds all information that is common to all the forms of local ground en...
Definition: groundVehicleStateRepository.h:30
std::vector< DtPoint > PointVector
Definition: featureGeometry.h:80
std::vector< std::vector< DtVector > > myDebugSearchBoxes
For task visualization. The paths searched for obstacles. Each inner vector is 4 locations in vehicle...
Definition: groundMoveToObstacleAvoider.h:834
double highSpeed
Definition: groundMoveToObstacleAvoider.h:334
bool isStatic
Saved each tick to reuse.
Definition: groundMoveToObstacleAvoider.h:215
DtVector myLocalDestination
A copy of the goal location passed in to steeringAndSpeedThroughObstacles.
Definition: groundMoveToObstacleAvoider.h:728
double myHeading
Definition: groundMoveToObstacleAvoider.h:354
bool myHaveAskedForFeatureObstacles
Set true when a query has been made through the terrain interface for a feature set with obstacle fea...
Definition: groundMoveToObstacleAvoider.h:802
double length(const dvec3 &theVec)
Definition: DtVecUtils.h:20
bool myGoalIsBlockedByStatic
The destination location is behind this obstacle.
Definition: groundMoveToObstacleAvoider.h:379
std::shared_ptr< DtAreaFeatureSetOperation > myObstacleFeatureSet
Used for feature set for last query. Held until it is loaded, and then not needed until the next quer...
Definition: groundMoveToObstacleAvoider.h:792
std::list< DtSimObjectReference > myCachedEntityObstacles
Lists of vehicle obstacles found last time we looked.
Definition: groundMoveToObstacleAvoider.h:783
double minX
Definition: groundMoveToObstacleAvoider.h:217
DtVector bodyOffset
In case there is other data needed?
Definition: groundMoveToObstacleAvoider.h:208
ObstacleType
Called each tick of the parent controller to provide steering and speed, given the goal and consideri...
Definition: groundMoveToObstacleAvoider.h:52
virtual double maxOffroadSpeed() const
The maximum assumed speed while driving off road. This affects the search distance for dynamic obstac...
Definition: groundMoveToObstacleAvoider.h:162
DtSimObjectReference object
Definition: groundMoveToObstacleAvoider.h:207
std::list< SpeedInterval > IntervalList
Definition: groundMoveToObstacleAvoider.h:342
const DtSimulationServices * mySimulationServices
How far (angle) to the side extends. This will be set wider for pivoting vehicles.
Definition: groundMoveToObstacleAvoider.h:721
SpeedInterval(const double a, const double b)
Definition: groundMoveToObstacleAvoider.h:335
double myHeadingToGoal
Heading to myLocalDestination.
Definition: groundMoveToObstacleAvoider.h:730
double mySearchRange
How far (angle) to the side extends. This will be set wider for pivoting vehicles.
Definition: groundMoveToObstacleAvoider.h:726
double myLateralAccelerationLimit
Limit from desired acceleration input and physical limits.
Definition: groundMoveToObstacleAvoider.h:743
MAKVRinTerra::DtFeatureGeometry::PointVector myStaticObstacleSearchArea
Definition: groundMoveToObstacleAvoider.h:827
std::vector< FeatureObstacleEdge > edges
The features here will all assume to be open; thus if it is a closed area, the first vertex will be r...
Definition: groundMoveToObstacleAvoider.h:241
bool myIsContactLeft
Definition: groundMoveToObstacleAvoider.h:376
Definition: featureGeometry.h:65
IntervalList myIntervals
A list of allowed time intervals. Non-overlapping, and in order.
Definition: groundMoveToObstacleAvoider.h:357
DtChord myWallChord
Not currently used–.
Definition: groundMoveToObstacleAvoider.h:370
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
double myLastEntityQueryTime
Definition: groundMoveToObstacleAvoider.h:784
DtVector bodyVelocity
2D offset from ownship in body coordinates
Definition: groundMoveToObstacleAvoider.h:209
const DtGroundMoveToDestinationControllerComponent * myParentController
How far (angle) to the side extends. This will be set wider for pivoting vehicles.
Definition: groundMoveToObstacleAvoider.h:723
double mySpeed
Speed in direction of movement.
Definition: groundMoveToObstacleAvoider.h:767
StraightPathInfo myStraightPathInfo
Definition: groundMoveToObstacleAvoider.h:830
std::vector< DynamicObstacleInfo > dynamicObstacles
Definition: groundMoveToObstacleAvoider.h:77
bool myIsContactRight
Definition: groundMoveToObstacleAvoider.h:375
Definition: groundMoveToObstacleAvoider.h:66
double myAccelerationLimit
Highest (forward) acceleration physically possible now.
Definition: groundMoveToObstacleAvoider.h:746
double myCurrentAltitude
Used in task visualizations.
Definition: groundMoveToObstacleAvoider.h:764
(NB– replace DtFeatureCollision and DtEntityCollision in the feature sensor and obstacle avoider comp...
Definition: groundMoveToObstacleAvoider.h:200
Definition: groundMoveToObstacleAvoider.h:80
An range of speeds that is allowed in a SpeedConstraint. This is public so that private helper functi...
Definition: groundMoveToObstacleAvoider.h:331
bool myWasEmbarked
Remembers embarkation state last tick. When this changes, the list of vehicle obstacles is refreshed...
Definition: groundMoveToObstacleAvoider.h:788
bool myShouldYieldTo
If using yield preferences, this constraint is from an obstacle that is on the side of the line in th...
Definition: groundMoveToObstacleAvoider.h:385
double myLowestFeasibleSpeedNow
Lowest speed that can be achieved in 1 second given the limitations of myBrakingLimit.
Definition: groundMoveToObstacleAvoider.h:758
double myBrakingLimit
Highest braking acceleration, limited by desired acceleration and physical limits. Negative.
Definition: groundMoveToObstacleAvoider.h:750
DtGroundMoveToDestinationControllerComponent is a controller that provides a kinematics-based model o...
Definition: groundMoveToDestinationControllerComponent.h:40
std::vector< DynamicObstacleInfo > dynamicObstacles
Definition: groundMoveToObstacleAvoider.h:82
bool isFacingEntity
Definition: groundMoveToObstacleAvoider.h:224
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
double myLastObstacleSearchHeading
Definition: groundMoveToObstacleAvoider.h:798
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
std::set< DtSimObjectReference > myVehiclesToYieldTo
If right of way priorities are being used, this is a set of vehicle obstacles that have the right of ...
Definition: groundMoveToObstacleAvoider.h:780
double relativeHeading
Velocity in ownship body coordinates.
Definition: groundMoveToObstacleAvoider.h:210
double bboxWidth
Definition: groundMoveToObstacleAvoider.h:212
AvoiderStatusTypeValue
Called each tick of the parent controller to provide steering and speed, given the goal and consideri...
Definition: groundMoveToObstacleAvoider.h:43
Definition: groundMoveToObstacleAvoider.h:58
bool myIsGoingBackwards
How far (angle) to the side extends. This will be set wider for pivoting vehicles.
Definition: groundMoveToObstacleAvoider.h:734
DtSimObjectReference myKeyVehicleObstacle
Set by calling controller.
Definition: groundMoveToObstacleAvoider.h:821
double myHeading
Heading of movement. This is 180 degrees from heading if moving backwards.
Definition: groundMoveToObstacleAvoider.h:771
DtSimObjectReference myblockingVehicle
The obstacle is a vehicle. If this is valid, myIsWall is false.
Definition: groundMoveToObstacleAvoider.h:373
double blockedAt
Definition: groundMoveToObstacleAvoider.h:83
std::list< FeatureObstacleData > myCachedFeatureObstacles
The features found the last time the terrain was queried. Vertices of lines, in local coordinates...
Definition: groundMoveToObstacleAvoider.h:813
Definition: groundMoveToObstacleAvoider.h:71
double heading
Definition: groundMoveToObstacleAvoider.h:223
DtVector myLastObstacleSearchLocation
These record the state of the entity when it made the last feature query. A new query is made when th...
Definition: groundMoveToObstacleAvoider.h:797
Class to represent an area feature set operation (union, difference, intersection) between two area f...
Definition: areaFeatureSetOperation.h:19
std::map< DtString, HypotheticalPathInfo > myHypotheticalPaths
The key is a label including the the sim object name and the case; the value contains the vertices of...
Definition: groundMoveToObstacleAvoider.h:829
DtChord myWallObstacle
Definition: groundMoveToObstacleAvoider.h:63
DtString label
Definition: groundMoveToObstacleAvoider.h:73
Definition: groundMoveToObstacleAvoider.h:220
virtual bool shouldYieldToRight()
Indicates if yield-to-right is in effect. Ownship should yield (within reason) to vehicle obstacles a...
Definition: groundMoveToObstacleAvoider.h:182
virtual bool shouldYieldToLeft()
Indicates if yield-to-left is in effect. Ownship should yield (within reason) to vehicle obstacles ap...
Definition: groundMoveToObstacleAvoider.h:187
DtVector startLocation
Definition: groundMoveToObstacleAvoider.h:222
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
const DtGroundVehicleStateRepository * myVehicleState
How far (angle) to the side extends. This will be set wider for pivoting vehicles.
Definition: groundMoveToObstacleAvoider.h:724
double angle
Definition: groundMoveToObstacleAvoider.h:74
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
double maxX
if velocity is 0
Definition: groundMoveToObstacleAvoider.h:216
bool myDebug
Limit from desired acceleration input and physical limits.
Definition: groundMoveToObstacleAvoider.h:773
DtExtent myDynamicObstacleSearchArea
For task visualization. Make these available to the calling controller.
Definition: groundMoveToObstacleAvoider.h:826
DtSimObjectReference myVehicleObstacle
Definition: groundMoveToObstacleAvoider.h:62
DtCoordTransform myLocalToHorizontalBody
A coordinate transformation from local coordinates to a topo coordinate system that is rotated to the...
Definition: groundMoveToObstacleAvoider.h:818
Definition: groundMoveToObstacleAvoider.h:26
bool myIsObstacleWall
Definition: groundMoveToObstacleAvoider.h:822
bool myIsVehicleStopped
Definition: groundMoveToObstacleAvoider.h:374
double myInitialClearDistance
Distance of origin to closest edge of conflict area:
Definition: groundMoveToObstacleAvoider.h:359
double lowSpeed
Definition: groundMoveToObstacleAvoider.h:333
const DtLocalObject * myEntity
How far (angle) to the side extends. This will be set wider for pivoting vehicles.
Definition: groundMoveToObstacleAvoider.h:722
bool myIsWall
Obstacle information:--—— Generally, the constraint is driven by a single obstacle. This usually limits the upper speed.
Definition: groundMoveToObstacleAvoider.h:368
bool myHaveLoadedFeatureObstacles
Set true when a feature set has been loaded and the obstacles put into myCachedFeatureObstacles.
Definition: groundMoveToObstacleAvoider.h:805
Definition: groundMoveToObstacleAvoider.h:229
double blockedAt
Definition: groundMoveToObstacleAvoider.h:75
std::array< DtVector, 4 > cornerPoints
Definition: groundMoveToObstacleAvoider.h:68
Represents a feature geometry.
Definition: featureGeometry.h:44
DtVector myBodyDestination
Local destination transformed to horizontal-body coordinates. Used to get distance to goal in that fr...
Definition: groundMoveToObstacleAvoider.h:733
double myMaxSpeedForMinTurnRadius
Fastest speed to use for tight turns.
Definition: groundMoveToObstacleAvoider.h:761
double tangentIntersectionX
Definition: groundMoveToObstacleAvoider.h:76
double myHighestFeasibleSpeedNow
Highest speed that can be achieved in 1 second given the desired acceleration and the physical limit ...
Definition: groundMoveToObstacleAvoider.h:754
DtChord myKeyWallObstacle
Definition: groundMoveToObstacleAvoider.h:823
A locally simulated VRF object.
Definition: localObject.h:98
virtual double lookaheadTime() const
The amount of time to lookahead. This affects the search distance for all obstacles. Note that the time required to slow to a stop is spd/accel; consider the max speed above and a gentle deceleration of 3-5mps. Default value: 10.0 s.
Definition: groundMoveToObstacleAvoider.h:169