VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
navigationPreferenceController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "vrfmodel/setController.h"
13 #include <geometry/surface.h>
15 
16 class DtSimMessage;
19 class DtNavTag;
22 
28 {
29 
30 public:
31 
35  DtLocalObject* owner,
36  DtSimulationServices* simManager,
37  DtComponentDescriptor* desc = 0,
38  DtReaderWriterRegistry* parentRegistry = 0);
39 
41  virtual ~DtNavigationPreferenceController() override;
42 
45  virtual const char* type() const override;
46 
50  static DtSimComponent* creator(const DtString& name,
51  DtLocalObject* owner,
52  DtSimulationServices* simManager,
53  DtComponentDescriptor* desc = 0,
54  DtReaderWriterRegistry* parentRegistry = 0);
55 
56  virtual bool init() override;
57 
58  virtual bool postAddComponentsInit() override;
59 
60  virtual void preFirstTickInit() override;
61 
62  virtual void processNavigationInterfaceChanged();
63 
64 protected:
65  static bool pathCostEvalFcn(const DtNavTag& navTag, float slope, float elevationChange, float* costMultiplier, void* userData);
66  virtual bool evaluatePathCost(const DtNavTag& navTag, float slope, float elevationChange, float* costMultiplier);
67 
68  virtual void buildNormalizedSoilRoughnessFactors();
69  virtual void buildSoilAndSemanticFactors();
70  virtual void addSoilAndSemanticFactorsFromList(const DtPathCostEntryList& costList);
71 
77  virtual double slopeMultiplier(const double elevationChange, const double slope, const double soilModifier = 0.0);
78 
82  virtual bool finalizePathCost(double pathCost, float* costMultiplier);
83 
85 
86  static void setNavigationPreferencesCallback(DtSimMessage* msg, void* usr);
87  virtual void processSetNavigationPreferences(DtSimMessage* msg);
89 
91 
92  static void requestAvailableNavigationPreferencesCallback(const DtVrfObjectMessage* msg, void* usr);
93  virtual void processRequestAvailableNavigationPreferences(const DtVrfObjectMessage* msg);
95 
97  void sendAvailableNavigationPreferences(const DtUUID& receiver, bool sendList);
98 
100  void setUseRoadsForPathPlanning(bool useRoads);
101 
104 
105  std::map<DtRoughnessSoilType, double> myNormalizedSoilRoughnessFactors;
106  std::map<DtU32, double> mySoilCharacteristicFactors;
107  std::map<unsigned int, double> mySemanticDataFactors;
109 
112 
113 private:
115 
117 
120 
126 
128 
130 
131  tbb::spin_mutex myMutex;
132 };
133 
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
Stores the state data used by the DtNavigationPreferenceController component.
Definition: navigationPreferenceControllerPsr.h:17
DtVrfMovingObjectStateRepository * myMovingObjectStateRep
Definition: navigationPreferenceController.h:127
tbb::spin_mutex myMutex
Definition: navigationPreferenceController.h:131
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
const DtSetController & operator=(const DtSetController &orig)
assignment operator; not implemented
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:27
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
DtNavigationPreferenceDescriptor * myNavigationPreferenceDesc
Definition: navigationPreferenceController.h:110
DtNavigationPreferenceDescriptor; descriptor for the DtNavigationPreferenceController component...
Definition: navigationPreferenceDescriptor.h:23
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
Definition: readerWriterRegistry.h:39
std::map< DtU32, double > mySoilCharacteristicFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:106
VR-Forces wrapper for Gameware NavTag. Note: This class keeps only a pointer to the data...
Definition: navDataTag.h:87
std::map< DtRoughnessSoilType, double > myNormalizedSoilRoughnessFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:105
virtual bool init() override
Calls setRadio()
DtActiveBotNavInterface * myNavInterface
Definition: navigationPreferenceController.h:129
DtUUID myFrontEndSender
Definition: navigationPreferenceController.h:125
std::map< unsigned int, double > mySemanticDataFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:107
The navigation preference controller helps path planning algorithms make decisions about what paths a...
Definition: navigationPreferenceController.h:27
File: simMsg.h.
Definition: simMessage.h:35
DtNavigationPreferenceControllerPsr * myProcessState
Definition: navigationPreferenceController.h:111
This class will define a basic set controller that will allow for adding sets of that can be register...
Definition: setController.h:21
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
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
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)