46 avoiderNoObstacles = 1,
48 avoiderStoppedForMovingObstacle = 3,
49 avoiderStoppedForStaticObstacle = 4,
84 virtual void steeringAndSpeedThroughObstacles(
85 const DtVector& localGoalPosition,
86 const double desiredImmediateHeading,
87 const double desiredSpeed,
const double desiredAccelLimit,
88 double& desiredHeadingOut,
double& desiredSpeedOut,
90 const bool debug =
false);
93 virtual void searchAreaVisualization(std::vector<DtVector>& boundary);
96 virtual void staticObstacleVisualization(std::vector<std::vector<DtVector>>& walls);
98 virtual void dynamicObstacleVisualization(
DtExtent& extent);
158 double heading,
double len,
double width);
194 std::vector<FeatureObstacleEdge>
edges;
208 virtual void provideDynamicObstacles(std::list<struct EntityObstacleData>& vehicles);
213 virtual void provideStaticObstacles(std::list<struct FeatureObstacleData>& walls);
223 const DtVector& entityLocation);
232 virtual DtExtent makeDynamicObstacleSearchArea(
const DtVector& localGoal);
242 const DtVector& localGoal);
256 virtual bool isNotEmbarkedOnDifferentParent(
const DtSimObject* obj);
258 virtual bool doesNotOverlapInAltitude(
const DtSimObject* obj);
259 static bool ignoreSelfFilterFcn(
const DtSimObject* obj,
void* usr);
260 static bool ignoreBehindFilterFcn(
const DtSimObject* obj,
void* usr);
262 static bool ignoreEmbarkedOnDifferentParentFcn(
const DtSimObject* obj,
void* usr);
264 static bool ignoreDifferentAltitudeFcn(
const DtSimObject* obj,
void* usr);
334 void setUnconstrained();
337 void removeInterval(
const double start,
const double end);
351 double highestSpeedAllowed()
const;
372 virtual void computeFinalAction(
373 const std::list<struct EntityObstacleData>& vehicles,
374 const std::list<struct FeatureObstacleData>& walls,
375 const double desiredHeading,
const double desiredSpeed,
376 double& outHeading,
double& outSpeed,
AvoiderStatus& status);
401 virtual double computeSpeedAndScoreForPathHeading(
const double pathHeading,
402 double refHeading,
SpeedConstraint& refConstraint,
const bool maybeYieldRow,
403 const std::list<struct EntityObstacleData>& vehicles,
404 const std::list<struct FeatureObstacleData>& walls,
const double desiredSpeed,
const double desiredHeading,
416 virtual double computeSpeedAndScoreForStraightAhead(
417 const std::list<struct EntityObstacleData>& vehicles,
418 const std::list<struct FeatureObstacleData>& walls,
419 const double desiredSpeed,
420 const double desiredHeading,
451 const double originOffset,
452 const double ownHalfWidth,
const double ownHalfLength,
454 bool leftTurn,
bool rightTurn,
const double cornerBufferWidth);
460 const double originOffset,
461 const double ownHalfWidth,
const double ownHalfLength,
463 bool leftTurn,
bool rightTurn,
const double cornerBufferWidth);
487 const double desiredHeading,
const double desiredSpeed,
488 double& speedForBestScore);
500 virtual void updateBestScoreAndSpeed(
double& bestScore,
double& bestSpeed,
501 const double speed,
const double heading,
502 const double desiredSpeed,
const double desiredHeading,
503 const bool applyYield =
false,
const bool isStatic =
false);
509 virtual double combinedScore(
const double speed,
const double heading,
510 const double desiredSpeed,
const double desiredHeading,
511 const bool yieldTo =
false,
const bool isStatic =
false);
515 virtual double speedGreaterThanDesiredScore(
const double speed,
const double heading,
516 const double desiredSpeed,
const double desiredHeading);
517 virtual double speedLessThanDesiredScore(
const double speed,
const double heading,
518 const double desiredSpeed,
const double desiredHeading);
519 virtual double speedInDesiredDirectionScore(
const double speed,
const double heading,
520 const double desiredSpeed,
const double desiredHeading);
521 virtual double speedLessThanFeasibleScore(
const double speed,
const double heading,
522 const double desiredSpeed,
const double desiredHeading);
523 virtual double speedGreaterThanFeasibleScore(
const double speed,
const double heading,
524 const double desiredSpeed,
const double desiredHeading);
525 virtual double headingInDesiredDirectionScore(
const double speed,
const double heading,
526 const double desiredSpeed,
const double desiredHeading);
527 virtual double yieldToScore(
const double speed,
const double heading,
528 const double desiredSpeed,
const double desiredHeading);
539 virtual void computeBodyTransform();
546 virtual void computeHorizontalRotation(
const double angle,
552 virtual void markVehiclesWithRightOfWay(
const double desiredHeading,
553 const std::list<struct EntityObstacleData>& vehicles);
562 virtual double maxSpeedForPassBehind(
const double timeLimit,
574 virtual double minSpeedForPassAhead(
const double timeLimit,
581 virtual double minTurnRadiusForCurrentSpeed()
const;
586 virtual double maxAccelerationForSpeed();
591 virtual double maxTractionForConditions();
602 virtual double highestFeasibleSpeed()
const;
603 virtual void setHighestFeasibleSpeed(
const double s);
605 virtual double lowestFeasibleSpeed()
const;
606 virtual void setLowestFeasibleSpeed(
const double s);
Definition: groundMoveToObstacleAvoider.h:299
double bboxLength
Heading of obstacle relative to ownship heading.
Definition: groundMoveToObstacleAvoider.h:164
#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:76
double highSpeed
Definition: groundMoveToObstacleAvoider.h:287
bool isStatic
Saved each tick to reuse.
Definition: groundMoveToObstacleAvoider.h:168
DtVector myLocalDestination
Definition: groundMoveToObstacleAvoider.h:620
double myHeading
Definition: groundMoveToObstacleAvoider.h:307
bool myHaveAskedForFeatureObstacles
Set true when a query has been made through the terrain interface for a feature set with obstacle fea...
Definition: groundMoveToObstacleAvoider.h:688
std::list< DtSimObjectReference > myCachedEntityObstacles
Lists of vehicle obstacles found last time we looked.
Definition: groundMoveToObstacleAvoider.h:669
double minX
Definition: groundMoveToObstacleAvoider.h:170
DtVector bodyOffset
In case there is other data needed?
Definition: groundMoveToObstacleAvoider.h:161
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:113
DtSimObjectReference object
Definition: groundMoveToObstacleAvoider.h:160
std::list< SpeedInterval > IntervalList
Definition: groundMoveToObstacleAvoider.h:295
const DtSimulationServices * mySimulationServices
Definition: groundMoveToObstacleAvoider.h:616
std::shared_ptr< MAKVRinTerra::DtFeatureSet > myObstacleFeatureSet
Used for feature set for last query. Held until it is loaded, and then not needed until the next quer...
Definition: groundMoveToObstacleAvoider.h:678
SpeedInterval(const double a, const double b)
Definition: groundMoveToObstacleAvoider.h:288
double myLateralAccelerationLimit
Limit from desired acceleration input and physical limits.
Definition: groundMoveToObstacleAvoider.h:630
MAKVRinTerra::DtFeatureGeometry::PointVector myStaticObstacleSearchArea
Definition: groundMoveToObstacleAvoider.h:714
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:194
bool myIsContactLeft
Definition: groundMoveToObstacleAvoider.h:326
Definition: featureGeometry.h:61
IntervalList myIntervals
A list of allowed time intervals. Non-overlapping, and in order.
Definition: groundMoveToObstacleAvoider.h:310
DtChord myWallChord
Definition: groundMoveToObstacleAvoider.h:322
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
double myLastEntityQueryTime
Definition: groundMoveToObstacleAvoider.h:670
DtVector bodyVelocity
2D offset from ownship in body coordinates
Definition: groundMoveToObstacleAvoider.h:162
const DtGroundMoveToDestinationControllerComponent * myParentController
Definition: groundMoveToObstacleAvoider.h:618
double mySpeed
Speed in direction of movement.
Definition: groundMoveToObstacleAvoider.h:654
bool myIsContactRight
Definition: groundMoveToObstacleAvoider.h:325
double myAccelerationLimit
Highest (forward) acceleration physically possible now.
Definition: groundMoveToObstacleAvoider.h:633
double myCurrentAltitude
Used in task visualizations.
Definition: groundMoveToObstacleAvoider.h:651
(NB– replace DtFeatureCollision and DtEntityCollision in the feature sensor and obstacle avoider comp...
Definition: groundMoveToObstacleAvoider.h:153
An range of speeds that is allowed in a SpeedConstraint. This is public so that private helper functi...
Definition: groundMoveToObstacleAvoider.h:284
bool myWasEmbarked
Remembers embarkation state last tick. When this changes, the list of vehicle obstacles is refreshed...
Definition: groundMoveToObstacleAvoider.h:674
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:331
double myLowestFeasibleSpeedNow
Lowest speed that can be achieved in 1 second given the limitations of myBrakingLimit.
Definition: groundMoveToObstacleAvoider.h:645
double myBrakingLimit
Highest braking acceleration, limited by desired acceleration and physical limits. Negative.
Definition: groundMoveToObstacleAvoider.h:637
DtGroundMoveToDestinationControllerComponent is a controller that provides a kinematics-based model o...
Definition: groundMoveToDestinationControllerComponent.h:40
bool isFacingEntity
Definition: groundMoveToObstacleAvoider.h:177
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:684
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:666
double relativeHeading
Velocity in ownship body coordinates.
Definition: groundMoveToObstacleAvoider.h:163
double bboxWidth
Definition: groundMoveToObstacleAvoider.h:165
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
Definition: groundMoveToObstacleAvoider.h:621
DtSimObjectReference myKeyVehicleObstacle
Definition: groundMoveToObstacleAvoider.h:708
double myHeading
Heading of movement. This is 180 degrees from heading if moving backwards.
Definition: groundMoveToObstacleAvoider.h:658
DtSimObjectReference myblockingVehicle
Definition: groundMoveToObstacleAvoider.h:323
std::list< FeatureObstacleData > myCachedFeatureObstacles
The features found the last time the terrain was queried. Vertices of lines, in local coordinates...
Definition: groundMoveToObstacleAvoider.h:699
double heading
Definition: groundMoveToObstacleAvoider.h:176
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:683
DtChord myWallObstacle
Definition: groundMoveToObstacleAvoider.h:63
Definition: groundMoveToObstacleAvoider.h:173
virtual bool shouldYieldToRight()
Indicates if yield-to-right is in effect. Ownship should yield (within reason) to vehicle obstacles a...
Definition: groundMoveToObstacleAvoider.h:134
virtual bool shouldYieldToLeft()
Indicates if yield-to-left is in effect. Ownship should yield (within reason) to vehicle obstacles ap...
Definition: groundMoveToObstacleAvoider.h:140
DtVector startLocation
Definition: groundMoveToObstacleAvoider.h:175
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
const DtGroundVehicleStateRepository * myVehicleState
Definition: groundMoveToObstacleAvoider.h:619
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:169
bool myDebug
Set by calling controller.
Definition: groundMoveToObstacleAvoider.h:707
DtExtent myDynamicObstacleSearchArea
For task visualization. Make these available to the calling controller. TODO.
Definition: groundMoveToObstacleAvoider.h:713
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:704
Definition: groundMoveToObstacleAvoider.h:26
bool myIsObstacleWall
Definition: groundMoveToObstacleAvoider.h:709
bool myIsVehicleStopped
Definition: groundMoveToObstacleAvoider.h:324
double myInitialClearDistance
Distance of origin to closest edge of conflict area:
Definition: groundMoveToObstacleAvoider.h:312
double lowSpeed
Definition: groundMoveToObstacleAvoider.h:286
Represents a GIS feature. Features consist of a DtFeatureGeometry (2.5D geometric vector data) and a ...
Definition: feature.h:36
const DtLocalObject * myEntity
Definition: groundMoveToObstacleAvoider.h:617
bool myIsWall
Obstacle information:--—— Generally, the constraint is driven by a single obstacle. This usually limits the upper speed.
Definition: groundMoveToObstacleAvoider.h:321
bool myHaveLoadedFeatureObstacles
Set true when a feature set has been loaded and the obstacles put into myCachedFeatureObstacles.
Definition: groundMoveToObstacleAvoider.h:691
Definition: groundMoveToObstacleAvoider.h:182
Represents a feature geometry.
Definition: featureGeometry.h:40
double myMaxSpeedForMinTurnRadius
Fastest speed to use for tight turns.
Definition: groundMoveToObstacleAvoider.h:648
double myHighestFeasibleSpeedNow
Highest speed that can be achieved in 1 second given the desired acceleration and the physical limit ...
Definition: groundMoveToObstacleAvoider.h:641
DtChord myKeyWallObstacle
Definition: groundMoveToObstacleAvoider.h:710
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:120